Example #1
0
 /// <summary>
 /// 初始化界面
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void Init(object sender, EventArgs e)
 {
     _View.PositionLeft = _IPositionBll.GetAllPosition();
     if (_View.PositionRight == null)
     {
         _View.PositionRight = new List <Position>();
     }
 }
Example #2
0
        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();
        }
Example #3
0
        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;
        }
Example #4
0
        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;
        }
Example #5
0
        public void Init(object sender, EventArgs e)
        {
            _View.PositionList   = _IPosition.GetAllPosition();
            _View.DepartmentList =
                Tools.RemoteUnAuthDeparetment(_IDepartment.GetAllDepartment(), AuthType.SEP, LoginUser, Powers.A302);
            _View.EmployeeRight = new List <Account>();
            _View.EmployeeLeft  = new List <Account>();
            Bulletin bulletin = _IBulletin.GetBulletinByBulletinID(_View.BulletinID, LoginUser);

            _View.BulletinTitle = bulletin.Title;
        }
Example #6
0
        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);
        }
Example #7
0
 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();
 }
        private void BackUpPosition()
        {
            List <Position> positionList = _IPositionBll.GetAllPosition();

            foreach (Position position in positionList)
            {
                PositionHistory positionHistory = new PositionHistory();
                positionHistory.Operator                = _OperatorAccount;
                positionHistory.Position                = _IPositionBll.GetPositionById(position.Id, null);
                positionHistory.Position.Grade          = new PositionGrade(0, "", "");
                positionHistory.Position.Grade.Sequence = 0;
                positionHistory.OperationTime           = _DtNow;
                _DalPositionHistory.CreatePositionHistory(positionHistory);
            }
        }
        /// <summary>
        /// 初始化界面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void Init(object sender, EventArgs e)
        {
            _View.PositionList = _IPositionBll.GetAllPosition();
            List <Department> departmentList = BllInstance.DepartmentBllInstance.GetAllDepartment();

            if (_PowerID != -1)
            {
                _View.DepartmentList = Tools.RemoteUnAuthDeparetment(departmentList, AuthType.HRMIS, _LoginUser, _PowerID);
            }
            else
            {
                _View.DepartmentList = departmentList;
            }
            if (_View.AccountRight == null)
            {
                _View.AccountRight = new List <Account>();
            }
            _View.AccountLeft = new List <Account>();
        }
Example #10
0
        /// <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);
        }
Example #12
0
        /// <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);
        }