public void BindDepartment() { List <Department> deptList = _IDepartmentBll.GetAllDepartment(); deptList = Tools.RemoteUnAuthDeparetment(deptList, AuthType.HRMIS, _Operator, HrmisPowers.A405); _IStatisticsConditionView.DepartmentList = _IDepartmentBll.GenerateDeptListWithLittleParentDept(deptList); }
public void BindDepartment() { List <Department> deptList = Tools.RemoteUnAuthDeparetment( _ICompanyInvolveFacade.GetDepartmentByCompanyID(_IStatisticsConditionView.CompanyID), AuthType.HRMIS, _Operator, HrmisPowers.A607); _IStatisticsConditionView.DepartmentList = _IDepartmentBll.GenerateDeptListWithLittleParentDept(deptList); }
public void BindDepartment() { List <Department> deptList = Tools.RemoteUnAuthDeparetment(_IDepartmentBll.GetAllDepartment(), AuthType.HRMIS, _Operator, HrmisPowers.A507); if (!Tools.IsDeptListContainsDept(deptList, _Operator.Dept)) { deptList.Add(_Operator.Dept); } _IMonthAttendanceView.DepartmentList = _IDepartmentBll.GenerateDeptListWithLittleParentDept(deptList); }
private void Init() { List <ControlError> errors = new List <ControlError>(); ParametersModel parametersModel = new ParametersModel(); try { #region positon List <Position> positions = _IPositionBll.GetAllPosition(); parametersModel.PossitionList = new List <ParameterModel>(); parametersModel.PossitionList.Add(new ParameterModel() { PKID = "-1", Name = "" }); parametersModel.PossitionList.AddRange(positions.Select(x => new ParameterModel { PKID = x.Id.ToString(), Name = x.Name }).ToList()); #endregion #region department List <Department> deptList = Tools.RemoteUnAuthDeparetment(_IDepartmentBll.GetAllDepartment(), AuthType.HRMIS, _Operator, HrmisPowers.A401); if (!Tools.IsDeptListContainsDept(deptList, _Operator.Dept)) { deptList.Add(_Operator.Dept); } List <Department> departmentList = _IDepartmentBll.GenerateDeptListWithLittleParentDept(deptList); parametersModel.DepartmentList = new List <ParameterModel>(); if (Powers.HasAuth(_Operator.Auths, AuthType.HRMIS, HrmisPowers.A401)) { parametersModel.DepartmentList.Add(new ParameterModel() { PKID = "-1", Name = "" }); } parametersModel.DepartmentList.AddRange(departmentList.Select(x => new ParameterModel { PKID = x.Id.ToString(), Name = x.Name }).ToList()); #endregion #region type Dictionary <string, string> employeeTypeSource = EmployeeTypeUtility.GetAllEmployeeTypeEnum(); parametersModel.EmployeeTypeList = new List <ParameterModel>(); parametersModel.EmployeeTypeList.Add(new ParameterModel() { PKID = "-1", Name = "" }); parametersModel.EmployeeTypeList.AddRange(employeeTypeSource.Select(x => new ParameterModel { PKID = x.Key, Name = x.Value }).ToList()); #endregion #region GradesType List <GradesType> gradesTypes = GradesType.GetAll(); parametersModel.GradesTypeList = new List <ParameterModel>(); parametersModel.GradesTypeList.Add(new ParameterModel() { PKID = "-1", Name = "" }); parametersModel.GradesTypeList.AddRange(gradesTypes.Select(x => new ParameterModel { PKID = x.ID.ToString(), Name = x.Name }).ToList()); #endregion } catch (Exception ex) { errors.Add(new ControlError("lblMessage", ex.Message)); } _ResponseString = PageUtility.FomartItemString(parametersModel, errors); }