public ActionResult AdminReasignTask([FromBody] AdminReasignTaskModel reasign)
        {
            var Rs = service.AdminReasignTask(reasign);

            if (Rs.status == false)
            {
                return(BadRequest(Rs));
            }
            return(Ok(Rs));
        }
Ejemplo n.º 2
0
        public IResponse AdminReasignTask(AdminReasignTaskModel reasign)
        {
            var selectedTask = UOW.Tasks.SingleOrDefault(t => t.Id == reasign.TaskId);

            if (selectedTask != null)
            {
                selectedTask.TaskStateId  = 1;
                selectedTask.ResourceId   = reasign.ResourceId;
                selectedTask.ApprovedByMe = false;
                selectedTask.StartDate    = reasign.NewStart;
                selectedTask.EndDate      = reasign.NewEnd;
                selectedTask.Comment      = reasign.Comment;
                UOW.Compelete();
            }
            else
            {
                response.status = false;
            }
            return(response);
        }