public JsonResult GetDepartmentEmployees(int Id)
        {
            DepartmentEmployees de = new DepartmentEmployees(APIConnector);
            string temp            = de.GetEmployeesInDepartment(Id);

            return(Json(temp, JsonRequestBehavior.AllowGet));
        }
        public async Task <StatusData <string> > UpsertCompanyDepartmentEmployee(CompanyDepartmentEmployeeRequest request, int mode, SystemSession session)
        {
            var serviceRequest = new DepartmentEmployees
            {
                UserId       = session.UserId,
                Mode         = mode,
                DepartmentId = request.DepartmentId,
                EmployeeIds  = string.Join(",", request.EmployeeIds)
            };
            var response = (await Task.Factory.StartNew(() => Client.UserService.upsertDepartmentEmployees(serviceRequest, session.GetSession())).ConfigureAwait(false)).GetStatusData <string>();

            return(response);
        }
示例#3
0
 public void TransferEmployeeIn(Employee employee)
 {
     employee.Department.DepartmentEmployees.Remove(employee); //remove employee from old department's list
     employee.Department = this;                               //assign employee's department to this one
     DepartmentEmployees.Add(employee);                        //add employee to this department's list
 }