Exemple #1
0
        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);
            }
        }
Exemple #2
0
        private void btnAdd()
        {
            try
            {
                FrmRoleEdit frmEdit = new FrmRoleEdit(this.BackColor);
                frmEdit.ShowDialog();

                GetGridView();
            }
            catch (Exception ee)
            {
                throw new Exception(ee.Message);
            }
        }