//Delete Account Type public ActionResult DeleteAccountType(FM_GeneralReference_BankAccount model, int AccountTypeID) { BankAccount_AccountType tblAccountType = (from e in TOSSDB.BankAccount_AccountType where e.AccountTypeID == AccountTypeID select e).FirstOrDefault(); TOSSDB.BankAccount_AccountType.Remove(tblAccountType); TOSSDB.SaveChanges(); return(RedirectToAction("Index")); }
//Get Update Account Type public ActionResult Get_UpdateAccountType(FM_GeneralReference_BankAccount model, int AccountTypeID) { BankAccount_AccountType tblAccountType = (from e in TOSSDB.BankAccount_AccountType where e.AccountTypeID == AccountTypeID select e).FirstOrDefault(); model.getAccountTypeColumns.AccountTypeID = tblAccountType.AccountTypeID; model.getAccountTypeColumns.AccountType = tblAccountType.AccountType; return(PartialView("BankAccounts/_UpdateAccountType", model)); }
//Update Account Type public ActionResult UpdateAccountType(FM_GeneralReference_BankAccount model) { BankAccount_AccountType tblAccountType = (from e in TOSSDB.BankAccount_AccountType where e.AccountTypeID == model.getAccountTypeColumns.AccountTypeID select e).FirstOrDefault(); tblAccountType.AccountType = model.getAccountTypeColumns.AccountType; TOSSDB.Entry(tblAccountType); TOSSDB.SaveChanges(); return(PartialView("BankAccounts/_UpdateAccountType", model)); }
//Add Account Type public JsonResult AddAccountType(FM_GeneralReference_BankAccount model) { BankAccount_AccountType tblAccountType = new BankAccount_AccountType(); tblAccountType.AccountType = GlobalFunction.ReturnEmptyString(model.getAccountTypeColumns.AccountType); TOSSDB.BankAccount_AccountType.Add(tblAccountType); TOSSDB.SaveChanges(); return(Json(tblAccountType)); }
public FM_Bank() { getBank = new List <BankTable>(); getBankColumns = new BankTable(); getBankList = new List <BankList>(); getAccountType = new List <BankAccount_AccountType>(); getAccountTypeColumns = new BankAccount_AccountType(); getAccountTypeList = new List <AccountTypeList>(); getBankAccount = new List <BankAccountTable>(); getBankAccountColumns = new BankAccountTable(); getBankAccountList = new List <BankAccountList>(); globalClasses = new GlobalClasses(); }