public static void ReAssignTask(ReAssignTasks raTasks) { using (var db = new Data.DBMEdition01Context()) { db.ApiReAssignTask(raTasks.LstTaskIDs, raTasks.AssignedToUserID, raTasks.CCUserIDs, raTasks.DueDate, raTasks.UpdatedByUserID); } }
public HttpResponseMessage ReAssignTask([FromBody] ReAssignTasks raTasks) { try { var lstPreviousTasks = TaskServices.GetTaskDetailsForSendingEmail(raTasks.LstTaskIDs.ToString(), raTasks.SiteID, raTasks.ProgramID, raTasks.UpdatedByUserID); TaskServices.ReAssignTask(raTasks); Task.Factory.StartNew(() => TaskServices.SendTaskReassignedEmail(raTasks.LstTaskIDs, raTasks.SiteID, raTasks.ProgramID, raTasks.UpdatedByUserID, lstPreviousTasks)); return(Request.CreateResponse(HttpStatusCode.OK)); } catch (Exception ex) { ex.Data.Add("HTTPReferrer", "JCRAPI/TaskInfo/ReAssignTask"); WebExceptionHelper.LogException(ex, null); return(Request.CreateResponse(HttpStatusCode.OK, string.Empty)); } }