/// <summary> /// 编辑相应权限 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnEdit_Click(object sender, EventArgs e) { if (gvRight.FocusedRowHandle < 0) { return; } DataRow dr = gvRight.GetDataRow(gvRight.FocusedRowHandle); frmEditDetailRight myDetailRight = new frmEditDetailRight(); myDetailRight.strUser = dr["F_UID"].ToString(); myDetailRight.strField = dr["F_Field"].ToString(); myDetailRight.strModule = dr["F_Module"].ToString(); myDetailRight.Edit(dr["F_FieldZH"].ToString(), dr["F_Field"].ToString()); myDetailRight.ShowDialog(); myDetailRight.Dispose(); }
/// <summary> /// 增加相应权限 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAdd_Click(object sender, EventArgs e) { if (gvModule.FocusedRowHandle < 0) { return; } DataRow drModule = gvModule.GetDataRow(gvModule.FocusedRowHandle); if (gvUser.FocusedRowHandle < 0) { return; } DataRow dr = gvUser.GetDataRow(gvUser.FocusedRowHandle); frmEditDetailRight myDetailRight = new frmEditDetailRight(); myDetailRight.gvGrid = gvUser; myDetailRight.strUser = dr["F_ID"].ToString(); myDetailRight.strModule = drModule["F_ID"].ToString(); myDetailRight.ShowDialog(); myDetailRight.Dispose(); BindDetailRight(); }