public ActionResult Delete(AbscentDeduction model) { try { // TODO: Add delete logic here work.AbscentDeductionRepository.Delete(model); work.Save(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Edit(AbscentDeduction model) { try { // TODO: Add update logic here if (ModelState.IsValid) { work.AbscentDeductionRepository.Update(model); work.Save(); } return(RedirectToAction("Index")); } catch { return(View()); } }
// // GET: /AbscentDeduction/Edit/5 public ActionResult Edit(int id) { AbscentDeduction theDeduction = work.AbscentDeductionRepository.GetByID(id); return(View(theDeduction)); }