Exemplo n.º 1
0
        public ActionResult AddTask(TaskModel model)
        {
            _tasksRepo.Add(new Task
                {
                    Name = model.Name,
                    Description = model.Description,
                    StartDate = model.StartDate,
                    Duration = model.Duration,
                    Status = model.Status
                });

            return RedirectToAction("ShowTable");
        }
Exemplo n.º 2
0
 public ActionResult EditStatus(TaskModel model)
 {
     try
     {
         var task = _tasksRepo.FindBy(t => t.Id == model.Id);
         task.Status = model.Status;
         _tasksRepo.Update(task);
         return Json(new {success = true, results = "ok"});
     }
     catch (Exception e)
     {
         return Json(new {success = false, results = e.Message});
     }
 }