private void BindTypesSource() { _ItsView.EmployeeTypeSource = EmployeeTypeUtility.GetAllEmployeeTypeEnum(); _ItsView.EducationalBackgroundSource = EducationalBackground.AllEducationalBackgrounds; _ItsView.PoliticalAffiliationSource = PoliticalAffiliation.AllPoliticalAffiliations; _ItsView.GenderSource = Gender.AllGenders; _ItsView.MaritalStatusSource = MaritalStatus.GetAllMaritalStatus(); _ItsView.CountryNationalitySource = _ItsNationalityFacade.GetNationalityByCondition(-1, ""); }
private void GetData() { List <Department> departmentList = _Department.GetAllDepartment(); _ItsView.DepartmentSource = Tools.RemoteUnAuthDeparetment(departmentList, AuthType.HRMIS, _LoginUser, HrmisPowers.A604); _ItsView.PositionSource = _Position.GetAllPosition(); _ItsView.EmployeeTypeSource = EmployeeTypeUtility.GetAllEmployeeTypeEnum(); }
private void GetData() { List <Department> deptList = _IDepartmentBll.GetAllDepartment(); _View.DepartmentSource = Tools.RemoteUnAuthDeparetment(deptList, AuthType.HRMIS, LoginUser, HrmisPowers.A703); _View.PositionSource = _IPositionBll.GetAllPosition(); _View.EmployeeTypeSource = EmployeeTypeUtility.GetAllEmployeeTypeEnum(); _View.EmployeeType = EmployeeTypeEnum.NormalEmployee; }
private void GetData() { List <Department> deptList = _IDepartmentBll.GetAllDepartment(); _View.DepartmentSource = Tools.RemoteUnAuthDeparetment(deptList, AuthType.HRMIS, _Operator, HrmisPowers.A401); _View.PositionSource = _IPositionBll.GetAllPosition(); _View.GradesSource = GradesType.GetAll(); _View.EmployeeTypeSource = EmployeeTypeUtility.GetAllEmployeeTypeEnum(); _View.EmployeeType = EmployeeTypeEnum.All; }
private void GetData() { List <Department> deptList = _IDepartmentBll.GetAllDepartment(); _View.DepartmentSource = Tools.RemoteUnAuthDeparetment(deptList, AuthType.HRMIS, _Operator, HrmisPowers.A605); _View.PositionSource = _IPositionBll.GetAllPosition(); _View.EmployeeTypeSource = EmployeeTypeUtility.GetAllEmployeeTypeEnum(); _View.EmployeeType = EmployeeTypeEnum.All; _View.CompanySource = _ICompanyFacade.GetAllCompanyHaveEmployee(_Operator, HrmisPowers.A605); }
private void InitEmployeeTypeSource() { Dictionary <string, string> employeeTypeSource = EmployeeTypeUtility.GetAllEmployeeTypeEnum(); listEmployeeType.Items.Clear(); ListItem itemAll = new ListItem(string.Empty, "-1", true); listEmployeeType.Items.Add(itemAll); foreach (KeyValuePair <string, string> pair in employeeTypeSource) { ListItem item = new ListItem(pair.Value, pair.Key, true); listEmployeeType.Items.Add(item); } }
public void InitView(bool ispostback) { _View.ResultMsg = string.Empty; if (!ispostback) { List <Department> deptList = _IDepartmentBll.GetAllDepartment(); _View.DepartmentSource = Tools.RemoteUnAuthDeparetment(deptList, AuthType.HRMIS, _Operator, HrmisPowers.A405); _View.PositionSource = _IPositionBll.GetAllPosition(); _View.EmployeeTypeSource = EmployeeTypeUtility.GetAllEmployeeTypeEnum(); _View.EmployeeType = EmployeeTypeEnum.All; SearchEvent(); } AttachViewEvent(); }
public void InitView(bool ispostback) { _ItsView.Message = string.Empty; _ItsView.btnGoToSetEmployeeSalaryEvent += btnGoToSetEmployeeSalaryEvent; _ItsView.GoToSetEmployeeSalaryPage += GoToSetEmployeeSalaryPage; if (!ispostback) { _ItsView.SalaryTime = new HrmisUtility().CurrenMonthStartTime().ToShortDateString(); _ItsView.CompanySource = _ICompanyFacade.GetAllCompanyHaveEmployee(_AccountOperator, HrmisPowers.A606); CompanyIndexChange(); _ItsView.EmployeeTypeSource = EmployeeTypeUtility.GetAllEmployeeTypeEnum(); _ItsView.AccountSetSource = _IAccountSetFacade.GetAccountSetByCondition(string.Empty); } _ItsView.SalaryTimeDisplay = new HrmisUtility().StartMonthByYearMonth(Convert.ToDateTime(_ItsView.SalaryTime)).ToShortDateString() + "---" + new HrmisUtility().EndMonthByYearMonth(Convert.ToDateTime(_ItsView.SalaryTime)).ToShortDateString(); }
private bool VaildateEmployeeType() { Dictionary <string, string> employeeType = EmployeeTypeUtility.GetAllEmployeeTypeEnum(); foreach (KeyValuePair <string, string> pair in employeeType) { if (pair.Key == _ItsView.EmployeeType) { _ItsView.EmployeeTypeMessage = string.Empty; return(true); } } _ItsView.EmployeeType = EmployeeTypeEnum.NormalEmployee.ToString(); _ItsView.EmployeeTypeMessage = EmployeePresenterUtilitys._ErrorType; return(false); }
/// <summary> /// 绑定 /// </summary> /// <returns></returns> public string ToBind() { string result = String.Empty; if (ContractFieldPara.ContractType.Id.ToString() == _FieldParaBaseId) { List <ContractType> all = new GetContractType().GetContractTypeByCondition(-1, ""); foreach (ContractType item in all) { result += string.IsNullOrEmpty(result) ? item.ContractTypeName : "\n" + item.ContractTypeName; } } if (ContractFieldPara.PositionGrade.Id.ToString() == _FieldParaBaseId) { List <PositionGrade> all = BllInstance.PositionBllInstance.GetAllPositionGrade(); foreach (PositionGrade item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (ContractFieldPara.EmployeeType.Id.ToString() == _FieldParaBaseId) { Dictionary <string, string> AllEmployeeType = EmployeeTypeUtility.GetAllEmployeeTypeEnum(); foreach (KeyValuePair <string, string> item in AllEmployeeType) { result += string.IsNullOrEmpty(result) ? item.Value : "\n" + item.Value; } } if (ContractFieldPara.Position.Id.ToString() == _FieldParaBaseId) { IPositionBll _IPositionBll = BllInstance.PositionBllInstance; List <Position> all = _IPositionBll.GetAllPosition(); foreach (Position item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (ContractFieldPara.Department.Id.ToString() == _FieldParaBaseId) { IDepartmentBll _IDepartmentBll = BllInstance.DepartmentBllInstance; List <Department> all = _IDepartmentBll.GetAllDepartment(); all = Tools.RemoteUnAuthDeparetment(all, AuthType.HRMIS, _OperatorAccount, HrmisPowers.A402); foreach (Department item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (ContractFieldPara.Company.Id.ToString() == _FieldParaBaseId) { GetCompanyInvolve _GetCompanyInvolve = new GetCompanyInvolve(); List <Department> all = _GetCompanyInvolve.GetAllCompanyHaveEmployee(); foreach (Department item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (ContractFieldPara.WorkType.Id.ToString() == _FieldParaBaseId) { List <WorkType> all = WorkType.GetAll(); foreach (WorkType item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } return(result); }
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); }
/// <summary> /// 绑定 /// </summary> /// <returns></returns> public string ToBind() { string result = String.Empty; if (EmployeeFieldPara.Skill.Id.ToString() == _FieldParaBaseId) { List <Skill> all = new GetSkill().GetSkillByCondition("", -1); foreach (Skill item in all) { result += string.IsNullOrEmpty(result) ? item.SkillName : "\n" + item.SkillName; } } if (EmployeeFieldPara.PositionGrade.Id.ToString() == _FieldParaBaseId) { List <PositionGrade> all = BllInstance.PositionBllInstance.GetAllPositionGrade(); foreach (PositionGrade item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.EmployeeType.Id.ToString() == _FieldParaBaseId) { Dictionary <string, string> AllEmployeeType = EmployeeTypeUtility.GetAllEmployeeTypeEnum(); foreach (KeyValuePair <string, string> item in AllEmployeeType) { result += string.IsNullOrEmpty(result) ? item.Value : "\n" + item.Value; } } if (EmployeeFieldPara.Position.Id.ToString() == _FieldParaBaseId) { IPositionBll _IPositionBll = BllInstance.PositionBllInstance; List <Position> all = _IPositionBll.GetAllPosition(); foreach (Position item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.Grades.Id.ToString() == _FieldParaBaseId) { var all = GradesType.GetAll(); foreach (var item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.Department.Id.ToString() == _FieldParaBaseId) { IDepartmentBll _IDepartmentBll = BllInstance.DepartmentBllInstance; List <Department> all = _IDepartmentBll.GetAllDepartment(); all = Tools.RemoteUnAuthDeparetment(all, AuthType.HRMIS, _OperatorAccount, HrmisPowers.A401); foreach (Department item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.Company.Id.ToString() == _FieldParaBaseId) { GetCompanyInvolve _GetCompanyInvolve = new GetCompanyInvolve(); List <Department> all = _GetCompanyInvolve.GetAllCompanyHaveEmployee(); foreach (Department item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.Gender.Id.ToString() == _FieldParaBaseId) { List <Gender> all = Gender.AllGenders; foreach (Gender item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.DimissionReasonType.Id.ToString() == _FieldParaBaseId) { List <DimissionReasonType> all = DimissionReasonType.GetAll(); foreach (DimissionReasonType item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.DiyProcessApplicationTypeOut.Id.ToString() == _FieldParaBaseId) { GetDiyProcess _GetDiyProcess = new GetDiyProcess(); List <DiyProcess> all = _GetDiyProcess.GetDiyProcessByProcessType(ProcessType.ApplicationTypeOut.Id); foreach (DiyProcess item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.DiyProcessApplicationTypeOverTime.Id.ToString() == _FieldParaBaseId) { GetDiyProcess _GetDiyProcess = new GetDiyProcess(); List <DiyProcess> all = _GetDiyProcess.GetDiyProcessByProcessType(ProcessType.ApplicationTypeOverTime.Id); foreach (DiyProcess item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.DiyProcessAssess.Id.ToString() == _FieldParaBaseId) { GetDiyProcess _GetDiyProcess = new GetDiyProcess(); List <DiyProcess> all = _GetDiyProcess.GetDiyProcessByProcessType(ProcessType.Assess.Id); foreach (DiyProcess item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.DiyProcessHRPrincipal.Id.ToString() == _FieldParaBaseId) { GetDiyProcess _GetDiyProcess = new GetDiyProcess(); List <DiyProcess> all = _GetDiyProcess.GetDiyProcessByProcessType(ProcessType.HRPrincipal.Id); foreach (DiyProcess item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.DiyProcessLeaveRequest.Id.ToString() == _FieldParaBaseId) { GetDiyProcess _GetDiyProcess = new GetDiyProcess(); List <DiyProcess> all = _GetDiyProcess.GetDiyProcessByProcessType(ProcessType.LeaveRequest.Id); foreach (DiyProcess item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.DiyProcessTraineeApplication.Id.ToString() == _FieldParaBaseId) { GetDiyProcess _GetDiyProcess = new GetDiyProcess(); List <DiyProcess> all = _GetDiyProcess.GetDiyProcessByProcessType(ProcessType.TraineeApplication.Id); foreach (DiyProcess item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.EducationalBackground.Id.ToString() == _FieldParaBaseId) { List <EducationalBackground> all = EducationalBackground.AllEducationalBackgrounds; foreach (EducationalBackground item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.MaritalStatus.Id.ToString() == _FieldParaBaseId) { List <MaritalStatus> all = MaritalStatus.GetAllMaritalStatus(); foreach (MaritalStatus item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.PoliticalAffiliation.Id.ToString() == _FieldParaBaseId) { List <PoliticalAffiliation> all = PoliticalAffiliation.AllPoliticalAffiliations; foreach (PoliticalAffiliation item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.WorkType.Id.ToString() == _FieldParaBaseId) { List <WorkType> all = WorkType.GetAll(); foreach (WorkType item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } if (EmployeeFieldPara.CountryNationality.Id.ToString() == _FieldParaBaseId) { GetNationality _GetNationality = new GetNationality(); List <Nationality> all = _GetNationality.GetNationalityByCondition(-1, ""); foreach (Nationality item in all) { result += string.IsNullOrEmpty(result) ? item.Name : "\n" + item.Name; } } return(result); }