public void UpdateTask(Task task) { task.TaskID = DataProvider.Instance().ExecuteScalar<int>("MFM_UpdateTask", task.TaskID, task.TaskName, task.TaskDescription, task.IsComplete ); }
public void AddTask(Task task) { task.TaskID = DataProvider.Instance().ExecuteScalar<int>("MFM_AddTask", task.TaskName, task.TaskDescription, task.IsComplete, task.ModuleID, task.UserID ); }
public HttpResponseMessage DeleteTask(TaskToDeleteDTO DTO) { try { var task = new Task() { TaskID = DTO.TTD_TaskID }; TaskController tc = new TaskController(); tc.DeleteTask(task.TaskID); return Request.CreateResponse(HttpStatusCode.OK); } catch (Exception exc) { return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, exc); } }
public HttpResponseMessage AddTask(TaskToCreateDTO DTO) { try { var task = new Task() { TaskName = DTO.TTC_TaskName, TaskDescription = DTO.TTC_TaskDescription, IsComplete = DTO.TTC_IsComplete, ModuleID = DTO.TTC_ModuleID, UserID = DTO.TTC_UserID }; TaskController tc = new TaskController(); tc.AddTask(task); return Request.CreateResponse(HttpStatusCode.OK); } catch (Exception exc) { return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, exc); } }