You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

311 lines
16 KiB

  1. <%@ Page Title="" Language="C#" MasterPageFile="~/AgentNew/AgentMain.Master" AutoEventWireup="true" CodeBehind="MapCustomerDeposits.aspx.cs" Inherits="Swift.web.AgentNew.Administration.CustomerDepositMapping.MapCustomerDeposits" %>
  2. <%--<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>--%>
  3. <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
  4. <style type="text/css">
  5. .modal-body .table th {
  6. color: #888888;
  7. }
  8. .modal-body .table td {
  9. color: #000;
  10. font-weight: 600;
  11. }
  12. </style>
  13. <script type="text/javascript">
  14. function CallBackAutocomplete(id) {
  15. $(id + "_aValue").val($(id + '_aValue').val());
  16. $(id + "_aText").val($(id + '_aText').val().split('|')[0]);
  17. };
  18. function IsSkippedData(logId, type, isSkipped) {
  19. if (type == 'skipped') {
  20. if (confirm('Are you sure want to skipped?')) {
  21. var dataToSend = { MethodName: 'MapCustomerSkipped', logId: logId, isSkipped: isSkipped };
  22. var xhr = $.ajax({
  23. type: "POST",
  24. url: '/AgentNew/Administration/CustomerDepositMapping/MapCustomerDeposits.aspx',
  25. dataType: "JSON",
  26. data: dataToSend,
  27. async: false
  28. });
  29. xhr.done(function (erd) {
  30. if (erd.ErrorCode == '0') {
  31. alert(erd.Msg);
  32. window.location.reload();
  33. }
  34. else if (erd.ErrorCode == '1') {
  35. alert(erd.Msg);
  36. }
  37. });
  38. xhr.fail(function (erd) {
  39. alert('Oops!!! something went wrong, please try again.');
  40. });
  41. return;
  42. };
  43. }
  44. };
  45. function ValidateData(logId, type, bankName) {
  46. var autoCompleteText = logId + '_aText';
  47. var reqField = autoCompleteText + ",";
  48. if (ValidRequiredField(reqField) == false) {
  49. return false;
  50. }
  51. if (type == 'save' || type == "send") {
  52. $("#<%=bankName.ClientID%>").text(bankName);
  53. $("#<%=LogId.ClientID%>").val(logId);
  54. //$("#myModal1").modal('show');
  55. $('#<%=hdnType.ClientID%>').val(type);
  56. MapCustomerDeposits();
  57. }
  58. else if (type == 'view') {
  59. var autoCompleteValue = '#' + logId + '_aValue';
  60. var dataToSend = { MethodName: 'GetCustomerDetails', customerId: $(autoCompleteValue).val() };
  61. var xhr = $.ajax({
  62. type: "POST",
  63. url: '/AgentNew/Administration/CustomerDepositMapping/MapCustomerDeposits.aspx',
  64. dataType: "JSON",
  65. data: dataToSend,
  66. async: false
  67. });
  68. xhr.done(function (erd) {
  69. if (erd !== null) {
  70. //$("#addModel" + logId).html(erd);
  71. $("#name").text(erd.fullName);
  72. $("#mobile").text(erd.mobile);
  73. $("#idtype").text(erd.idType);
  74. $("#idNumber").text(erd.idNumber);
  75. $("#address").text(erd.state + ',' + erd.city + ',' + erd.street);
  76. $("#membership").text(erd.membershipId);
  77. $("#email").text(erd.email);
  78. $("#dob").text(erd.dob);
  79. $("#myModal").modal('show');
  80. $("#modelClose").focus();
  81. }
  82. });
  83. xhr.fail(function (erd) {
  84. alert('Oops!!! something went wrong, please try again.');
  85. });
  86. }
  87. };
  88. $('#myModal').on('shown', function () {
  89. $('body').on('wheel.modal mousewheel.modal', function () { return false; });
  90. }).on('hidden', function () {
  91. $('body').off('wheel.modal mousewheel.modal');
  92. });
  93. function MapCustomerDeposits() {
  94. $("#btnForCallSendPage").click();
  95. //var reqField = "<%=bankList.ClientID%>,";
  96. var saveType = $('#<%=hdnType.ClientID%>').val();
  97. //if (ValidRequiredField(reqField) === false) {
  98. // return false;
  99. //}
  100. if (confirm('Are you sure want to map?')) {
  101. var logId = $("#<%=LogId.ClientID%>").val();
  102. var autoCompleteValue = '#' + logId + '_aValue';
  103. var bankId = $("#<%=bankList.ClientID%>").val();
  104. var dataToSend = { MethodName: 'MapCustomerDeposits', logId: logId, customerId: $(autoCompleteValue).val(), bankId: bankId };
  105. $.ajax({
  106. type: "POST",
  107. url: '/AgentNew/Administration/CustomerDepositMapping/MapCustomerDeposits.aspx',
  108. dataType: "JSON",
  109. data: dataToSend,
  110. async: false,
  111. success: function (erd) {
  112. if (erd.ErrorCode == '0') {
  113. var res = erd;
  114. if (saveType == 'send') {
  115. var customerId = $(autoCompleteValue).val();
  116. var url1 = "/AgentNew/SendTxn/SendV2.aspx?customerId=" + customerId;
  117. $(location).attr("href", url1);
  118. }
  119. else {
  120. window.location.reload();
  121. alert(erd.Msg);
  122. }
  123. }
  124. else if (erd.ErrorCode == '1') {
  125. alert(erd.Msg);
  126. }
  127. },
  128. err: function () {
  129. alert('Oops!!! something went wrong, please try again.');
  130. }
  131. });
  132. }
  133. };
  134. </script>
  135. </asp:Content>
  136. <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  137. <div class="page-wrapper">
  138. <div class="row">
  139. <div class="col-sm-12">
  140. <div class="page-title">
  141. <h1></h1>
  142. <ol class="breadcrumb">
  143. <li><a href="/AgentNew/Dashboard.aspx" target="mainFrame"><i class="fa fa-home"></i></a></li>
  144. <li><a href="#">Other Services</a></li>
  145. <li class="active"><a href="MapCustomerDeposits.aspx">Deposit Mapping</a></li>
  146. </ol>
  147. </div>
  148. </div>
  149. </div>
  150. <div class="tab-content">
  151. <div role="tabpanel" class="tab-pane active" id="list">
  152. <div class="row">
  153. <div class="col-md-12">
  154. <div class="panel panel-default ">
  155. <!-- Start .panel -->
  156. <div class="panel-heading">
  157. <h4 class="panel-title">Customer Deposit Mapping</h4>
  158. <div class="panel-actions">
  159. <a href="#" class="panel-action panel-action-toggle" data-panel-toggle=""></a>
  160. </div>
  161. </div>
  162. <div class="panel-body">
  163. <div class="row">
  164. <div class="col-md-4">
  165. <div class="form-group">
  166. <label class="col-md-4">Is Skipped:</label>
  167. <div class="col-md-8">
  168. <asp:DropDownList ID="isSkipped" runat="server" CssClass="form-control" OnSelectedIndexChanged="isSkipped_SelectedIndexChanged" AutoPostBack="true">
  169. <asp:ListItem Value="0" Text="Hide Skipped"></asp:ListItem>
  170. <asp:ListItem Value="1" Text="Show Skipped"></asp:ListItem>
  171. </asp:DropDownList>
  172. </div>
  173. </div>
  174. </div>
  175. <div class="col-md-12">
  176. <div class="table-responsive">
  177. <table class="table table-responsive table-bordered">
  178. <thead>
  179. <tr>
  180. <th width="2%">S.NO.</th>
  181. <th width="23%">Particulars</th>
  182. <th width="10%">Deposit Date</th>
  183. <th width="10%">Deposit Amount</th>
  184. <th width="10%">Withdraw Amount</th>
  185. <th width="28%">Choose Customer</th>
  186. <th width="18%">Action</th>
  187. </tr>
  188. </thead>
  189. <tbody id="customerDepositMapping" runat="server">
  190. <tr>
  191. <td colspan="7" align="center">No Data To Display </td>
  192. </tr>
  193. </tbody>
  194. </table>
  195. </div>
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. </div>
  204. </div>
  205. <div class="container-fluid">
  206. <div class="row">
  207. <div class="col-md-12">
  208. <div class="modal fade" id="myModal1" style="margin-top: 200px;" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  209. <div class="modal-dialog modal-md" role="document">
  210. <div class="modal-content">
  211. <div class="modal-header" id="modelUserForSave">
  212. <center> <h2 class="modal-title">Choose Bank<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></h2></center>
  213. </div>
  214. <div class="modal-body">
  215. <div class="table-responsive">
  216. <asp:HiddenField ID="hdnType" runat="server" />
  217. <table class="table">
  218. <tr>
  219. <asp:HiddenField ID="LogId" runat="server" />
  220. <th width="20%">Bank Name:</th>
  221. <th width="80%">
  222. <label id="bankName" runat="server"></label>
  223. </th>
  224. </tr>
  225. <tr>
  226. <th>Bank List:</th>
  227. <td>
  228. <asp:DropDownList ID="bankList" runat="server" CssClass="form-control"></asp:DropDownList>
  229. </td>
  230. </tr>
  231. <tr>
  232. <td></td>
  233. <td>
  234. <%--<button type="button" class="btn btn-primary" onclick="return MapCustomerDeposits()" data-toggle="tooltip" data-placement="top">Save</button>--%>
  235. <input type="button" class="btn btn-primary" onclick="return MapCustomerDeposits()" value="Save" data-toggle="tooltip" data-placement="top" />
  236. </td>
  237. </tr>
  238. </table>
  239. </div>
  240. </div>
  241. </div>
  242. </div>
  243. </div>
  244. </div>
  245. </div>
  246. </div>
  247. <div class="container-fluid">
  248. <div class="row">
  249. <div class="col-md-12">
  250. <div class="modal fade" id="myModal" style="margin-top: 200px;" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  251. <div class="modal-dialog modal-md" role="document">
  252. <div class="modal-content">
  253. <div class="modal-header">
  254. <center> <h2 class="modal-title">
  255. <label id="name"></label>
  256. (<label id="membership"></label>)<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></h2></center>
  257. </div>
  258. <div class="modal-body">
  259. <div class="table-responsive">
  260. <table class="table table-striped">
  261. <tr class="success">
  262. <th>Mobile No:</th>
  263. <td>
  264. <label id="mobile"></label>
  265. </td>
  266. <th>Id Type:</th>
  267. <td>
  268. <label id="idtype"></label>
  269. </td>
  270. </tr>
  271. <tr class="info">
  272. <th>Id No:</th>
  273. <td>
  274. <label id="idNumber"></label>
  275. </td>
  276. <th>Address:</th>
  277. <td>
  278. <label id="address"></label>
  279. </td>
  280. </tr>
  281. <tr class="warning">
  282. <th>DOB:</th>
  283. <td>
  284. <label id="dob"></label>
  285. </td>
  286. <th>Email:</th>
  287. <td>
  288. <label id="email"></label>
  289. </td>
  290. </tr>
  291. </table>
  292. </div>
  293. </div>
  294. </div>
  295. </div>
  296. </div>
  297. </div>
  298. </div>
  299. </div>
  300. </asp:Content>