示例#1
0
        public int UpdateEndTask(TaskModel task)
        {
            int result = 0;

            if (ModelState.IsValid)
            {
                taskMgrBusiness = new TaskManagerBusiness();
                result          = taskMgrBusiness.UpdateTask(task);
            }
            return(result);
        }
        public void updateTask([FromBody] TASK task)
        {
            TaskManagerBusiness TBL = new TaskManagerBusiness();

            TBL.UpdateTask(new TASK()
            {
                Task_id       = task.Task_id,
                TaskName      = task.TaskName,
                parent_id     = task.parent_id,
                Startdate     = Convert.ToDateTime(task.Startdate),
                Enddate       = Convert.ToDateTime(task.Enddate),
                task_priority = task.task_priority
            });
        }
示例#3
0
        public HttpResponseMessage UpdateTask([FromBody] TaskRequest request, int TaskId)
        {
            var tmBusiness = new TaskManagerBusiness();

            if (request == null)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, "Unable to process your request, Please enter a valid request."));
            }

            request.TaskId = TaskId;

            var response = tmBusiness.UpdateTask(request);

            if (response != null)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, response));
            }

            return(Request.CreateResponse(HttpStatusCode.BadRequest, "Unable to get task details,Please try again later"));
        }