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_bak
/
mapqa
/
Views
/
Groups
/
View File Name :
_GroupByCommoditiesList.cshtml
@using PagedList.Mvc; @using RER_Project.BusinessLayer.BusinessService @model PagedList.IPagedList<RER_Project.DataAccess.Functions.FnGroupList> @using RER_Project.Core.Helpers @{ var meta = AppUserService.GetCurrent(); int currentPage = Convert.ToInt32(Request.QueryString["page"].ToString()); } <div class="table table-responsive table-striped table-hover table-bordered"> <table class="table table-striped" id="groupListTable"> <thead> <tr> <th>SN. </th> <th>Id</th> <th>Province</th> <th>District</th> <th>Palika</th> <th>Group Name </th> <th>Commodity</th> <th style="white-space:nowrap;"># of Member</th> <th style="white-space:nowrap;"># of Beneficiary</th> <th style="white-space:nowrap;">View GALS</th> <th style="text-align:center;">Status</th> @if (meta.RoleId == 4 || meta.RoleId == 13) { <th>Action</th> } </tr> </thead> <tbody> @{ int serialNo = 1; } @foreach (var item in Model) { <tr> <td> <label> @((currentPage - 1) * 10 + @serialNo)</label> @{ serialNo++; } </td> <td> @item.group_id </td> <td style="white-space:nowrap;">@item.province_name</td> <td>@item.district_name</td> <td style="white-space:nowrap;">@item.municipality_name</td> <td style="white-space:nowrap;">@item.group_name</td> <td>@item.commodity_type_name</td> <td title="Click to View" style="text-align:center;"> <a class="btn btn-default btn-xs" href="@("/group-members?groupId=" + item.group_id)"> <center> @item.total_member</center> </a> <br /> </td> <td style="text-align:center;"> @item.beneficiaies_no </td> <td style="text-align:center;"> @{ var colr = "green"; var galStatus = "present"; } @if (item.has_gals == false) { colr = "dodgerblue"; galStatus = "disabled"; <p style="padding: 2px"> <i style="color:@colr" title="No GALS Member" class="fa fa-female"></i></p> } else { <a href="/gals_questions_answers/possiblemembers/@item.group_id"><p style="padding: 2px" title="Click To View GALS Member"> <i style="color:@colr" class=" btn btn-default btn-xs fa fa-female"></i></p></a> } </td> <td> @if (item.status == "Approved") { <span> <i class="fa fa-flag" style="font-size:18px;color:green;" aria-hidden="true"></i> @item.status by @item.role_name (@item.email) </span> } else if (item.status == "Rejected") { <span> <i class="fa fa-flag" style="font-size:18px;color:red;" aria-hidden="true"></i> @item.status by @item.role_name ( @item.email) </span> } else if (item.status == "Forward") { <span> <i class="fa fa-flag" style="font-size:18px;color:orange;" aria-hidden="true"></i> Pending From @if (item.role_name == "M&E" || item.role_name == "EDF" || item.role_name == "Supply Chain Supervisor") { <span> HCC </span> } else if (item.role_name == "HCC") { <span>CICC </span> } else if (item.role_name == "CICC") { <span>PICC </span> } </span> } else if (item.status == "Recommend") { <span><i class="fa fa-flag" style="font-size:18px;color:blueviolet;" aria-hidden="true"></i> Recommendation From @item.role_name (@item.email)</span> } else if (item.status == "") { if (item.created_by == (int)EnumRoleHelper.Roles.Admin) { <span> <i class="fa fa-flag" style="font-size:18px;color:orange;" aria-hidden="true"></i> Pending From Admin </span> } else if (item.created_by == (int)EnumRoleHelper.Roles.SupplyChainSupervisor) { <span> <i class="fa fa-flag" style="font-size:18px;color:orange;" aria-hidden="true"></i> Pending From Supply Chain Supervisor </span> } else if (item.created_by == (int)EnumRoleHelper.Roles.MnE) { <span> <i class="fa fa-flag" style="font-size:18px;color:orange;" aria-hidden="true"></i> Pending From M&E </span> } } @if (item.beneficiaies_no != item.total_member) { } </td> @*<td> <a href="@("/group/edit/" + item.group_id)" title="Edit" style="font-size:15px;padding:5px"> <i class="fa fa-edit"></i></a> <a href="@("/group/detail/" + item.group_id)" title="Details" style="font-size:15px;padding:5px"><i class="fa fa-eye"</a> <a href="@("/group-members?groupId=" + item.group_id)" title="Members" style="font-size:15px;padding:5px"> <i class="fa fa-users"></i></a> </td> </tr>*@ <td> @if (item.status.Length == 0) { if ((meta.RoleId == (int)EnumRoleHelper.Roles.Admin) || (meta.RoleId == (int)EnumRoleHelper.Roles.SupplyChainSupervisor) || (meta.RoleId == (int)EnumRoleHelper.Roles.MnE) || meta.RoleId == (int)EnumRoleHelper.Roles.MnEOfficer || meta.RoleId == (int)EnumRoleHelper.Roles.ProgrameOfficer) { <a class="btn btn-default btn-xs" href="@("/group/edit/" + item.group_id)" style="color:dodgerblue" title="Edit"> <i class="fa fa-edit"></i> </a> @* <a class="btn btn-default btn-xs" href="@("/group/detail/" + item.group_id)" style="color:dodgerblue" title="Details"><i class="fa fa-eye"></i></a>*@ @*<a class="btn btn-default btn-xs" href="@("/group-members?groupId=" + item.group_id)" style="color:dodgerblue" title="Members"> <i class="fa fa-users"></i></a>*@ } } </td> </tr> } </tbody> </table> <div align="center"> @if (Model.Count > 0) { @Html.PagedListPager(Model, page => Url.Action("GroupByCommodities", new { page, groupName = ViewBag.GroupName, province = ViewBag.Province, district = ViewBag.District, municipality = ViewBag.Municipality, commodity = ViewBag.Commodity, status = ViewBag.Status }), PagedListRenderOptions.ClassicPlusFirstAndLast) } </div> </div> <script type="text/javascript"> $(document).ready(function () { }) function finalizeGroup(id, name) { WorkForce.loader.show(); let conf = confirm(`Are you sure you want to finalize '${name}' group ?`); if (!conf) { WorkForce.loader.hide(); return; } else { var ajax = request(id); ajax.done(function (response) { WorkForce.loader.hide(); if (response) { ShowMessage("success", "This group has been finalized."); location.reload(); } else { ShowMessage("error", "No. of member created should be equal to No. of beneficiaries."); location.reload(); } }); ajax.fail(function (xhr) { WorkForce.loader.hide(); ShowMessage("Error", xhr.responseText); }); } } function request(id) { const url = "/group/finalize"; const data = JSON.stringify({ Id: id }); console.log(window.getAjaxRequest(url, "POST", data)) return window.getAjaxRequest(url, "POST", data); } </script> <style> table td, th { border: 1px solid #e7eaec; } </style>