Esempio n. 1
0
        private void FrmUserRight_Load(object sender, EventArgs e)
        {
            // TODO: 这行代码将数据加载到表“dsPSAP.BS_Menu”中。您可以根据需要移动或删除它。
            this.bS_MenuTableAdapter.Fill(this.dsPSAP.BS_Menu);
            // TODO: 这行代码将数据加载到表“dsPSAP.BS_Role”中。您可以根据需要移动或删除它。
            this.bS_RoleTableAdapter.Fill(this.dsPSAP.BS_Role);
            // TODO: 这行代码将数据加载到表“dsPSAP.BS_Department”中。您可以根据需要移动或删除它。
            this.bS_DepartmentTableAdapter.Fill(this.dsPSAP.BS_Department);

            dtblTmp = BSCommon.getUserInfoList("", "", "");
            dgvUserList.DataSource                  = dtblTmp;
            dgvUserList.ColumnHeadersHeight         = 32;
            dgvUserList.Columns[0].Width            = 40;
            dgvUserList.Columns[1].Width            = 60;
            dgvUserList.Columns[2].Width            = 60;
            dgvUserList.Columns[3].Width            = 90;
            dgvUserList.Columns[4].Width            = 90;
            dgvUserList.Columns[5].Width            = 60;
            dgvUserList.Columns[0].DataPropertyName = dtblTmp.Columns["AutoId"].ToString();
            dgvUserList.Columns[1].DataPropertyName = dtblTmp.Columns["LoginID"].ToString();
            dgvUserList.Columns[2].DataPropertyName = dtblTmp.Columns["EmpName"].ToString();
            dgvUserList.Columns[3].DataPropertyName = dtblTmp.Columns["DepartmentName"].ToString();
            dgvUserList.Columns[4].DataPropertyName = dtblTmp.Columns["RoleName"].ToString();
            dgvUserList.Columns[5].DataPropertyName = dtblTmp.Columns["RoleNo"].ToString();
            dgvUserList.Columns[0].HeaderText       = "员工编号";
            dgvUserList.Columns[1].HeaderText       = "用户编号";
            dgvUserList.Columns[2].HeaderText       = "用户姓名";
            dgvUserList.Columns[3].HeaderText       = "部门";
            dgvUserList.Columns[4].HeaderText       = "角色";
            dgvUserList.Columns[5].HeaderText       = "角色编号";
            dgvUserList.Columns[0].Visible          = false;
            dgvUserList.Columns[5].Visible          = false;

            dtblTmp1 = BSCommon.getDepartmentList();
            cboDepartmentName.DataSource    = dtblTmp1;
            cboDepartmentName.DisplayMember = "DepartmentName";

            //角色combo
            dtblTmp1 = BSCommon.getRoleList();
            cboRoleName.DataSource    = dtblTmp1;
            cboRoleName.DisplayMember = "RoleName";
            cboRoleName.ValueMember   = "RoleNo";

            //初始化【菜单管理page】
            mnsMainMenu.Items.Clear();
            FrmMainBLL.InitMenuItem(mnsMainMenu);//初始化主菜单
            FrmRightBLL.TreeGetNodeForMns(tvwMainMenu, mnsMainMenu);
            tvwMainMenu.ExpandAll();
            FrmRightBLL.InitDataGridViewComboFormName(dataGridViewComboFormName); //初始化窗口名下拉列表
            FrmRightBLL.TraverseFormControlToTable();                             // 遍历所有DockContent窗口及其中控件,并将结果加至数据库表中(系统完成后可停用)

            //初始化【角色管理page】
            InitEnableState();//初始化控件按钮状态
        }
Esempio n. 2
0
 /// <summary>
 /// 查询用户权限信息
 /// </summary>
 private void btnQuery_Click(object sender, EventArgs e)
 {
     try
     {
         gridControlUserList.DataSource = BSCommon.getUserInfoList(txtLoginID.Text.Trim(), txtUserName.Text.Trim(), lookUpReqDep.Text.Trim() == "全部" ? "" : lookUpReqDep.Text.Trim());
     }
     catch (Exception ex)
     {
         //ExceptionHandler.HandleException(this.Text + "--查询用户权限信息错误。", ex);
         ExceptionHandler.HandleException(this.Text + "--" + tsmiCxyhqxxxcw.Text, ex);
     }
 }
Esempio n. 3
0
        private void InitControl()
        {
            try
            {
                lookUpReqDep.Properties.DataSource = commonDAO.QueryDepartment_AllNode(true);
                lookUpReqDep.ItemIndex             = 0;

                gridControlUserList.DataSource = BSCommon.getUserInfoList("", "", "");
                //dgvUserList.Columns[0].Width = 40;
                //dgvUserList.Columns[1].Width = 60;
                //dgvUserList.Columns[2].Width = 60;
                //dgvUserList.Columns[3].Width = 90;
                //dgvUserList.Columns[4].Width = 90;
                //dgvUserList.Columns[5].Width = 60;
                //dgvUserList.Columns[0].FieldName = dtblTmp.Columns["AutoId"].ToString();
                //dgvUserList.Columns[1].FieldName = dtblTmp.Columns["LoginID"].ToString();
                //dgvUserList.Columns[2].FieldName = dtblTmp.Columns["EmpName"].ToString();
                //dgvUserList.Columns[3].FieldName = dtblTmp.Columns["DepartmentName"].ToString();
                //dgvUserList.Columns[4].FieldName = dtblTmp.Columns["RoleName"].ToString();
                //dgvUserList.Columns[5].FieldName = dtblTmp.Columns["RoleNo"].ToString();
                //dgvUserList.Columns[0].Caption = "员工编号";
                //dgvUserList.Columns[1].Caption = "用户编号";
                //dgvUserList.Columns[2].Caption = "用户姓名";
                //dgvUserList.Columns[3].Caption = "部门";
                //dgvUserList.Columns[4].Caption = "角色";
                //dgvUserList.Columns[5].Caption = "角色编号";
                //dgvUserList.Columns[0].Visible = false;
                //dgvUserList.Columns[5].Visible = false;

                //角色combo
                cboRoleName.Properties.DataSource = BSCommon.getRoleList();
                //cboRoleName.Properties.DisplayMember = "RoleName";
                //cboRoleName.Properties.ValueMember = "RoleNo";
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
            }
        }
Esempio n. 4
0
 private void btnStretch_Click(object sender, EventArgs e)
 {
     dtblTmp = BSCommon.getUserInfoList(txtLoginID.Text, txtUserName.Text, cboDepartmentName.Text.Trim());
     dgvUserList.DataSource = dtblTmp;
 }