public ActionResult Delete(int id) { var obj = TaxExemptEmployee.GetById(id); if (obj != null) { obj.Delete(); } return(new JsonResult() { Data = ResultModel.SuccessResult() }); }
public ActionResult Edit(int id, FormCollection collection) { try { // TODO: Add update logic here var model = TaxExemptEmployee.GetById(id); TryUpdateModel(model); model.SaveOrUpDate(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(FormCollection collection) { try { // TODO: Add insert logic here var model = new TaxExemptEmployee(); TryUpdateModel(model); model.Insert(); return(RedirectToAction("Index")); } catch { return(View()); } }
// GET: TaxExemptEmployee/Edit/5 public ActionResult Edit(int id) { return(View(TaxExemptEmployee.GetById(id))); }
// GET: TaxExemptEmployee public ActionResult Index() { return(View(TaxExemptEmployee.GetAll())); }