private void toolEdit_Click(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; if (DBGrid.CurrentRow == null) { return; } modAssetAdd mod = (modAssetAdd)DBGrid.CurrentRow.DataBoundItem; EditAssetAdd frm = new EditAssetAdd(); frm.EditItem(mod.FormId); if (frm.ShowDialog() == DialogResult.OK) { LoadData(); } } catch (Exception ex) { MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information); return; } finally { this.Cursor = Cursors.Default; } }
private void toolNew_Click(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; EditAssetAdd frm = new EditAssetAdd(); frm.AddItem(); if (frm.ShowDialog() == DialogResult.OK) { rbStatus0.Checked = true; LoadData(); } } catch (Exception ex) { MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information); return; } finally { this.Cursor = Cursors.Default; } }