public ActionResult SaveDepositType(DepositTypeEditModel model) { if (ModelState.IsValid) { depositTypeService.SaveOrUpdate(model); return RedirectToAction("DepositTypeGrid"); } else { return View("SaveEditDepositType", model); } }
public void SaveOrUpdate(DepositTypeEditModel model) { depositTypeRepository.SaveOrUpdate(Mapper.Map<DepositType>(model)); }
public ActionResult SaveEditDepositType(int depositTypeId = 0) { var depositEditModel = depositTypeService.GetDepositTypeEditModel(depositTypeId); if (depositEditModel == null) { depositEditModel = new DepositTypeEditModel(); } return View(depositEditModel); }