public BaseResponse SaveAssignWorkNote(DC_ReAllocateTaskModel list)
        {
            BaseResponse         response    = new BaseResponse();
            List <DC_TASKREMIND> newTaskList = new List <DC_TASKREMIND>();
            DateTime             now         = DateTime.Now;

            foreach (DC_TaskEmpModel t in list.empList)
            {
                DC_TASKREMIND task = new DC_TASKREMIND();
                task.ASSIGNEDBY   = SecurityHelper.CurrentPrincipal.EmpNo;
                task.ASSIGNEDNAME = SecurityHelper.CurrentPrincipal.EmpName;
                task.ORGID        = SecurityHelper.CurrentPrincipal.OrgId;
                task.ASSIGNEE     = t.EmpNo;
                task.ASSIGNNAME   = t.EmpName;
                task.NEWRECFLAG   = true;
                task.CONTENT      = list.Content;
                task.PERFORMDATE  = list.PerformDate;
                task.ASSIGNDATE   = now;
                newTaskList.Add(task);
            }
            unitOfWork.GetRepository <DC_TASKREMIND>().InsertRange(newTaskList);
            unitOfWork.Commit();
            return(response);
        }
        public IHttpActionResult Post(DC_ReAllocateTaskModel list)
        {
            var response = service.SaveAssignWorkNote(list);

            return(Ok(response));
        }
Exemple #3
0
        public IHttpActionResult Post(DC_ReAllocateTaskModel list)
        {
            var response = service.SaveAllocateTask(list.ID, list.empList);

            return(Ok(response));
        }