public async Task <ActionResult> UpdateBankInfo(BankInfoFormModel bm) { var bank_details = new Bank_Account_Info(); bank_details.Account_holder_id = bm.Id; bank_details.AccountName = bm.AccountName; bank_details.AccountNumber = bm.AcountNumber; bank_details.BankName = bm.BankName; bank_details.CreatedDate = DateTime.UtcNow.Date; db.bank_info.Add(bank_details); await db.SaveChangesAsync(); //await em.notify_Bank_Account_Changes() TempData["success"] = "Bank Information has been successfully added."; Bank_Account_Info bk = db.bank_info.Find(bank_details.Account_holder_id); if (bk != null) { var model = new BankInfoFormModel { AccountName = bk.AccountName, AcountNumber = bk.AccountNumber, BankName = bk.BankName, // SubcriberRefCode = bk.MyRefferalCode, Id = bk.Account_holder_id }; return(View(model)); } else { var model = new BankInfoFormModel { Id = bm.Id }; return(View(model)); } }
public ActionResult BankInfo(string ids) { string s = System.Configuration.ConfigurationManager.AppSettings["MaxLevel"]; ids = ids.Replace("$25", "/"); ids = ids.Replace("$24", "+"); string DecryptId = Cryptoclass.DecryptStringAES(ids, s); var usr = UserManager.FindById(DecryptId); if (usr == null) { return(HttpNotFound("Requested user not found")); } Bank_Account_Info bk = db.bank_info.SingleOrDefault(b => b.Account_holder_id == usr.Id); if (bk != null) { var model = new BankInfoFormModel { AccountName = bk.AccountName, AcountNumber = bk.AccountNumber, BankName = bk.BankName, // SubcriberRefCode = usr.MyRefferalCode, Id = bk.Account_holder_id }; return(View(model)); } else { var model = new BankInfoFormModel { Id = usr.Id }; return(View(model)); } }