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
/
map
/
Views
/
Map
/
MemberBaseline
/
View File Name :
_LandTab.cshtml
@model RER_Project.DataAccess.ViewModels.Baseline.BaselineViewModel <div class="table-responsive" style="margin-top: 16px;"> <table class="table table-bordered table-hover" name="tblLand" id="tblLand"> <thead> <tr> <th>Land Status</th> <th> @if (@Model.MemberDetailView.Commodity == 2) { <span>Area of Pond </span> } else { <span>Irrigated Land</span> } </th> <th> @if (Model.MemberDetailView.Commodity == 2) { <span> Land Probability for Pond </span> } else { <span>Non Irrigated Land</span> } </th> @if (Model.MemberDetailView.Commodity != 2) { <th> Land With Probability Of Irrigation </th> } <th>Land Unit</th> <th>Remarks</th> </tr> </thead> <tbody id="tblLandBody"> </tbody> </table> </div> <script type="text/javascript"> var commodityId = @Model.MemberDetailView.Commodity; if (commodityId == 2) { $("#lblIrrigatedLand").text("Area of Pond"); $("#lblNonIrrigatedLand").text("Land Probability for Pond"); $("#divLandProbabilityOfIrrigation").hide(); $("#LandProbabilityOfIrrigation").removeClass("required"); } function clearLandData() { $("#LandStatusId").val(""); $('#IrrigatedLand').val(''); $('#NonIrrigatedLand').val(''); $('#LandProbabilityOfIrrigation').val(''); $('#LandUnitId').val(''); $('#LandRemarks').val(''); } $("#SubmitLand").off("click").on("click", function () { const form = $("#CreateLand"); $.validator.unobtrusive.parse(form); if (!form.valid()) { return false; }; if (!window.confirmAction()) { return; }; WorkForce.loader.show(); function request(model) { const url = "/baseline/land/create"; const data = JSON.stringify(model); return window.getAjaxRequest(url, "POST", data); } function getModel() { return ({ BaselineLand: getBaselineLand() }); } function getBaselineLand() { var landData = {}; landData.Id = $('#LandId').val(); landData.BaselineId = $('#baselineId').val(); landData.GroupId = '@Model.MemberDetailView.GroupId'; landData.MemberId = '@Model.MemberDetailView.Id'; landData.DistrictId = '@Model.MemberDetailView.DistrictId'; landData.IrrigatedLand = $('#IrrigatedLand').val(); landData.NonIrrigatedLand = $('#NonIrrigatedLand').val(); landData.LandProbabilityOfIrrigation = $('#LandProbabilityOfIrrigation').val(); landData.LandUnitId = $('#LandUnitId option:selected').val(); landData.LandStatusId = $('#LandStatusId option:selected').val(); landData.Remarks = $('#LandRemarks').val(); return landData; } const model = getModel(); const ajax = request(model); ajax.done(function (response) { WorkForce.loader.hide(); showNotification("success"); loadLandList(); clearLandData(); }); ajax.fail(function (xhr) { debugger WorkForce.loader.hide(); ShowMessage("error", xhr.responseText); }); }); function loadLandList() { const ajax = request(); function request() { const url = '/baseline/land/member/' + @Model.MemberDetailView.Id; return window.getAjaxRequest(url, "Get", @Model.MemberDetailView.Id); } ajax.done(function (response) { addLandToTable(response); }); ajax.fail(function (xhr) { ShowMessage("error", xhr.responseText); }); } function addLandToTable(response) { console.log(response); debugger; $('#tblLand tbody > tr').remove(); var table = $("#tblLand tbody"); response.forEach(function (x) { var row = "<tr>"; row += "<td>" + x.status_name + "</td>"; row += "<td>" + x.irrigated_land + "</td>"; row += "<td>" + x.non_irrigated_land + "</td>"; if (commodityId != 2) { row += "<td>" + x.land_probability_of_irrigation + "</td>"; } row += "<td>" + x.unit_name + "</td>"; row += "<td>" + x.remarks + "</td>"; table.append(row); }) } </script>