private void btnEdit() { try { DataTable dt = (DataTable)gridControl1.DataSource; int iRow = GetFocRowID(); SetMod(dt.Rows[iRow]); if (clsRoleMod.bClosed) { throw new Exception("已经关闭,不能修改!"); } FrmRoleEdit frmEdit = new FrmRoleEdit(this.BackColor, clsRoleMod); frmEdit.ShowDialog(); iRow = GetFocRowID(); GetGridView(); gridView1.FocusedRowHandle = iRow; } catch (Exception ee) { throw new Exception(ee.Message); } }
private void btnAdd() { try { FrmRoleEdit frmEdit = new FrmRoleEdit(this.BackColor); frmEdit.ShowDialog(); GetGridView(); } catch (Exception ee) { throw new Exception(ee.Message); } }