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.

541 lines
25 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. using Business.Configuration;
  2. using Business.Customer;
  3. using Business.ReferralReports;
  4. using Common.Helper;
  5. using Common.Model.BenificiaryModel;
  6. using Common.Model.ReferralReports;
  7. using Common.Utility;
  8. using JMEAgentSystem.Library.Remittance;
  9. using Newtonsoft.Json;
  10. using Repository.DAO;
  11. using Repository.DAO.SendTxnIRHDao;
  12. using Swift.DAL.Remittance.Administration.ReceiverInformation;
  13. using System;
  14. using System.Collections.Generic;
  15. using System.Data;
  16. using System.Linq;
  17. using System.Reflection;
  18. using System.Web;
  19. using System.Web.Script.Serialization;
  20. using System.Web.UI;
  21. using System.Web.UI.WebControls;
  22. namespace JMEAgentSystem.WebPages.BenificiaryRegistration
  23. {
  24. public partial class Manage : System.Web.UI.Page
  25. {
  26. private readonly RemittanceLibrary _sl = new RemittanceLibrary();
  27. private readonly ICustomerServices _cd = AutoFacContainer.Resolve<ICustomerServices>();
  28. private SendTxnIRHDao st = new SendTxnIRHDao();
  29. private readonly ReceiverInformationDAO _receiver = new ReceiverInformationDAO();
  30. private const string ViewFunctionId = "20213000";
  31. private const string AddFunctionId = "20213010";
  32. private readonly IReferralReportsServices _referralReports = AutoFacContainer.Resolve<IReferralReportsServices>();
  33. protected void Page_Load(object sender, EventArgs e)
  34. {
  35. GetStatic.PrintMessage(Page);
  36. _sl.CheckSession();
  37. //regUp.Visible = false;
  38. receiverAccountNo.Attributes.Add("hidden", "hidden");
  39. if (!IsPostBack)
  40. {
  41. PopulateDDL();
  42. string reqMethod = Request.Form["MethodName"];
  43. switch (reqMethod)
  44. {
  45. case "PaymentModePcountry":
  46. LoadPaymentModeFromAjax();
  47. break;
  48. case "PopulatePaymentMode":
  49. LoadPaymentModeDDL();
  50. //PopulatePaymentModeAndPayoutPartner();
  51. break;
  52. case "PopulatePayoutPartner":
  53. LoadPayoutPartner();
  54. break;
  55. case "SaveReceiverDetails":
  56. SaveReceiverDetails();
  57. break;
  58. case "PopulateLocation":
  59. PoulateLocation();
  60. break;
  61. case "LoadCustomerInfo":
  62. LoadCustomerInfo();
  63. break;
  64. case "GetCustomerAndReceiver":
  65. GetCustomerAndReceiver();
  66. break;
  67. case "ViewTransactionReport":
  68. ViewTransactionReport();
  69. break;
  70. }
  71. Authenticate();
  72. var a = otherRelationshipTextBox.Text;
  73. if (a == "")
  74. {
  75. otherRelationDiv.Attributes.Add("style", "display:none");
  76. }
  77. string customerId = GetStatic.ReadQueryString("customerId", "");
  78. var result = _cd.GetCustomerDetails(customerId, GetStatic.GetUser());
  79. if (result != null)
  80. {
  81. hideCustomerId.Value = customerId;
  82. hideMembershipId.Value = result["membershipId"].ToString();
  83. }
  84. string receiverId = GetStatic.ReadQueryString("receiverId", "");
  85. PopulateDDL();
  86. if (receiverId != "")
  87. {
  88. PopulateForm(receiverId);
  89. }
  90. }
  91. }
  92. private void PoulateLocation()
  93. {
  94. string bankId = Request.Form["pAgent"];
  95. string countryId = Request.Form["country"];
  96. string pMode = Request.Form["paymentMode"];
  97. var dtResult = st.GetPayoutPartner(GetStatic.GetUser(), countryId, pMode); //GetStatic.ReadQueryString("partnerId", "");
  98. string partnerId = dtResult.Rows[0][0].ToString();
  99. var dao = new RemittanceDao();
  100. if (string.IsNullOrEmpty(bankId) || bankId == "undefined")
  101. {
  102. return;
  103. }
  104. DataTable dt = null;
  105. //if (partnerId == GetStatic.ReadWebConfig("transfast", "") || partnerId == GetStatic.ReadWebConfig("jmeNepal", ""))
  106. //{
  107. // string sql = "EXEC PROC_API_BANK_BRANCH_SETUP @FLAG='getBranchByAgentIdForDDL',@bankId=" + dao.FilterString(bankId) + ",@PAYMENT_TYPE = " + dao.FilterString(pMode);
  108. // dt = dao.ExecuteDataset(sql).Tables[0];
  109. //}
  110. //else
  111. //{
  112. string sql = "EXEC proc_dropDownLists @flag = 'pickBranchById', @agentId=" + dao.FilterString(bankId);
  113. dt = dao.ExecuteDataset(sql).Tables[0];
  114. //}
  115. var paymentDdl = Mapper.DataTableToClass<CustomerRegistration.Manage.DropDownModel>(dt);
  116. var jsonString = JsonConvert.SerializeObject(paymentDdl);
  117. Response.ContentType = "application/json";
  118. Response.Write(jsonString);
  119. Response.End();
  120. }
  121. private void SaveReceiverDetails()
  122. {
  123. var customerIdVal = Request.Form["customerId"].ToString();
  124. if (customerIdVal == "")
  125. {
  126. DbResult Result = new DbResult()
  127. {
  128. ErrorCode = "1",
  129. Msg = "Please select cusotmer first"
  130. };
  131. var jsonString2 = JsonConvert.SerializeObject(Result);
  132. Response.ContentType = "application/json";
  133. Response.Write(jsonString2);
  134. Response.End();
  135. }
  136. string receiverId = GetStatic.ReadQueryString("receiverId", "");
  137. var PaymentModeValue = Request.Form["paymentMode"].ToString();
  138. var trimmedReceiverFName = Request.Form["ReceiverFName"].ToString().ToUpper().Trim() == "" ? null : Request.Form["ReceiverFName"].ToString().ToUpper().Trim();
  139. var trimmedReceiverMName = Request.Form["ReceiverMName"].ToString().ToUpper().Trim() == "" ? null : Request.Form["ReceiverMName"].ToString().ToUpper().Trim();
  140. var trimmedReceiverLName = Request.Form["ReceiverLName"].ToString().ToUpper().Trim() == "" ? null : Request.Form["ReceiverLName"].ToString().ToUpper().Trim();
  141. BenificiaryModel benificiar = new BenificiaryModel();
  142. string Country = Request.Form["Country"].ToString();
  143. benificiar.Country = Country.Split('(')[0];
  144. benificiar.NativeCountry = Request.Form["nativeCountry"].ToString();
  145. benificiar.BenificiaryType = Request.Form["BenificiaryType"].ToString();
  146. benificiar.Email = Request.Form["Email"].ToString().ToUpper();
  147. benificiar.ReceiverFName = trimmedReceiverFName;
  148. benificiar.ReceiverMName = trimmedReceiverMName;
  149. benificiar.ReceiverLName = trimmedReceiverLName;
  150. benificiar.ReceiverAddress = Request.Form["ReceiverAddress"].ToString().ToUpper();
  151. benificiar.ReceiverCity = Request.Form["ReceiverCity"].ToString().ToUpper();
  152. benificiar.ContactNo = Request.Form["ContactNo"].ToString();
  153. benificiar.SenderMobileNo = Request.Form["SenderMobileNo"].ToString();
  154. benificiar.Relationship = Request.Form["Relationship"].ToString();
  155. benificiar.PlaceOfIssue = Request.Form["PlaceOfIssue"].ToString().ToUpper();
  156. benificiar.TypeId = Request.Form["TypeId"].ToString();
  157. benificiar.TypeValue = Request.Form["TypeValue"].ToString();
  158. benificiar.PurposeOfRemitance = Request.Form["PurposeOfRemitance"].ToString();
  159. benificiar.OtherPurpose = Request.Form["OtherPrupose"].ToString();
  160. benificiar.PaymentMode = Request.Form["PaymentMode"].ToString();
  161. benificiar.PayoutPatner = Request.Form["PayoutPatner"].ToString();
  162. benificiar.BenificaryAc = Request.Form["BenificaryAc"].ToString();
  163. benificiar.BankLocation = Request.Form["BankLocation"].ToString().ToUpper();
  164. benificiar.BankName = Request.Form["BankName"].ToString().ToUpper();
  165. benificiar.BenificaryAc = Request.Form["BenificaryAc"].ToString();
  166. benificiar.Remarks = Request.Form["Remarks"].ToString().ToUpper();
  167. benificiar.OtherRelationDescription = Request.Form["OtherRelationDescription"].ToString().ToUpper();
  168. benificiar.membershipId = Request.Form["membershipId"].ToString();
  169. benificiar.ReceiverId = Request.Form["ReceiverId"].ToString();
  170. //benificiar.customerId = (Request.Form["hideCustomerId"].ToString() != "" ? Request.Form["hideCustomerId"].ToString() : null);
  171. benificiar.customerId = customerIdVal;
  172. //benificiar.agentId = GetStatic.GetAgent().ToInt();
  173. benificiar.Flag = (Request.Form["hideBenificialId"].ToString() != "" ? "u" : "i-new");
  174. var signatureImage = Request.Form["hddSignatureImage"];
  175. var dbResult = _cd.UpdateBenificiarInformation(benificiar, GetStatic.GetUser());
  176. string img = hddImgURL.Value;
  177. if (dbResult.ErrorCode == "0")
  178. {
  179. if (dbResult.ErrorCode == "0" && !string.IsNullOrEmpty(signatureImage) && !string.IsNullOrWhiteSpace(signatureImage))
  180. {
  181. var result = _cd.GetCustomerDetailsForFileUpload(benificiar.customerId).Split('|');
  182. var customerId = result[0];
  183. var membershipId = result[1];
  184. var registerDate = result[2];
  185. string signatureName = GetStatic.UploadSignatureImage(signatureImage, registerDate, membershipId, customerId);
  186. if (signatureName != "1")
  187. {
  188. _cd.AddCustomerSignature(customerId, GetStatic.GetUser(), signatureName, "agent-upload-receiver", dbResult.Id);
  189. }
  190. }
  191. }
  192. var jsonString = JsonConvert.SerializeObject(dbResult);
  193. Response.ContentType = "application/json";
  194. Response.Write(jsonString);
  195. Response.End();
  196. }
  197. private void LoadPayoutPartner()
  198. {
  199. var countryId = Request.Form["country"];
  200. var paymentModeVal = Request.Form["paymentMode"];
  201. var sql = "EXEC proc_sendPageLoadData @flag='recAgentByRecModeAjaxagentAndCountry', @countryId = '" + GetStatic.ReadWebConfig("domesticCountryId", "") + "',@pCountryId='" + countryId + "',@param = '" + paymentModeVal + "',@agentId='" + GetStatic.GetAgentId() + "',@user = '" + GetStatic.GetUser() + "'";
  202. var payoutPartnerList = _sl.ExecuteDataTable(sql);
  203. var payoutPartnerDdl = Mapper.DataTableToClass<DropDownModel>(payoutPartnerList);
  204. var jsonString = JsonConvert.SerializeObject(payoutPartnerDdl);
  205. Response.ContentType = "application/json";
  206. Response.Write(jsonString);
  207. Response.End();
  208. }
  209. private void LoadPaymentModeDDL()
  210. {
  211. var country = Request.Form["country"];
  212. var sql = "EXEC proc_online_sendPageLoadData @flag='payoutMethods'";
  213. sql += ",@country=" + _sl.FilterString(country.Split('(')[0]);
  214. var paymentList = _sl.ExecuteDataTable(sql);
  215. var paymentDdl = Mapper.DataTableToClass<DropDownModel>(paymentList);
  216. var jsonString = JsonConvert.SerializeObject(paymentDdl);
  217. Response.ContentType = "application/json";
  218. Response.Write(jsonString);
  219. Response.End();
  220. }
  221. public static class Mapper
  222. {
  223. public static IList<T> DataTableToClass<T>(DataTable Table) where T : class, new()
  224. {
  225. var dataList = new List<T>(Table.Rows.Count);
  226. Type classType = typeof(T);
  227. IList<PropertyInfo> propertyList = classType.GetProperties();
  228. if (propertyList.Count == 0)
  229. return new List<T>();
  230. List<string> columnNames = Table.Columns.Cast<DataColumn>().Select(column => column.ColumnName).ToList();
  231. try
  232. {
  233. foreach (DataRow dataRow in Table.AsEnumerable().ToList())
  234. {
  235. var classObject = new T();
  236. foreach (PropertyInfo property in propertyList)
  237. {
  238. if (property != null && property.CanWrite)
  239. {
  240. if (columnNames.Contains(property.Name))
  241. {
  242. if (dataRow[property.Name] != System.DBNull.Value)
  243. {
  244. object propertyValue = System.Convert.ChangeType(
  245. dataRow[property.Name],
  246. property.PropertyType
  247. );
  248. property.SetValue(classObject, propertyValue, null);
  249. }
  250. }
  251. }
  252. }
  253. dataList.Add(classObject);
  254. }
  255. return dataList;
  256. }
  257. catch
  258. {
  259. return new List<T>();
  260. }
  261. }
  262. }
  263. private void Authenticate()
  264. {
  265. _sl.CheckAuthentication(ViewFunctionId);
  266. register.Enabled = _sl.HasRight(AddFunctionId);
  267. register.Visible = _sl.HasRight(AddFunctionId);
  268. }
  269. private void PopulateForm(string id)
  270. {
  271. var dr = _receiver.SelectReceiverInformationByReceiverId(GetStatic.GetUser(), id);
  272. if (null != dr)
  273. {
  274. string countryId = dr["countryId"].ToString();
  275. ddlCountry.SelectedValue = countryId;
  276. ddlBenificiaryType.SelectedValue = dr["receiverType"].ToString();
  277. txtEmail.Text = dr["email"].ToString();
  278. txtReceiverFName.Text = dr["firstName"].ToString();
  279. txtReceiverLName.Text = dr["lastName1"].ToString();
  280. txtReceiverMName.Text = dr["middleName"].ToString();
  281. txtReceiverAddress.Text = dr["address"].ToString();
  282. txtReceiverCity.Text = dr["city"].ToString();
  283. txtContactNo.Text = dr["homePhone"].ToString();
  284. txtSenderMobileNo.Text = dr["mobile"].ToString();
  285. ddlRelationship.SelectedItem.Text = dr["relationship"].ToString();
  286. if (ddlRelationship.SelectedItem.Text.ToUpper() == "OTHERS")
  287. {
  288. otherRelationDiv.Attributes.Add("style", "");
  289. otherRelationshipTextBox.Text = dr["otherRelationDesc"].ToString();
  290. }
  291. else
  292. {
  293. otherRelationDiv.Attributes.Add("style", "display: none;");
  294. }
  295. txtPlaceOfIssue.Text = dr["placeOfIssue"].ToString();
  296. ddlIdType.SelectedValue = dr["idType"].ToString();
  297. txtIdValue.Text = dr["idNumber"].ToString();
  298. ddlPurposeOfRemitance.SelectedValue = dr["purposeOfRemit"].ToString();
  299. purposeOther.Text = dr["otherPurpose"].ToString();
  300. DDLBankLocation.SelectedValue = dr["bankLocation"].ToString();
  301. txtBankName.Text = dr["bankName"].ToString();
  302. txtBenificaryAc.Text = dr["receiverAccountNo"].ToString();
  303. txtRemarks.Text = dr["remarks"].ToString();
  304. hideCustomerId.Value = dr["customerId"].ToString();
  305. hideBenificialId.Value = dr["receiverId"].ToString();
  306. hideMembershipId.Value = dr["membershipId"].ToString();
  307. ddlNativeCountry.SelectedValue = dr["NativeCountry"].ToString();
  308. LoadPaymentModeDDL(dr["paymentMode"].ToString());
  309. LoadPayoutPartnerDDL(dr["payOutPartner"].ToString());
  310. }
  311. }
  312. private void PopulateDDL()
  313. {
  314. _sl.SetDDL(ref ddlIdType, "EXEC proc_online_dropDownList @flag='idType',@user='" + GetStatic.GetUser() + "'", "valueId", "detailTitle", "", "Select..");
  315. _sl.SetDDL(ref ddlCountry, "EXEC proc_online_dropDownList @flag='allCountrylistWithCode',@user='" + GetStatic.GetUser() + "'", "countryId", "countryName", "", "Select..");
  316. _sl.SetDDL(ref ddlNativeCountry, "EXEC proc_online_dropDownList @flag='allCountrylist',@user='" + GetStatic.GetUser() + "'", "countryId", "countryName", "", "Select..");
  317. _sl.SetDDL(ref ddlRelationship, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=2100", "valueId", "detailTitle", "", "Select..");
  318. _sl.SetDDL(ref ddlPurposeOfRemitance, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=3800", "valueId", "detailTitle", "8060", "Select..");
  319. _sl.SetDDL(ref ddlBenificiaryType, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=4700", "valueId", "detailTitle", ddlBenificiaryType.SelectedValue, "");
  320. }
  321. protected void register_Click(object sender, EventArgs e)
  322. {
  323. string receiverId = GetStatic.ReadQueryString("receiverId", "");
  324. if (GetReceiverAddType().ToLower() != "s")
  325. {
  326. if (!_sl.HasRight(AddFunctionId))
  327. {
  328. GetStatic.AlertMessage(this, "You are not authorized to Add Receiver!");
  329. return;
  330. }
  331. }
  332. BenificiaryModel benificiar = new BenificiaryModel()
  333. {
  334. Country = ddlCountry.SelectedItem.Text,
  335. NativeCountry = ddlNativeCountry.SelectedValue,
  336. BenificiaryType = ddlBenificiaryType.SelectedValue,
  337. Email = txtEmail.Text,
  338. ReceiverFName = txtReceiverFName.Text,
  339. ReceiverMName = txtReceiverMName.Text,
  340. ReceiverLName = txtReceiverLName.Text,
  341. ReceiverAddress = txtReceiverAddress.Text,
  342. ReceiverCity = txtReceiverCity.Text,
  343. ContactNo = txtContactNo.Text,
  344. SenderMobileNo = txtSenderMobileNo.Text,
  345. Relationship = ddlRelationship.SelectedItem.Text,
  346. PlaceOfIssue = txtPlaceOfIssue.Text,
  347. TypeId = ddlIdType.SelectedValue,
  348. TypeValue = txtIdValue.Text,
  349. PurposeOfRemitance = ddlPurposeOfRemitance.SelectedItem.Text,
  350. OtherPurpose = purposeOther.Text,
  351. PaymentMode = ddlPaymentMode.SelectedValue,
  352. PayoutPatner = ddlPayoutPatner.SelectedValue,
  353. BankLocation = DDLBankLocation.SelectedValue,
  354. BankName = txtBankName.Text,
  355. BenificaryAc = txtBenificaryAc.Text,
  356. Remarks = txtRemarks.Text,
  357. OtherRelationDescription = otherRelationshipTextBox.Text,
  358. membershipId = hideMembershipId.Value,
  359. ReceiverId = hideBenificialId.Value,
  360. customerId = (hideCustomerId.Value != "" ? hideCustomerId.Value : null),
  361. Flag = (hideBenificialId.Value != "" ? "u" : "i")
  362. };
  363. var dbResult = _cd.UpdateBenificiarInformation(benificiar, GetStatic.GetUser());
  364. if (dbResult.ErrorCode == "0")
  365. {
  366. if (GetReceiverAddType().ToLower() == "s")
  367. {
  368. GetStatic.CallBackJs1(Page, "Call Back", "CallBack('" + dbResult.Id + "');");
  369. }
  370. else
  371. {
  372. //GetStatic.SetMessage(dbResult);
  373. Response.Redirect("List.aspx?customerId=" + benificiar.customerId);
  374. return;
  375. }
  376. }
  377. else
  378. {
  379. GetStatic.AlertMessage(this, dbResult.Msg);
  380. return;
  381. }
  382. }
  383. public string GetReceiverAddType()
  384. {
  385. return GetStatic.ReadQueryString("AddType", "");
  386. }
  387. private void LoadPaymentModeDDL(string paymentId)
  388. {
  389. _sl.SetDDL(ref ddlPaymentMode, "EXEC proc_online_sendPageLoadData @flag='payoutMethods',@country='" + ddlCountry.SelectedItem.Text + "'", "Key", "Value", paymentId, "");
  390. }
  391. private void LoadPaymentModeFromAjax()
  392. {
  393. var pCountry = Request.Form["pCountry"];
  394. var dt = _cd.LoadDataPaymentModeDdl(GetStatic.ReadWebConfig("domesticCountryId", ""), pCountry, "", null, "recModeByCountry", GetStatic.GetUser());
  395. Response.ContentType = "text/plain";
  396. var json = DataTableToJson(dt);
  397. Response.Write(json);
  398. Response.End();
  399. }
  400. public static string DataTableToJson(DataTable table)
  401. {
  402. if (table == null)
  403. return "";
  404. var list = new List<Dictionary<string, object>>();
  405. foreach (DataRow row in table.Rows)
  406. {
  407. var dict = new Dictionary<string, object>();
  408. foreach (DataColumn col in table.Columns)
  409. {
  410. dict[col.ColumnName] = string.IsNullOrEmpty(row[col].ToString()) ? "" : row[col];
  411. }
  412. list.Add(dict);
  413. }
  414. var serializer = new JavaScriptSerializer();
  415. string json = serializer.Serialize(list);
  416. return json;
  417. }
  418. protected void PopulatePaymentModeAndPayoutPartner()
  419. {
  420. var countryId = Request.Form["countryId"];
  421. if (!string.IsNullOrWhiteSpace(ddlCountry.SelectedItem.Text))
  422. {
  423. LoadPaymentModeDDL("");
  424. LoadPayoutPartnerDDL(ddlPayoutPatner.SelectedValue);
  425. }
  426. }
  427. protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs e)
  428. {
  429. if (!string.IsNullOrWhiteSpace(ddlCountry.SelectedItem.Text))
  430. {
  431. LoadPaymentModeDDL("");
  432. LoadPayoutPartnerDDL(ddlPayoutPatner.SelectedValue);
  433. }
  434. }
  435. public string GetFunctionIdByUserType(string functionIdAgent, string functionIdAdmin)
  436. {
  437. return (GetStatic.GetUserType() == "HO") ? functionIdAdmin : functionIdAgent;
  438. }
  439. protected void ddlPaymentMode_SelectedIndexChanged(object sender, EventArgs e)
  440. {
  441. if (ddlCountry.SelectedValue != "")
  442. {
  443. LoadPayoutPartnerDDL(ddlPayoutPatner.SelectedValue);
  444. }
  445. }
  446. private void LoadPayoutPartnerDDL(string partnerId)
  447. {
  448. _sl.SetDDL(ref ddlPayoutPatner, "EXEC proc_sendPageLoadData @flag='recAgentByRecModeAjaxagentAndCountry', @countryId = '" + GetStatic.ReadWebConfig("domesticCountryId", "") + "',@pCountryId='" + ddlCountry.SelectedValue + "',@param = '" + ddlPaymentMode.SelectedItem.Text + "',@agentId='" + GetStatic.GetAgentId() + "',@user = '" + GetStatic.GetUser() + "'", "bankId", "AGENTNAME", partnerId, "");
  449. if (ddlPaymentMode.SelectedValue == "2")
  450. receiverAccountNo.Attributes.Remove("hidden");
  451. }
  452. private void LoadCustomerInfo()
  453. {
  454. DataTable result = _cd.GetCustomerDetailsWitDT(getCustomerId(), GetStatic.GetUser());
  455. String jsonData = GetStatic.DataTableToJson(result);
  456. Response.Write(jsonData);
  457. Response.End();
  458. //if (result != null)
  459. //{
  460. // txtMembershipId.InnerText = result["membershipId"].ToString();
  461. // customerName.InnerText = result["firstName"].ToString() + ' ' + result["middleName"].ToString() + ' ' + result["lastName1"].ToString();
  462. //}
  463. }
  464. private string getCustomerId()
  465. {
  466. return Request.Form["customerId"];
  467. }
  468. private void GetCustomerAndReceiver()
  469. {
  470. DataSet result = _cd.GetCustomerAndReceiver(getCustomerId(), GetStatic.GetUser());
  471. String jsonData = JsonConvert.SerializeObject(result);
  472. Response.Write(jsonData);
  473. Response.End();
  474. }
  475. private void ViewTransactionReport()
  476. {
  477. ViewStatementModel _model = new ViewStatementModel()
  478. {
  479. fromDate = Request.Form["FromDate"],
  480. toDate = Request.Form["ToDate"],
  481. referralCode = GetStatic.GetUser()
  482. };
  483. List<TransactionStatementModel> result = _referralReports.ViewTransactionReport(_model);
  484. GetStatic.JsonResponse(result, this);
  485. }
  486. }
  487. }
  488. public class DropDownModel
  489. {
  490. public string Key { get; set; }
  491. public string Value { get; set; }
  492. public string bankId { get; set; }
  493. public string AGENTNAME { get; set; }
  494. public string agentId { get; set; }
  495. public string agentName { get; set; }
  496. }