コード例 #1
0
        public JsonResult GetDepartmentEmployees(int Id)
        {
            DepartmentEmployees de = new DepartmentEmployees(APIConnector);
            string temp            = de.GetEmployeesInDepartment(Id);

            return(Json(temp, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        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
ファイル: Department.cs プロジェクト: js102210/te_pair_work
 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
 }