Exemplo n.º 1
0
        public ActionResult UpdateTask(Guid id, Guid userid)
        {
            UpdateTaskVM taskVM = new UpdateTaskVM();

            taskVM.Tasks  = taskService.GetTaskByID(id);
            taskVM.UserID = userid;
            return(View(taskVM));
        }
Exemplo n.º 2
0
 public ActionResult UpdateTask(UpdateTaskVM taskVM)
 {
     if (ModelState.IsValid)
     {
         taskService.UpdateTask(taskVM.Tasks);
         return(RedirectToAction("Index", new { id = taskVM.UserID }));
     }
     return(View(taskVM));
 }
Exemplo n.º 3
0
        public JsonResult UpdateTask(UpdateTaskVM vm)
        {
            try
            {
                Task task = _ts.GetById(vm.Id);
                task.Modified   = DateTime.Now;
                task.ModifiedBy = SessionManager.ActiveUser.Id;

                task.Name        = vm.Name;
                task.State       = vm.State;
                task.Description = vm.Description;

                _ts.Update(task);

                return(Json(new { Result = true, Message = "Görev Başarıyla Güncellendi" }));
            }
            catch (Exception ex)
            {
                return(Json(new { Result = false, ex.Message }));
            }
        }