コード例 #1
0
 public IHttpActionResult EndTask([FromBody] SPAProjectManager.Models.Tasks task)
 {
     try
     {
         SPAProjectManager.Entities.Tasks tk = new SPAProjectManager.Entities.Tasks
         {
             TaskID = task.TaskID
         };
         _taskBL.EndTask(tk);
         return(Ok());
     }
     catch (Exception)
     {
         return(InternalServerError());
     }
 }
コード例 #2
0
        public IHttpActionResult UpdateTask([FromBody] SPAProjectManager.Models.Tasks task)
        {
            try
            {
                SPAProjectManager.Entities.Tasks tk = new SPAProjectManager.Entities.Tasks
                {
                    TaskID       = task.TaskID,
                    Task         = task.Task,
                    ProjectID    = task.ProjectID,
                    Priority     = task.Priority,
                    ParentTaskID = task.ParentTaskID,
                    StartDate    = task.StartDate,
                    EndDate      = task.EndDate,
                    UserID       = task.UserID
                };

                _taskBL.UpdateTask(tk);
                return(Ok());
            }
            catch (Exception)
            {
                return(InternalServerError());
            }
        }