Esempio n. 1
0
        /// <summary>
        /// 选择操作员或者权限角色
        /// </summary>
        private void radioHandleCate_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (radioHandleCate.SelectedIndex == 0)//操作员
                {
                    labHandleOwner.Text = "操作员";
                    searchLookUpHandleOwner.Properties.DataSource    = commonDAO.QueryUserInfo(false);
                    searchLookUpHandleOwner.Properties.DisplayMember = "EmpName";
                    searchLookUpHandleOwner.Properties.ValueMember   = "LoginId";

                    gridColRoleNo.Visible   = false;
                    gridColRoleName.Visible = false;
                    gridColLoginId.Visible  = true;
                    gridColEmpName.Visible  = true;
                }
                else//权限角色
                {
                    labHandleOwner.Text = "权限角色";
                    searchLookUpHandleOwner.Properties.DataSource    = commonDAO.QueryRole(false);
                    searchLookUpHandleOwner.Properties.DisplayMember = "RoleName";
                    searchLookUpHandleOwner.Properties.ValueMember   = "RoleNo";

                    gridColLoginId.Visible  = false;
                    gridColEmpName.Visible  = false;
                    gridColRoleNo.Visible   = true;
                    gridColRoleName.Visible = true;
                }
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--选择操作员或者权限角色错误。", ex);
            }
        }