private void EditData(DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { sp_MAS302_GetSTDLight_Result row = gvResult.Rows[e.RowIndex].DataBoundItem as sp_MAS302_GetSTDLight_Result; using (MAS302_StandardLightIntensityEntry dlg = new MAS302_StandardLightIntensityEntry(row)) { if (dlg.ShowDialog(this) == DialogResult.OK) { LoadData(); } } } }
private void AddNew() { try { using (MAS302_StandardLightIntensityEntry dlg = new MAS302_StandardLightIntensityEntry()) { if (dlg.ShowDialog(this) == DialogResult.OK) { LoadData(); } } } catch (Exception ex) { rMessageBox.ShowException(this, ex); } }