Пример #1
0
 private void AddNew()
 {
     try
     {
         using (RPT002_WorkPlaceAirQualityEntry dlg = new RPT002_WorkPlaceAirQualityEntry())
         {
             if (dlg.ShowDialog(this) == DialogResult.OK)
             {
                 LoadData();
             }
         }
     }
     catch (Exception ex)
     {
         rMessageBox.ShowException(this, ex);
     }
 }
Пример #2
0
 private void EditData(DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.RowIndex >= 0)
         {
             sp_RPT002_GetWorkPlaceAir_Result row = gvResult.Rows[e.RowIndex].DataBoundItem as sp_RPT002_GetWorkPlaceAir_Result;
             using (RPT002_WorkPlaceAirQualityEntry dlg = new RPT002_WorkPlaceAirQualityEntry(row.ID))
             {
                 if (dlg.ShowDialog(this) == DialogResult.OK)
                 {
                     LoadData();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         rMessageBox.ShowException(this, ex);
     }
 }