public IActionResult Create(AccountLedgerGroup accountLedgerGroup) { if (ModelState.IsValid) { _work.AccountLedgerGroup.Add(accountLedgerGroup); bool isSaved = _work.Save() > 0; if (isSaved) { return(Json(true)); } } return(Json(false)); }
public IActionResult Edit(AccountLedgerGroup ledgerGroup) { if (ModelState.IsValid) { var accountLedgerGroup = _work.AccountLedgerGroup.Get(ledgerGroup.Id); accountLedgerGroup.AccountLedgerGroupName = ledgerGroup.AccountLedgerGroupName; _work.AccountLedgerGroup.Update(accountLedgerGroup); bool isSaved = _work.Save() > 0; if (isSaved) { return(Json(true)); } } return(PartialView("_AccountLedgerGroupEditView")); }