Beispiel #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            PollutantDefinition frm = new PollutantDefinition();
            DialogResult        rtn = frm.ShowDialog();

            if (rtn == DialogResult.OK)
            {
                BindPollutants();
            }
        }
Beispiel #2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     try
     {
         if (lstAvailablePollutants.SelectedItem == null)
         {
             return;
         }
         PollutantDefinition frm = new PollutantDefinition();
         DataRowView         dr  = lstAvailablePollutants.SelectedItem as DataRowView;
         frm._pollutantIDName = dr.Row["pollutantname"].ToString();
         frm._pollutantID     = dr.Row["pollutantID"];
         DialogResult rtn = frm.ShowDialog();
         if (rtn == DialogResult.OK)
         {
             BindPollutants();
         }
     }
     catch (Exception ex)
     {
         Logger.LogError(ex.Message);
     }
 }