public IActionResult CompleteTask(int id) { var task = _taskBusiness.GetById(id); task.Data.Case = true; _taskBusiness.Update(task.Data); return(Json(null)); }
public IActionResult Put([FromBody] TaskVO task) { if (task == null) { return(BadRequest()); } return(new ObjectResult(_taskBusiness.Update(task))); }
public IActionResult PersonnelCreate(AssignStaffViewModel model) { var update = _taskBusiness.GetById(model.DutyId); update.Data.UserId = model.StaffId; var data = _taskBusiness.Update(update.Data); if (data.IsSuccess) { return(RedirectToAction("Index")); } return(View()); }
public IActionResult Update(TaskDto model) { if (ModelState.IsValid) { var data = _taskBusiness.Update(model); if (data.IsSuccess) { _toastNotification.AddSuccessToastMessage(data.Message, new ToastrOptions { Title = "Başarılı İşlem" }); return(RedirectToAction("Index")); } return(View(model)); } else { return(View(model)); } }
public async Task <IActionResult> UpdateTask([Required] TaskViewModel taskViewModel) { await _taskManagerBusiness.Update(taskViewModel); return(NoContent()); }