public ActionResult Edit(Task task, FormCollection f) { var reason = task.State == "Closed" ? (f["Reason"] ?? "").ToString() : ""; repository.UpdateTask(task, reason); return RedirectToAction("Index"); }
public ActionResult Edit(Task task, FormCollection f) { var taskReason = (f["Reason"] ?? "").ToString(); var bugReason = (f["BugReason"] ?? "").ToString(); if (ModelState.IsValid) { repository.UpdateTask(task, taskReason, bugReason); } return RedirectToAction("Index"); }
public bool CreateBugTask(Task task) { return Malako.CreateBugTask(task.ID, task.AssignedTo, task.Title); }
public void UpdateTask(Task task, string taskReason, string bugReason) { Malako.UpdateHours(task.ID, task.Hours, task.State, task.Comment, taskReason, bugReason); }
public ActionResult Index(Task task) { repository.CreateBugTask(task); return RedirectToAction("Index"); }
public static ValidationResult Validation(Task task) { bool isValid = true; string message = string.Empty; if (task.State == "Closed" && string.IsNullOrEmpty(task.Comment)) { isValid = false; message = "Favor inserir um comentario para finalizar a tarefa"; } if (isValid) { return ValidationResult.Success; } else { return new ValidationResult(message); } }
public void UpdateTask(Task task, string reason) { Malako.UpdateHours(task.ID, task.Hours, task.State, task.Comment, reason); }
public void UpdateTask(Task task, string s, string reason) { }
public bool CreateBugTask(Task task) { throw new NotImplementedException(); }
public void CreateBugTask(Task task) { repository.CreateBugTask(task); }