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