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
/
mapqa
/
Views
/
Trader
/
Edit File Name :
SalesTranscation.cshtml
@model RER_Project.DataAccess.ViewModels.TraderDataVm @{ ViewBag.Title = "SalesTranscation"; Layout = "~/Views/Shared/_Layout.cshtml"; } @{ int page = 1; var name = ""; int fyId = 0; int provinceId = 0; int districtId = 0; int municipalityId = 0; int memberid = 0; string groupId = ""; int traderId = ViewBag.traderid; int pageno = ViewBag.page; } @using RER_Project.Core.Helpers @using RER_Project.BusinessLayer.BusinessService; @{ var meta = AppUserService.GetCurrent(); } <div class="row wrapper border-bottom white-bg page-heading"> <div class="col-md-12"> <ol class="breadcrumb" style="margin-left:20px"> <li class="active"> <strong>Sales Information</strong> </li> </ol> <div class="row"> <div class="col-lg-12"> <span style="font-size: 100%;"> Business Name: <strong>@Model.trader[0].name</strong> </span> <span style="font-size: 100%;"> Province: <strong>@Model.trader[0].province</strong> </span> <span style="font-size: 100%;"> Atoll: <strong>@Model.trader[0].district</strong> </span> <span style="font-size: 100%;"> Island: <strong>@Model.trader[0].paliaka</strong> </span> </div> </div> <br /> <div class="row"> <div class="col-lg-12"> <span style="font-size: 100%;"> Nature Of Business: <strong>@Model.trader[0].nature</strong> </span> <span style="font-size: 100%;"> Address: <strong>@Model.trader[0].addressofbusiness</strong> </span> </div> </div> <br /> @if (meta.RoleId == (int)EnumRoleHelper.Roles.Admin || meta.RoleId == (int)EnumRoleHelper.Roles.MnE || meta.RoleId == (int)EnumRoleHelper.Roles.MnEOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.SupplyChainSupervisor) { <a href="@("/salestranscation/create?traderid="+traderId)" class="btn btn-primary pull-right">Create</a> } </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"> <div class="row"> <input type="hidden" id="traderId" name="traderId" /> <div class="form-group col-md-4"> <label><strong>Fiscal Year</strong></label> <select type="text" class="form-control required" name="fyId" id="fyId" data-api="/fiscal_year_unlocked/select" data-api-selected-value="3"></select> </div> <div class="form-group col-md-4"> <label><strong>Commodity</strong></label> <select type="text" class="form-control required" id="CommodityForProductionTab" name="CommodityForProductionTab" data-api="/commodity/select/exceptother"></select> </div> <div class="form-group col-md-4"> <label><strong>Product Name</strong></label> <select type="text" class="form-control required" name="Category" id="CategoryForProductionTab"></select> </div> <div class="form-group col-md-4"> <div class="col-md-8 control-label "> IFF Info </div> <div class="col-md-12" style="margin-top:10px;"> <select type="text" class="form-control required " id="GroupId" name="GroupId" data-api="/siftgroup/select" data-api-selected-value="@groupId"> <option value="">All</option> </select> </div> </div> <div class="form-group col-md-4"> <div class="col-md-8 control-label"> Farmer Name : </div> <div class="col-md-12" style="margin-top:10px;"> <select type="text" class="form-control required " name="farmerId" id="farmerId" data-api="/farmer_name" disabled="" data-api-selected-value="@memberid"> </select> </div> </div> </div> <div class="form-group col-md-offset-10" style="margin-top:20px;"> <button type="button" id="filter" name="filter" class="btn btn-primary center-orientation">Search <i class="fa fa-search" aria-hidden="true"></i></button> <button type="button" id="clear" name="clear" class="btn btn-primary center-orientation">Reset <i class="fa fa-refresh" aria-hidden="true"></i></button> </div> <hr /> <div id="loadPartialView"></div> <div style="display: flex; justify-content: right; margin: 20px;"> <a href="trader/index" class=" btn btn-primary showCreateBtn">Back</a> </div> </div> </div> </div> </div> </div> <script> var isFilter = false; localStorage.setItem('firstLoad', 1); $(document).ready(function () { window.initializeSelectApis(); window.initializeCascadeLocation(); window.initializeCommodityWiseCommoditySubTypeForProductionTab(); @*window.initializeGroup();*@ window.initializeCascadeLocation(); var memberID = $('#farmerId'); $('.select2').select2(); debugger; @* getSearchModel();*@ getTraderList(); }); $('#filter').off("click").on("click", function () { isFilter = true; @* WorkForce.loader.show();*@ getTraderList(); }); $('#clear').off("click").on("click", function () { isFilter = true; $('#fyId').val(""), $('#CommodityForProductionTab').val(""), $('#CategoryForProductionTab').val(""), $('#GroupId').val(""), $('#farmerId').val("") getTraderList(); }); $("#GroupId").off("change").on("change", function () { console.log("hello"); const groupid = $(this).val(); const farmerid = document.querySelector('#farmerId').attributes[5].value; debugger; if (groupid) { $("#farmerId").val(''); $("#farmerId").prop("disabled", false); } else { $("#farmerId").val(""); $("#farmerId").prop("disabled", "disabled"); }; displayFieldBinder($("#farmerId"), "/farmer_name?groupId=" + groupid, null, null, function () { debugger; const selectedValue = $("#GroupId").attr("data-api-selected-value"); if (selectedValue !== groupid) { $("#farmerId").attr("data-api-selected-value", ""); } if (selectedValue === groupid) { $("#farmerId").val(farmerid); } }); }); function getSearchModel() { debugger; var WorkPlanFilterVM = { fyId: $('#fyId').val(), commodityid: $('#CommodityForProductionTab').val(), productid: $('#CategoryForProductionTab').val(), group: $('#GroupId').val(), memberid: $('#farmerId').val(), traderId:@traderId, page:@pageno }; if (isFilter) { WorkPlanFilterVM.page = 1; } var model = JSON.stringify(WorkPlanFilterVM); debugger return model; } function getTraderList() { WorkForce.loader.show(); debugger; $('#loadPartialView').load("/sales_transactions/index", JSON.parse(getSearchModel()), function (response, status, xhr) { if (status == "error") { var msg = "Sorry but there was an error: "; ShowMessage("error", "error", msg + xhr.status + " " + xhr.statusText); }; WorkForce.loader.hide(); }); } function deleteItem(id) { debugger; if (!window.confirmAction()) { return false; } const ajx = window.getAjaxRequest("/trader/transcation/delete/" + id, "GET", ""); debugger; ajx.done(function (response) { ShowMessage("success", "Deleted Successfully"); getTraderList(); @* window.location = @("contract?traderId=" + traderId);*@ @* window.onload();*@ }); ajx.fail(function (xhr) { ShowMessage("error", xhr.responseText); }); } </script>
Save