Exemplo n.º 1
0
        /// <summary>
        /// Show light meters in the datagrid.
        /// </summary>
        private void showLightMeter()
        {
            ligthMeterAPI lightMeterQuery = new ligthMeterAPI();

            bindLightMeter.DataSource  = lightMeterQuery.getLightMeters();
            dgv_light_meter.DataSource = bindLightMeter;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Add new Light meter from validated form values.
 /// </summary>
 public void addLightMeter()
 {
     try
     {
         if (isRightFormat())
         {
             ligthMeterAPI api = new ligthMeterAPI();
             light_meter   lM  = setLightMeter();
             if (!api.addLightMeter(lM))
             {
                 validateDevice.throwValidateException("Light meter already exists");
             }
             closeRightForm();
         }
     } catch (ArgumentException a) {
         MessageBox.Show(a.Message, "Info Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }