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
/
Miscellaneous
/
Edit File Name :
MinMaxAnamolyDetection.cshtml
<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="minMaxAnamolyDetection"> <label><b>Min Max Anamoly Detection</b></label> <hr style="width:100%" /> <div class="form-horizontal"> <div class="form-group"> <div class="col-md-1 control-label"> Grp. Name </div> <div class="col-md-2"> <input type="text" id="GroupNameSearch" name="GroupNameSearch" value="" class="form-control" /> </div> <div class="col-md-1 control-label"> Province: </div> <div class="col-md-2"> <select type="text" class="form-control " name="ProvinceId" id="ProvinceId" data-api="/province/select/threeStates" > </select> </div> <div class="col-md-1 control-label"> District: </div> <div class="col-md-2"> <select type="text" class="form-control " name="DistrictId" id="DistrictId" data-api="/districts/select" disabled=""> <option value="">All</option> </select> </div> <div class="col-md-1 control-label"> Commodity: </div> <div class="col-md-2"> <select type="text" class="form-control " name="CommodityId" data-api-selected-value="@ViewBag.Commodity" id="CommodityId" data-api="/commodity/select"></select> <input type="hidden" id="HiddenCommodity" value="@ViewBag.Commodity" /> </div> </div> <div class="form-group"> <div class="col-md-1 control-label"> Category: </div> <div class="col-md-2"> <select type="text" class="form-control required" id="TypeId"> <option value="">Select</option> <optgroup label="Baseline"> <option value="1">Baseline Family Details</option> <option value="2">Baseline Income</option> <option value="3">Baseline Expense</option> <option value="4">Baseline Assets</option> <option value="5"> Baseline Remittance</option> </optgroup> <optgroup label="Farmer Diary"> <option value="6">Farmer Diary Income</option> <option value="7">Farmer Diary Expense</option> <option value="8">Farmer DiaryAssets</option> @*<option value="9">Production Plan</option>*@ <option value="9">Farmer Diary Investment Plan</option> </optgroup> </select> </div> <div class="col-md-1 control-label"> Type: </div> <div class="col-md-2"> <select type="text" class="form-control required" name="MoneyFieldId" id="MoneyFieldId" data-api="/money_field/select"> </select> </div> <div class="col-md-1 control-label"> Filter: </div> <div class="col-md-2"> <select type="text" class="form-control required" name="TopId" id="TopId"> <option value="100desc">Top 100 max.</option> <option value="50desc">Top 50 max.</option> <option value="20desc">Top 20 max. </option> <option value="10desc">Top 10 max.</option> <option value="100asc">Top 100 min.</option> <option value="50asc">Top 50 min.</option> <option value="20asc">Top 20 min.</option> <option value="10asc">Top 10 min.</option> </select> </div> <div class="col-md-1"> <button type="button" id="FindMinMaxData" name="FindMinMaxData" class="btn btn-primary center-orientation"><i class="fa fa-search" aria-hidden="true"></i></button> </div> </div> <div class="row"> <div class="col-lg-12"> <div class="table table-responsive table-striped table-hover table-bordered" style="margin-top: 16px;" id="table-container"> <table class="table table-striped dataTables" name="tblMinMaxSearch" id="tblMinMaxSearch"> <thead> <tr> @* <th>SN</th>*@ <th>Group </th> <th> Member </th> <th>Province</th> <th>District</th> <th>Commodity</th> <th style="text-align:center"><span id="moneyFieldName"></span> (Rs)</th> <th>Created By</th> <th style="text-align:center">Created On ( AD )</th> <th>Action</th> </tr> </thead> <tbody id="tblMinMaxSearchBody"> </tbody> <tfoot style="line-height:30px;background-color:#edf0ee;color:black" id="tblMinMaxSearchFooter"> </tfoot> </table> <div id="bottom_anchor"></div> </div> </div> </div> </div> </form> </div> </div> </div> </div> </div> @*<link href="~/Content/datatables.min.css" rel="stylesheet" /> <script src="~/Scripts/datatables.min.js"></script>*@ <script> $(function () { window.initializeSelectApis2(); window.initializeCascadeLocation2(); window.initializeMoneyFieldCascade(); //$('.dataTables').DataTable({ // stateSave: true, // fixedHeader: true, // pageLength: 15, // dom: '<"html5buttons"B>lTfgitp', // buttons: [ // //{ extend: 'copy' }, // //{ extend: 'csv' }, // //{ extend: 'excel', title: 'ExampleFile' }, // //{ extend: 'pdf', title: 'ExampleFile' }, // //{ // // customize: function (win) { // // $(win.document.body).addClass('white-bg'); // // $(win.document.body).css('font-size', '10px'); // // $(win.document.body).find('table') // // .addClass('compact') // // .css('font-size', 'inherit'); // // } // //} // ] //}); }) $("#FindMinMaxData").off("click").on("click", function () { const form = $("#minMaxAnamolyDetection"); $.validator.unobtrusive.parse(form); if (!form.valid()) { return false; }; WorkForce.loader.show(); var districtId = $('#DistrictId').val(); var provinceId = $('#ProvinceId').val(); var commodityId = $('#CommodityId').val(); var group =$("#GroupNameSearch").val(); group = escape(group); var typeId = $('#TypeId').val(); var moneyFieldId = $("#MoneyFieldId").val(); var topId = $("#TopId").val(); setMoneyName(moneyFieldId); const ajax = request(); function request() { debugger; const url = `/min_max_anamoly_detection/search?group=${group}&provinceId=${provinceId}&districtId=${districtId}&commodityId=${commodityId}&typeId=${typeId}&moneyFieldId=${moneyFieldId}&topId=${topId}`; return window.getAjaxRequest(url, "Get", 1); } ajax.done(function (response) { addDataToTable(response); }); ajax.fail(function (xhr) { ShowMessage("error", xhr.responseText); }); }) function setMoneyName(name) { if (name == 'expense_amount') { $('#moneyFieldName').text('Expense'); } else if (name == 'loan') { $('#moneyFieldName').text('Loan'); } else if (name == 'income') { $('#moneyFieldName').text('Income'); } else if (name == 'price') { $('#moneyFieldName').text('Price'); } else if (name == 'productive_investment') { $('#moneyFieldName').text('Productive Investment'); } else if (name == 'expenses_consumption') { $('#moneyFieldName').text('Income'); } else if (name == 'loan_payment') { $('#moneyFieldName').text('Price'); } else if (name == 'assets_purchase') { $('#moneyFieldName').text('Asset Purchase'); } else if (name == 'remittance') { $('#moneyFieldName').text('Remittance'); } else if (name == 'other_investment') { $('#moneyFieldName').text('Other Investment'); } } function addDataToTable(response) { $('#tblMinMaxSearch tbody > tr').remove(); $('#tblMinMaxSearch tfoot > tr').remove(); var table = $("#tblMinMaxSearch tbody"); var isBaseline = false; var typeId = $('#TypeId').val(); if (typeId == 1 || typeId == 2 || typeId == 3 || typeId == 4 || typeId == 5) { isBaseline = true; } console.log(response); response.forEach(function (x) { var row = "<tr>"; row += "<td>" + x.group_name + "</td>"; row += "<td>" + x.member_name + "</td>"; row += "<td>" + x.province_name + "</td>"; row += "<td>" + x.district_name + "</td>"; row += "<td>" + x.commodity_name + "</td>"; row += "<td><center><strong>Rs. " + getNumberWithComma(x.total_money) + "<strong><center></td>"; row += "<td>" + (x.created_by === null ? ' ' : x.created_by) + "</td>"; row += "<td><center><strong> " +(x.created_on == null ? '' : x.created_on) + "</strong></center></td>"; row += "<td><a class='btn btn-default btn-xs' target='_blank' style='color:dodgerblue' onclick='gotoEditPage(\"" + x.member_id + "\",\"" + x.fiscal_year + "\",\"" + x.quadrimester + "\",\"" + isBaseline + "\",\"" + typeId + "\")'><i class='fa fa-edit'></i></a></td>"; table.append(row); }) WorkForce.loader.hide(); } function getNumberWithComma(value) { value = value || 0 return Number(parseFloat(value).toFixed(2)).toLocaleString("en-IN", { minimumFractionDigits: 0 }) } function removeCommaFromString(value) { var result = parseFloat(value.replace(/,/g, '')); if (isNaN(result)) { return 0; } else { return result; } } function gotoEditPage(member_id, fiscalyear, quadrimester, isbaseline, typeId) { let a=document.createElement('a'); a.target='_blank'; if (isbaseline == 'true') { if (typeId == 3) { a.href = `/baseline/create/${member_id}/#tab3`; } else if (typeId == 5) { a.href = `/baseline/create/${member_id}/#tab6`; } else if (typeId == 1) { a.href = `/baseline/create/${member_id}/#tab4`; } else if (typeId == 4) { a.href = `/baseline/create/${member_id}/#tab5`; } else { a.href = `/baseline/create/${member_id}/#tab2`; } } else { if (typeId == 7) { //expense tab //farmer_diary/create/fiscal/1/quad/First/member/318 a.href = `/farmer_diary/create/fiscal/${fiscalyear}/quad/${quadrimester}/member/${member_id}#tab1`; } if (typeId == 6) { //income tab a.href = `/farmer_diary/create/fiscal/${fiscalyear}/quad/${quadrimester}/member/${member_id}#tab2`; } if (typeId == 8) { //assets tab a.href = `/farmer_diary/create/fiscal/${fiscalyear}/member/${member_id}#tab3`; } if(typeId == 9) { //investment a.href = `/farmer_diary/create/fiscal/${fiscalyear}/member/${member_id}#tab2`; } } a.click(); } function moveScroll() { console.log("called"); var scroll = $(window).scrollTop(); var anchor_top = $("#tblMinMaxSearch").offset().top; var anchor_bottom = $("#bottom_anchor").offset().top; if (scroll > anchor_top && scroll < anchor_bottom) { clone_table = $("#clone"); if (clone_table.length == 0) { clone_table = $("#tblMinMaxSearch").clone(); clone_table.attr('id', 'clone'); clone_table.css({ position: 'fixed', 'pointer-events': 'none', top: 0 }); clone_table.width($("#tblMinMaxSearch").width()); $("#table-container").append(clone_table); $("#clone").css({ visibility: 'hidden' }); $("#clone thead").css({ 'visibility': 'visible', 'pointer-events': 'auto' }); } } else { $("#clone").remove(); } } $(window).scroll(moveScroll); </script> <style> table td, th { border: 1px solid #e7eaec; } #header-fixed { position: fixed; top: 0px; display: none; background-color: white; } thead { background-color: white; } </style>
Save