private void mnuInsert_Click(object sender, EventArgs e) { try { var frm = new frmCustomer(); if (frm.ShowDialog() != DialogResult.OK) { return; } LoadData(); } catch (Exception ex) { var f = new frmMessage(EnumMessageFlag.ShowFlag, Color.Red, ex.Message); f.ShowDialog(); } }
private void mnuEdit_Click(object sender, EventArgs e) { try { if (DGrid.RowCount == 0) { return; } var guid = (Guid)DGrid[dgGuid.Index, DGrid.CurrentRow.Index].Value; var frm = new frmCustomer(guid, true); if (frm.ShowDialog() == DialogResult.OK) { LoadData(); } } catch (Exception exception) { frmMessage frm = new frmMessage(EnumMessageFlag.ShowFlag, Color.Red, exception.Message); frm.ShowDialog(); } }