Ejemplo n.º 1
0
        /// <summary>
        /// Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UC_UserRoles_Load(object sender, EventArgs e)
        {
            //初始化
            _menuTypeBll  = new MenuTypeBll();
            _userRolesBll = new UserRolesBll();
            _rolesBll     = new RolesBll();

            if (_user != null)
            {
                label_UserName.Text       = _user.UserName;
                label_EmployeeID.Text     = _user.EmployeeID;
                label_Sex.Text            = _user.Sex == 0 ? "男" : "女";
                label_DepartmentName.Text = _user.DepartmentID.ToString();

                switch (_user.UserType.GetHashCode())
                {
                case 0: label_UserType.Text = "试用期"; break;

                case 1: label_UserType.Text = "临时员工"; break;

                case 2: label_UserType.Text = "正式员工"; break;

                case 3: label_UserType.Text = "已离职"; break;

                case 4: label_UserType.Text = "已停用"; break;
                }
            }

            //获取用户角色
            GetUserRolesByUserID();
            //初始化
            Init_TreeViewRoles();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UC_MenuManager_Load(object sender, EventArgs e)
        {
            _menuTypeBll = new MenuTypeBll();
            _menusBll    = new MenusBll();

            Init_TreeViewMenu();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// LOAD
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UC_RoleManager_Load(object sender, EventArgs e)
        {
            _menuTypeBll = new MenuTypeBll();
            _rolesBll    = new RolesBll();

            Init_TreeViewRoles();
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 加载
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void UC_MenuTypeManager_Load(object sender, EventArgs e)
 {
     //初始化BLL
     _menuTypeBll = new MenuTypeBll();
     //初始化实体
     _curMenuType = new MenuType();
     //加载系统列表
     DataGridView_MenuType_Init();
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UC_RoleMenusManager_Load(object sender, EventArgs e)
        {
            _menuTypeBll     = new MenuTypeBll();
            _menusBll        = new MenusBll();
            _roleMenusBll    = new RoleMenusBll();
            _rolesBll        = new RolesBll();
            _dicDataGridView = new Dictionary <int, Menus>();

            //初始化
            Init_TreeViewRoles();
            //初始化
            Init_TreeViewMenus(1);

            treeView_Roles.Focus();
        }