private void ShowUser() { string sqlstr = @"SELECT U_ID 账号, U_NAME 用户名, DPT 部门, FLAG 不允许重置密码, TYPE 账号来源类型 FROM WG_USER ORDER BY K_ID "; DgvUser.DataSource = mssql.SQLselect(connWG, sqlstr); DgvOpt.SetRowBackColor(DgvUser); }
private void ShowUserPerm(string U_ID) { DgvMain.DataSource = null; BtnSave.Enabled = false; BtnReset.Enabled = false; DataTable showDt = UserPermission.ShowUserPerm(U_ID); if (showDt != null) { DgvMain.DataSource = showDt; DgvOpt.SetRowBackColor(DgvMain); BtnSave.Enabled = true; BtnReset.Enabled = true; } else { MessageBox.Show("没有查找到信息"); } }
private void ShowUserPerm(string U_ID) { DgvMain.DataSource = null; BtnSave.Enabled = false; BtnReset.Enabled = false; DataTable showDt = FormLogin.infObj.userPermission.ShowUserPerm(U_ID); if (showDt != null) { DgvMain.DataSource = showDt; DgvOpt.SetRowBackColor(DgvMain); DgvOpt.SetColHeadMiddleCenter(DgvMain); DgvOpt.SetColReadonly(DgvMain, "权限名"); BtnSave.Enabled = true; BtnReset.Enabled = true; } else { MessageBox.Show("没有查找到信息"); } }
private void ShowUser() { DgvUser.DataSource = FormLogin.infObj.userLogin.GetUserInfo(); DgvOpt.SetRowBackColor(DgvUser); }