private void SetStatisticsAuth()
        {
            List <Auth> authList = new List <Auth>();

            if (LoginUser.Id != Account.AdminPkid)
            {
                IDepartmentBll    iDepartmentBll = BllInstance.DepartmentBllInstance;
                List <Department> DepartmentList = iDepartmentBll.GetManageDepts(LoginUser.Id);
                Auth auth;
                auth             = new Auth(0, "考勤统计");
                auth.NavigateUrl = "../AttendancePages/MonthAttendance.aspx";
                authList.Add(auth);
                if (DepartmentList != null && DepartmentList.Count != 0)
                {
                    auth             = new Auth(0, "员工统计");
                    auth.NavigateUrl = "../EmployeeStatisticsPages/EmployeeStatistics.aspx";
                    authList.Add(auth);
                    auth             = new Auth(0, "薪资统计");
                    auth.NavigateUrl = "../PayModulePages/EmployeeSalaryStatistics.aspx";
                    authList.Add(auth);
                }
                auth             = new Auth(0, "查询员工");
                auth.NavigateUrl = "../EmployeePages/SearchEmployee.aspx";
                authList.Add(auth);
            }
            _ItsView.rptStatisticsDataSrc = authList;
        }
Пример #2
0
        private void Init()
        {
            List <IndexItem> sepItems    = new List <IndexItem>();
            List <IndexItem> hrmisItems  = new List <IndexItem>();
            List <IndexItem> crmItems    = new List <IndexItem>();
            List <IndexItem> mycmmiItems = new List <IndexItem>();

            #region sep

            sepItems.Add(new IndexItem("日历", "Calendar",
                                       "SEP/CalendarPages/CalendarIFramePage.aspx", 0));
            sepItems.Add(new IndexItem("公告", "Bulletion",
                                       "SEP/BulletinPages/BulletinIFramePage.aspx", 0));
            sepItems.Add(new IndexItem("目标", "Goal",
                                       "SEP/GoalPages/GoalIFramePage.aspx", 1));
            sepItems.Add(new IndexItem("电话薄", "TelephoneBook",
                                       "SEP/ContactPages/ContactIFramePage.aspx", 1));
            sepItems.Add(new IndexItem("高级日历", "CalendarExt",
                                       "SEP/CalendarExtPages/CalendarExtIFramePage.aspx", 0));

            #endregion

            #region  hrmis

            if (MasterPagePresenter.HasHrmisSystem && _LoginUser.IsHRAccount)
            {
                hrmisItems.Add(new IndexItem("请假管理", "LeaveRequest",
                                             "HRMIS/LeaveRequestPages/LeaveRequestIFramePage.aspx", 1));
                hrmisItems.Add(new IndexItem("加班管理", "OverWork",
                                             "HRMIS/OverWorkPages/OverWorkIFramePage.aspx", 1));
                hrmisItems.Add(new IndexItem("外出管理", "Out",
                                             "HRMIS/OutApplicationPages/OutApplicationIFramePage.aspx", 1));
                hrmisItems.Add(new IndexItem("绩效管理", "AssessActivity",
                                             "HRMIS/AssessPages/AssessActivityIFramePage.aspx", 1));
                hrmisItems.Add(new IndexItem("培训管理", "TrainApplication",
                                             "HRMIS/TrianApplicationPages/TrainApplicationIFramePage.aspx", 1));
                hrmisItems.Add(new IndexItem("考勤统计", "MonthAttendance",
                                             "HRMIS/AttendancePages/MonthAttendanceIFramePage.aspx",
                                             0));

                //有查询员工权限才能看自定义流程异常
                if (_LoginUser.FindAuth(AuthType.HRMIS, HrmisPowers.A401) != null)
                {
                    hrmisItems.Add(new IndexItem("自定义流程异常", "DiyProcessErrorListView",
                                                 "HRMIS/SystemErrorPages/DiyProcessErrorListIFramePage.aspx",
                                                 0));
                    hrmisItems.Add(new IndexItem("门禁卡异常", "DoorCardErrorListAjaxView",
                                                 "HRMIS/SystemErrorPages/DoorCardErrorListIFramePage.aspx",
                                                 0));
                    hrmisItems.Add(new IndexItem("短信数据", "PhoneMessageData",
                                                 "HRMIS/SystemErrorPages/PhoneMessageListIFramePage.aspx",
                                                 0));
                }
                if (_LoginUser.FindAuth(AuthType.HRMIS, HrmisPowers.A502) != null)
                {
                    hrmisItems.Add(new IndexItem("排班表异常", "DutyCalssErrorListView",
                                                 "HRMIS/SystemErrorPages/DutyClassErrorListIFramePage.aspx",
                                                 0));
                }
                if (_LoginUser.FindAuth(AuthType.HRMIS, HrmisPowers.A504) != null)
                {
                    hrmisItems.Add(new IndexItem("考勤异常", "AttendanceErrorListAjaxView",
                                                 "HRMIS/SystemErrorPages/AttendanceErrorListIFramePage.aspx",
                                                 0));
                }
                if (_LoginUser.FindAuth(AuthType.HRMIS, HrmisPowers.A402) != null)
                {
                    hrmisItems.Add(new IndexItem("员工合同异常", "EmployeeContractErrorListAjaxView",
                                                 "HRMIS/SystemErrorPages/EmployeeContractErrorListIFramePage.aspx",
                                                 0));
                }
                #region 主管才有的节点

                if (_DepartmentBll.GetManageDepts(_LoginUser.Id).Count > 0)
                {
                    hrmisItems.Add(new IndexItem("年龄构成图", "AgePieChartIndexView",
                                                 "HRMIS/EmployeeStatisticsPages/AgePieChartIFramePage.aspx", 1));
                    hrmisItems.Add(new IndexItem("性别构成图", "GenderPieChartIndexView",
                                                 "HRMIS/EmployeeStatisticsPages/GenderPieChartIFramePage.aspx", 1));
                    hrmisItems.Add(new IndexItem("文化程度构成图", "EduBgPieChartIndexView",
                                                 "HRMIS/EmployeeStatisticsPages/EduBgPieChartIFramePage.aspx", 1));
                    hrmisItems.Add(new IndexItem("司龄构成图", "WorkAgePieChartIndexView",
                                                 "HRMIS/EmployeeStatisticsPages/WorkAgePieChartIFramePage.aspx", 1));
                    hrmisItems.Add(new IndexItem("用工性质构成图", "WorkTypePieChartIndexView",
                                                 "HRMIS/EmployeeStatisticsPages/WorkTypePieChartIFramePage.aspx", 1));
                    hrmisItems.Add(new IndexItem("其他统计", "OtherStatisticsDataIndexView",
                                                 "HRMIS/EmployeeStatisticsPages/OtherStatisticsDataIFramePage.aspx",
                                                 1));
                    hrmisItems.Add(new IndexItem("入职离职统计", "ComeAndLeaveIndexView",
                                                 "HRMIS/EmployeeStatisticsPages/ComeAndLeaveIFramePage.aspx", 0));
                    hrmisItems.Add(new IndexItem("职务层级配置", "PositionGradeTowerTableIndexView",
                                                 "HRMIS/EmployeeStatisticsPages/PositionGradeTowerTableIFramePage.aspx",
                                                 1));
                    hrmisItems.Add(new IndexItem("工资人均统计", "AverageStatisticsIndexView",
                                                 "HRMIS/PayModulePages/AverageStatisticsIFramePage.aspx",
                                                 0));
                    hrmisItems.Add(new IndexItem("按部门统计工资", "DepartmentStatisticsIndexView",
                                                 "HRMIS/PayModulePages/DepartmentStatisticsIFramePage.aspx",
                                                 0));
                    hrmisItems.Add(new IndexItem("按职位统计工资", "PositionStatisticsIndexView",
                                                 "HRMIS/PayModulePages/PositionStatisticsIFramePage.aspx",
                                                 0));
                    hrmisItems.Add(new IndexItem("按月统计帐套参数", "TimeSpanStatisticsGroupByParaIndexView",
                                                 "HRMIS/PayModulePages/TimeSpanStatisticsGroupByParaIFramePage.aspx",
                                                 0));
                    hrmisItems.Add(new IndexItem("按月统计部门工资", "TimeSpanStatisticsGroupByDeptIndexView",
                                                 "HRMIS/PayModulePages/TimeSpanStatisticsGroupByDeptIFramePage.aspx",
                                                 0));
                }

                #endregion
            }

            #endregion

            #region crm

            if (MasterPagePresenter.HasCRMSystem && _LoginUser.IsCRMAccount)
            {
                crmItems.Add(new IndexItem("客户", "Customer",
                                           "CRM/IndexPages/MyCustomerIFramePage.aspx", 1));
                crmItems.Add(new IndexItem("商机", "Opportunity",
                                           "CRM/IndexPages/MyOpportunityIFramePage.aspx", 1));
                crmItems.Add(new IndexItem("订单", "Order",
                                           "CRM/IndexPages/MyOrderIFramePage.aspx", 1));
            }

            #endregion

            _View.SepToolList    = sepItems;
            _View.HrmisToolList  = hrmisItems;
            _View.CrmToolList    = crmItems;
            _View.MyCmmiToolList = mycmmiItems;
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var account = Session[SessionKeys.LOGININFO] as Account;

            AllAuth        = new List <AuthEntity>();
            AllAccountAuth = new List <AccountAuthEntity>();
            AllAuth.Add(new AuthEntity()
            {
                AuthName = "自助服务", AuthParentId = 0, IfHasDepartment = 0, NavigateUrl = "", PKID = 80
            });
            AllAuth.Add(new AuthEntity()
            {
                AuthName     = "请假管理",
                AuthParentId = 80,
                NavigateUrl  = "../LeaveRequestPages/MyLeaveRequest.aspx",
                PKID         = 81
            });
            AllAuth.Add(new AuthEntity()
            {
                AuthName        = "外出管理",
                AuthParentId    = 80,
                IfHasDepartment = 0,
                NavigateUrl     = "../OutApplicationPages/OutApplicationList.aspx",
                PKID            = 82
            });
            AllAuth.Add(new AuthEntity()
            {
                AuthName     = "加班管理",
                AuthParentId = 80,
                NavigateUrl  = "../OverWorkPages/OverWorkList.aspx",
                PKID         = 83
            });
            AllAuth.Add(new AuthEntity()
            {
                AuthName     = "报销管理",
                AuthParentId = 80,
                NavigateUrl  = "../ReimbursePages/MyReimburse.aspx",
                PKID         = 84
            });
            AllAuth.Add(new AuthEntity()
            {
                AuthName        = "申请绩效考核",
                AuthParentId    = 80,
                IfHasDepartment = 0,
                NavigateUrl     = "../AssessPages/ManagerApplyEmployeeAssess.aspx",
                PKID            = 85
            });
            AllAuth.Add(new AuthEntity()
            {
                AuthName     = "填写绩效考核",
                AuthParentId = 80,
                NavigateUrl  = "../AssessPages/GetCurrentAssess.aspx",
                PKID         = 86
            });
            AllAuth.Add(new AuthEntity()
            {
                AuthName     = "绩效考核历史",
                AuthParentId = 80,
                NavigateUrl  = "../AssessPages/GetAssessActivityHistory.aspx",
                PKID         = 87
            });
            AllAuth.Add(new AuthEntity()
            {
                AuthName     = "解密工资单",
                AuthParentId = 80,
                NavigateUrl  = "../PayModulePages/DECEmployeeSalary.aspx",
                PKID         = 88
            });
            AllAuth.Add(new AuthEntity()
            {
                AuthName     = "我的培训反馈",
                AuthParentId = 80,
                NavigateUrl  = "../TrainingPages/MyFeedBack.aspx",
                PKID         = 89
            });
            AllAuth.Add(new AuthEntity()
            {
                AuthName     = "我的培训申请",
                AuthParentId = 80,
                NavigateUrl  = "../TrianApplicationPages/MyTrainApplication.aspx",
                PKID         = 89
            });

            AllAuth.Add(new AuthEntity()
            {
                AuthName        = "统计管理",
                AuthParentId    = 0,
                IfHasDepartment = 0,
                NavigateUrl     = "",
                PKID            = 8801
            });
            AllAuth.Add(new AuthEntity()
            {
                AuthName     = "考勤统计",
                AuthParentId = 8801,
                NavigateUrl  = "../AttendancePages/MonthAttendance.aspx",
                PKID         = 8802
            });
            IDepartmentBll    iDepartmentBll = BllInstance.DepartmentBllInstance;
            List <Department> DepartmentList = iDepartmentBll.GetManageDepts(account.Id);

            if (DepartmentList != null && DepartmentList.Count != 0)
            {
                AllAuth.Add(new AuthEntity()
                {
                    AuthName     = "员工统计",
                    AuthParentId = 8801,
                    NavigateUrl  = "../EmployeeStatisticsPages/EmployeeStatistics.aspx",
                    PKID         = 8803
                });
                AllAuth.Add(new AuthEntity()
                {
                    AuthName     = "薪资统计",
                    AuthParentId = 8801,
                    NavigateUrl  = "../PayModulePages/EmployeeSalaryStatistics.aspx",
                    PKID         = 8804
                });
            }
            AllAuth.Add(new AuthEntity()
            {
                AuthName     = "查询员工",
                AuthParentId = 8801,
                NavigateUrl  = "../EmployeePages/SearchEmployee.aspx",
                PKID         = 8805
            });
            foreach (var authEntity in AllAuth)
            {
                AllAccountAuth.Add(new AccountAuthEntity {
                    AccountId = account.Id, AuthId = authEntity.PKID
                });
            }
            AllAuth.AddRange(AuthLogic.GetAllAuth());
            AllAccountAuth.AddRange(AccountAuthLogic.GetAccountAuthByAccountId(account.Id));
        }