Ejemplo n.º 1
0
        public HttpResponseMessage EndTaskById([FromUri] int TaskId)
        {
            var tmBusiness = new TaskManagerBusiness();

            if (TaskId == 0)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, "Please enter a valid task id"));
            }

            var response = tmBusiness.EndTask(TaskId);

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

            return(Request.CreateResponse(HttpStatusCode.BadRequest, "Unable to get TaskId details,Please try again later"));
        }
        public void EndTask(int id)
        {
            TaskManagerBusiness TBL = new TaskManagerBusiness();

            TBL.EndTask(id);
        }