public ActionResult Edit(int id, TaskModal modal) { if (ModelState.IsValid) { task.Edit(modal.Id, modal); return(RedirectToAction("ViewAll")); } return(View()); }
public ActionResult Add(TaskModal modal) { if (ModelState.IsValid) { int add = task.AddTask(modal); return(RedirectToAction("ViewAll")); } ModelState.Clear(); return(View()); }
public ActionResult Delete(int id, TaskModal modal) { if (ModelState.IsValid) { task.Delete(modal.Id, modal); return(RedirectToAction("ViewAll")); } ModelState.Clear(); return(View()); }