public ActionResult Details(KYCModelDetail kycModel, string submitbutton, string OthersRemarks = "") { if (submitbutton.ToUpper() == "GOBACK") { return(RedirectToAction("Index", ControllerName)); } KYCModel kyc = new KYCModel(); kyc = kycModel.MapObject <KYCModel>(); LoadDropDownList(kyc); #region FileLocation string FileLocation; string usertype = kycModel.AgentType; if (usertype.ToLower() == "distributor") { FileLocation = "/Content/userupload/Distributor/kyc/"; } else if (usertype.ToLower() == "sub-distributor") { FileLocation = "/Content/userupload/SubDistributor/kyc/"; } else if (usertype.ToLower() == "walletuser") { FileLocation = "/Content/userupload/Walletuser/kyc/"; } else if (usertype.ToLower() == "merchant") { FileLocation = "/Content/userupload/Merchant/kyc/"; } else if (usertype.ToLower() == "agent") { FileLocation = "/Content/userupload/Agent/kyc/"; } else if (usertype.ToLower() == "sub-agent") { FileLocation = "/Content/userupload/SubAgent/kyc/"; } else { FileLocation = "/Content/userupload/"; } ViewBag.FileLocation = FileLocation; #endregion if (String.IsNullOrEmpty(kycModel.AgentId)) { return(RedirectToAction("Index", ControllerName)); } string status = ""; if (submitbutton.ToUpper() == "REJECT") { status = "r"; if (kycModel.Remarks.ToUpper().Equals("OTHERS")) { if (OthersRemarks == "") { ModelState.AddModelError("OtherRemarks", "Other Remarks is Required"); return(View(kycModel)); } else { kycModel.Remarks = "Others::" + OthersRemarks; } } RejectValidation(); } else if (submitbutton.ToUpper() == "APPROVE") { status = "a"; ModelState.Remove(("Remarks")); } else { return(RedirectToAction("Index", ControllerName)); } kycModel.ActionUser = Session["UserName"].ToString(); kycModel.AgentId = kycModel.AgentId.DecryptParameter(); KYCCommon kycCommon = kycModel.MapObject <KYCCommon>(); CommonDbResponse dbResponse = _kyc.UpadateKycDetails(kycCommon, status); dbResponse.SetMessageInTempData(this); return(RedirectToAction("Index")); }
// GET: KYC/Details/id="1003" public ActionResult Details(string agentid = "") { KYCCommon kycCommon = new KYCCommon(); KYCModelDetail kycModel = new KYCModelDetail(); var ID = agentid.DecryptParameter(); if (String.IsNullOrEmpty(ID)) { return(RedirectToAction("Index", ControllerName)); } if (!String.IsNullOrEmpty(ID)) { kycCommon = _kyc.AgentKycInfo(ID); } //kycCommon.AgentId = ID.ToString(); kycModel = kycCommon.MapObject <KYCModelDetail>(); kycModel.Country = string.IsNullOrEmpty(kycModel.Country) ? "Nepal" : kycModel.Country; kycModel.Nationality = string.IsNullOrEmpty(kycModel.Nationality) ? "Nepali" : kycModel.Nationality; var pprovince = LoadDropdownList("province") as Dictionary <string, string>; kycModel.PProvince = pprovince.ContainsKey(kycModel.PProvince) ? pprovince.FirstOrDefault(x => x.Key == kycModel.PProvince).Value : kycModel.PProvince; kycModel.TProvince = pprovince.ContainsKey(kycModel.TProvince) ? pprovince.FirstOrDefault(x => x.Key == kycModel.TProvince).Value : kycModel.TProvince; ViewBag.AgentId = ID; KYCModel kyc = new KYCModel(); kyc = kycModel.MapObject <KYCModel>(); ViewBag.RemarksList = ApplicationUtilities.SetDDLValue(LoadDropdownList("remarks") as Dictionary <string, string>, kycModel.Remarks, "--Remarks--"); //LoadDropDownList(kyc); #region FileLocation string FileLocation; string usertype = kycModel.AgentType; if (usertype.ToLower() == "distributor") { FileLocation = "/Content/userupload/Distributor/kyc/"; } else if (usertype.ToLower() == "sub-distributor") { FileLocation = "/Content/userupload/SubDistributor/kyc/"; } else if (usertype.ToLower() == "walletuser") { FileLocation = "/Content/userupload/Walletuser/kyc/"; } else if (usertype.ToLower() == "merchant") { FileLocation = "/Content/userupload/Merchant/kyc/"; } else if (usertype.ToLower() == "agent") { FileLocation = "/Content/userupload/Agent/kyc/"; } else if (usertype.ToLower() == "sub-agent") { FileLocation = "/Content/userupload/SubAgent/kyc/"; } else { FileLocation = "/Content/userupload/"; } ViewBag.FileLocation = FileLocation; #endregion return(View(kycModel)); }