private void btnAdd_Click(object sender, EventArgs e) { var edit = new FunctionEdit(); if (edit.ShowDialog() == DialogResult.OK) { Thread.Sleep(300); cmd.ShowOpaqueLayer(); SearchData(1, pageControl1.PageSize); MessageBoxUtils.Hint("保存成功!", MainForm); } }
private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) { if (e.Column.Caption != "操作") { var selectedRow = gridView1.GetFocusedRow() as FunctionEntity; if (selectedRow == null) { return; } var edit = new FunctionEdit(); edit.function = selectedRow; edit.Text = "功能修改"; if (edit.ShowDialog() == DialogResult.OK) { Thread.Sleep(300); cmd.ShowOpaqueLayer(); SearchData(pageControl1.CurrentPage, pageControl1.PageSize); MessageBoxUtils.Hint("修改成功!", MainForm); } } }