public ActionResult Kyc() { string UserId = Session["UserName"].ToString(); string AgentID = _walletUserBusiness.UserInfo(UserId).AgentId.ToString(); KYCCommon kycCommon = new KYCCommon(); KYCModel kycModel = new KYCModel(); if (!String.IsNullOrEmpty(AgentID)) { kycCommon = _kyc.AgentKycInfo(AgentID); } //kycCommon.AgentId = ID.ToString(); kycModel = kycCommon.MapObject <KYCModel>(); kycModel.Country = string.IsNullOrEmpty(kycModel.Country) ? "Nepal" : kycModel.Country; kycModel.Nationality = string.IsNullOrEmpty(kycModel.Nationality) ? "Nepali" : kycModel.Nationality; LoadDropDownList(kycModel); #region FileLocation string FileLocation; string usertype = Session["UserType"].ToString(); 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/"; } #endregion return(View(kycModel)); }
// GET: KYC/Details/id="1003" public ActionResult Details(string agentid = "") { KYCCommon kycCommon = new KYCCommon(); KYCModel kycModel = new KYCModel(); var ID = agentid.DecryptParameter(); //if (Session["UserName"] == null) //{ // return RedirectToAction("LogOff", "Home"); //} if (String.IsNullOrEmpty(ID)) { return(RedirectToAction("Index", ControllerName)); } if (!String.IsNullOrEmpty(ID)) { kycCommon = _kyc.AgentKycInfo(ID); } //kycCommon.AgentId = ID.ToString(); kycModel = kycCommon.MapObject <KYCModel>(); kycModel.Country = string.IsNullOrEmpty(kycModel.Country) ? "Nepal" : kycModel.Country; kycModel.Nationality = string.IsNullOrEmpty(kycModel.Nationality) ? "Nepali" : kycModel.Nationality; ViewBag.AgentId = ID; LoadDropDownList(kycModel); #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)); }
// 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)); }