//Delete Memo Account public ActionResult DeleteAccountCode(FM_GeneralReference_MemoAccountClass model, int AccountCodeID) { MemoAccClass_AccountCode tblMemoAccount = (from e in TOSSDB.MemoAccClass_AccountCode where e.AccountCodeID == AccountCodeID select e).FirstOrDefault(); TOSSDB.MemoAccClass_AccountCode.Remove(tblMemoAccount); TOSSDB.SaveChanges(); return(RedirectToAction("Index")); }
//Get Update Memo Account public ActionResult Get_UpdateAccountCode(FM_GeneralReference_MemoAccountClass model, int AccountCodeID) { MemoAccClass_AccountCode tblMemoAccount = (from e in TOSSDB.MemoAccClass_AccountCode where e.AccountCodeID == AccountCodeID select e).FirstOrDefault(); model.getMMAccountTitleColumns.AccountCodeID = tblMemoAccount.AccountCodeID; model.getMMAccountTitleColumns.AccountTitle = tblMemoAccount.AccountTitle; model.getMMAccountTitleColumns.AccountCode = tblMemoAccount.AccountCode; return(PartialView("MemoAccountClass/AccountCode/_UpdateAccountCode", model)); }
//Update Memo Account public ActionResult UpdateAccountCode(FM_GeneralReference_MemoAccountClass model) { MemoAccClass_AccountCode tblMemoAccount = (from e in TOSSDB.MemoAccClass_AccountCode where e.AccountCodeID == model.getMMAccountTitleColumns.AccountCodeID select e).FirstOrDefault(); tblMemoAccount.AccountCode = model.getMMAccountTitleColumns.AccountCode; tblMemoAccount.AccountTitle = model.getMMAccountTitleColumns.AccountTitle; TOSSDB.Entry(tblMemoAccount); TOSSDB.SaveChanges(); return(PartialView("MemoAccountClass/AccountCode/_UpdateAccountCode", model)); }
//Add Memo Account Classification public JsonResult AddAccountCode(FM_GeneralReference_MemoAccountClass model) { MemoAccClass_AccountCode tblMemoAccountCode = new MemoAccClass_AccountCode(); tblMemoAccountCode.AccountTitle = model.getMMAccountTitleColumns.AccountTitle; tblMemoAccountCode.AccountCode = model.getMMAccountTitleColumns.AccountCode; TOSSDB.MemoAccClass_AccountCode.Add(tblMemoAccountCode); TOSSDB.SaveChanges(); return(Json(tblMemoAccountCode)); }
public FM_GeneralReference_MemoAccountClass() { //Memo getMemo = new List <MemoAccClassTable>(); getMemoColumns = new MemoAccClassTable(); getMemoAccList = new List <MemoAccList>(); //Account Title getMMAccountTitle = new List <MemoAccClass_AccountCode>(); getMMAccountTitleColumns = new MemoAccClass_AccountCode(); getMMAccountTitleList = new List <MMAccountTitleList>(); //Revision Year getMMRevisionYr = new List <MemoAccClass_RevisionYr>(); getMMRevisionYrColumns = new MemoAccClass_RevisionYr(); getMMRevisionYrList = new List <MMRevisionYearList>(); }