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