public JsonResult UpdatedBankDetails(string clientcode) { MainApplication model = new MainApplication() { ClientBankDetails = new ClientBankDetail(), }; var bankdetaillist = _ClientBankDetailService.GetDetailsFromBank(clientcode); string namebranch = string.Empty; List <ClientBankDetail> clbanklist = new List <ClientBankDetail>(); foreach (var bankdetail in bankdetaillist) { ClientBankDetail clbank = new ClientBankDetail(); namebranch = bankdetail.BankName + ", " + bankdetail.Branch; clbank.BankName = namebranch; clbank.BankId = bankdetail.BankId; clbanklist.Add(clbank); namebranch = string.Empty; } model.ClientBankDetailList = clbanklist; var banknamelist = model.ClientBankDetailList.Select(m => new SelectListItem() { Text = m.BankName, Value = m.BankId.ToString(), }); return(Json(banknamelist, JsonRequestBehavior.AllowGet)); }
public JsonResult BankPopUpPage(string bankname, string branch, string clientcode, string bankifscno, string bankaddress, string accountno, string accounttype, string micr) { ClientBankDetail clientbankdetials = new ClientBankDetail(); clientbankdetials.BankName = bankname; clientbankdetials.Branch = branch; clientbankdetials.ClientCode = clientcode; clientbankdetials.BankIFSCNo = bankifscno; clientbankdetials.BankAddress = bankaddress; clientbankdetials.AccountNo = accountno; clientbankdetials.AccountType = accounttype; if (micr == "") { clientbankdetials.MICRCode = null; } else { clientbankdetials.MICRCode = micr; } clientbankdetials.Status = "Active"; clientbankdetials.ModifiedOn = DateTime.Now; _ClientBankDetailService.CreateBankDetails(clientbankdetials); return(Json("success", JsonRequestBehavior.AllowGet)); }
public ActionResult CreateBankDetail(string bankname, string branch, string clientcode, string bankifscno, string bankaddress, string accountno, string accounttype, string micr) { List <ClientBankDetail> ClientBankList = new List <ClientBankDetail>(); string LogedinUSerName = HttpContext.Session["UserName"].ToString(); if (TempData["ClientBankList" + LogedinUSerName] != null) { var clientbanklist = TempData["ClientBankList" + LogedinUSerName] as IEnumerable <ClientBankDetail>; foreach (var list in clientbanklist) { ClientBankList.Add(list); } } ClientBankDetail BankDetails = new ClientBankDetail(); BankDetails.BankName = bankname; BankDetails.Branch = branch; BankDetails.ClientCode = clientcode; BankDetails.BankIFSCNo = bankifscno; BankDetails.BankAddress = bankaddress; BankDetails.AccountNo = accountno; BankDetails.AccountType = accounttype; BankDetails.MICRCode = micr; BankDetails.Status = "Active"; BankDetails.ModifiedOn = DateTime.Now; ClientBankList.Add(BankDetails); TempData["ClientBankList" + LogedinUSerName] = ClientBankList; return(RedirectToAction("CreateBankDetail")); }
public ActionResult EditPartial(int id) { MainApplication model = new MainApplication() { ClientBankDetails = new ClientBankDetail(), }; model.ClientDetails = _ClientMasterService.getClientById(id); model.ClientDetails.CountryList = _CountryService.getallcountries(); var countryData = _CountryService.getidbyname(model.ClientDetails.Country); model.ClientDetails.StateList = _StateService.GetStateByCountry(countryData); int stateid = _StateService.GetStateIdByName(model.ClientDetails.State); model.ClientDetails.DistrictList = _DistrictService.getDistrictbyState(stateid); var bankdetaillist = _ClientBankDetailService.GetDetailsFromBank(model.ClientDetails.ClientCode); string namebranch = string.Empty; List <ClientBankDetail> clbanklist = new List <ClientBankDetail>(); foreach (var bankdetail in bankdetaillist) { ClientBankDetail clbank = new ClientBankDetail(); namebranch = bankdetail.BankName + ", " + bankdetail.Branch; clbank.BankName = namebranch; clbank.BankId = bankdetail.BankId; clbanklist.Add(clbank); namebranch = string.Empty; } model.ClientBankDetailList = clbanklist; return(View(model)); }
public ActionResult BankPopUpPage(string clientcode) { DatabaseName = CompanyName + " " + FinancialYear; ClientBankDetail clientbankdetials = new ClientBankDetail(); clientbankdetials.ClientCode = clientcode; clientbankdetials.BankNameList = _BankNameService.getAllBankNames(); return(View(clientbankdetials)); }
public void UpdateBankDetails(ClientBankDetail clientbankdetail) { _ClientBankDetailRepository.Update(clientbankdetail); _UnitOfWork.Commit(); }