public SavingDeposit Update(SavingDeposit savingDeposit) { savingDepositRepository.Update(savingDeposit); return savingDeposit; }
public ActionResult SaveSavingDeposit(SavingDeposit savingDeposit) { if (savingDeposit != null) { if (savingDeposit.Id != null && savingDeposit.Id != Guid.Empty) { //case edit savingDepositService.Update(savingDeposit); return Json(true); } else { savingDeposit.Id = Guid.NewGuid(); //case insert savingDepositService.Add(savingDeposit); return Json(true); } } return Json(false); }
public SavingDeposit Add(SavingDeposit savingDeposit) { savingDepositRepository.Add(savingDeposit); return savingDeposit; }