private void btnAdd_Click(object sender, EventArgs e) { Cursor = Cursors.AppStarting; Form fx = new frmDeliveryOrderEntry(); fx.ShowDialog(); btnRefresh.PerformClick(); Cursor = Cursors.Default; }
private void btnEdit_Click(object sender, EventArgs e) { Cursor = Cursors.AppStarting; try { Form fx = new frmDeliveryOrderEntry((int)_grid.Columns["id"].Value); fx.ShowDialog(); btnRefresh.PerformClick(); } catch (Exception ex) { Logger.ErrorRoutine(ex); RibbonMessageBox.Show("No data selected for editing\n", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } Cursor = Cursors.Default; }