public void BindDepartment()
        {
            List <Department> deptList = _IDepartmentBll.GetAllDepartment();

            deptList = Tools.RemoteUnAuthDeparetment(deptList, AuthType.HRMIS, _Operator, HrmisPowers.A405);
            _IStatisticsConditionView.DepartmentList = _IDepartmentBll.GenerateDeptListWithLittleParentDept(deptList);
        }
Example #2
0
 public void InitDepartmentTree(bool IsPostBack)
 {
     if (!IsPostBack)
     {
         _IDepartmentDistributionView.DepartmentDistribution = _IDepartmentBll.GetAllDepartment();
     }
 }
Example #3
0
        protected override void ExcuteSelf()
        {
            List <Department> departmentList = _IDepartmentBll.GetAllDepartment();

            using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required))
            {
                List <DepartmentHistory> departmentHistoryList = new List <DepartmentHistory>();
                foreach (Department department in departmentList)
                {
                    DepartmentHistory departmentHistory = new DepartmentHistory();
                    departmentHistory.Department = _IDepartmentBll.GetDepartmentById(department.Id, null);
                    departmentHistory.Department.ParentDepartment = _IDepartmentBll.GetParentDept(department.Id, null);
                    if (departmentHistory.Department.ParentDepartment == null)
                    {
                        departmentHistory.Department.ParentDepartment =
                            new Department(0, new Account(0, "", ""), "", null);
                    }
                    departmentHistory.OperationTime = _DtNow;
                    departmentHistory.Operator      = _OperatorAccount;
                    departmentHistoryList.Add(departmentHistory);
                }
                _DalDepartmentHistory.InsertDepartmentHistory(departmentHistoryList);
                ts.Complete();
            }
        }
        private void GetData()
        {
            List <Department> deptList = _IDepartmentBll.GetAllDepartment();

            _View.DepartmentSource =
                Tools.RemoteUnAuthDeparetment(deptList, AuthType.SEP, LoginUser, Powers.A302);
        }
Example #5
0
        public void BindDepartment()
        {
            List <Department> deptList =
                Tools.RemoteUnAuthDeparetment(_IDepartmentBll.GetAllDepartment(), AuthType.HRMIS, _LoginUser,
                                              HrmisPowers.A506);

            _View.DepartmentSource = deptList;
        }
Example #6
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 #7
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 #8
0
        private void BindTypesSource()
        {
            List <Department> departmentSource = _IDepartmentBll.GetAllDepartment();

            if (departmentSource != null)
            {
                _ItsView.CompanySource = departmentSource;
            }

            List <DiyProcess> leaveProcess       = _IDiyProcessFacade.GetDiyProcessByProcessType(ProcessType.LeaveRequest.Id);
            List <DiyProcess> outProcess         = _IDiyProcessFacade.GetDiyProcessByProcessType(ProcessType.ApplicationTypeOut.Id);
            List <DiyProcess> overTimeProcess    = _IDiyProcessFacade.GetDiyProcessByProcessType(ProcessType.ApplicationTypeOverTime.Id);
            List <DiyProcess> assessProcess      = _IDiyProcessFacade.GetDiyProcessByProcessType(ProcessType.Assess.Id);
            List <DiyProcess> hrPrincipalProcess = _IDiyProcessFacade.GetDiyProcessByProcessType(ProcessType.HRPrincipal.Id);
            //List<DiyProcess> reimburseProcess = _IDiyProcessFacade.GetDiyProcessByProcessType(ProcessType.Reimburse.Id);
            List <DiyProcess> traineeApplicationProcess = _IDiyProcessFacade.GetDiyProcessByProcessType(ProcessType.TraineeApplication.Id);

            if (leaveProcess != null)
            {
                _ItsView.LeaveRequestProcess = leaveProcess;
            }
            if (outProcess != null)
            {
                _ItsView.OutProcess = outProcess;
            }
            if (overTimeProcess != null)
            {
                _ItsView.OverTimeProcess = overTimeProcess;
            }
            if (assessProcess != null)
            {
                _ItsView.AssessProcess = assessProcess;
            }
            if (hrPrincipalProcess != null)
            {
                _ItsView.HRPrincipalProcess = hrPrincipalProcess;
            }
            //if (hrPrincipalProcess != null)
            //{
            //    _ItsView.ReimburseProcess = reimburseProcess;
            //}
            if (traineeApplicationProcess != null)
            {
                _ItsView.TraineeApplicationProcess = traineeApplicationProcess;
            }

            BindGradeTypesSource();
            BindPrincipalshipSource();
            List <AdjustRule> adjustRules = _IAdjustRuleFacade.GetAdjustRuleByNameLike("");

            if (adjustRules != null)
            {
                _ItsView.AdjustRuleSource = adjustRules;
            }
        }
Example #9
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 #10
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 #11
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;
        }
        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);
        }
        public override void Initialize(bool isPostBack)
        {
            //_View.Message = string.Empty;
            if (!isPostBack)
            {
                _View.CharacterTypeSource = AssessActivityUtility.GetAllCharacterTypeEnum();

                _View.StatusTypeSource = AssessActivityUtility.GetAllAssessStatusTypeEnum();
                _View.DepartmentSource = _IDepartmentBll.GetAllDepartment();
                BindAssessActivity(null, null);
            }
        }
Example #14
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();
 }
Example #15
0
 public override void Initialize(bool isPostBack)
 {
     AttachViewEvent();
     if (!isPostBack)
     {
         _View.ReimburseCategoriesEnumDataSrc = ReimburseCategoriesEnum.GetAll();
         List <Department> deptList = _IDepartmentBll.GetAllDepartment();
         _View.DepartmentSource =
             Tools.RemoteUnAuthDeparetment(deptList, AuthType.HRMIS, _LoginUser, HrmisPowers.A902);
         _View.CompanySource   = _ICompanyInvolveFacade.GetAllCompanyHaveEmployee();
         _View.BillingTimeFrom = DateTime.Now.Year + "-" + DateTime.Now.Month + "-1";
         _View.BillingTimeTo   =
             Convert.ToDateTime(DateTime.Now.Year + "-" + DateTime.Now.Month + "-1").AddMonths(1).AddDays(-1).
             ToShortDateString();
         BindReimburse(null, null);
     }
 }
        private bool TheDepartmentIsExist(string departmentId)
        {
            List <Department> allDepartments = _IDepartmentBll.GetAllDepartment();

            if (allDepartments == null)
            {
                return(false);
            }

            foreach (Department dep in allDepartments)
            {
                if (dep.DepartmentID.ToString().Equals(departmentId))
                {
                    return(true);
                }
            }
            return(false);
        }
Example #17
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);
        }
Example #18
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);
        }
        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);
        }