Exemplo n.º 1
0
 private void tsbChange_Click(object sender, System.EventArgs e)
 {
     NormsForElectric currentBS = this.GetCurrentBS();
     if (currentBS != NormsForElectric.Null)
     {
         NormsForElectricAddChangeForm form = new NormsForElectricAddChangeForm(currentBS);
         if (form.ShowDialog() == System.Windows.Forms.DialogResult.Yes)
         {
             this.bsNormsForElectric.set_Sort(this.bsNormsForElectric.get_Sort());
             this.bsNormsForElectric.set_Position(this.bsNormsForElectric.IndexOf(currentBS));
         }
     }
 }
Exemplo n.º 2
0
 private void tsbAdd_Click(object sender, System.EventArgs e)
 {
     NormsForElectric bnfe = new NormsForElectric();
     NormsForElectricAddChangeForm form = new NormsForElectricAddChangeForm(bnfe);
     if (form.ShowDialog() == System.Windows.Forms.DialogResult.Yes)
     {
         this.bsNormsForElectric.Add(bnfe);
         this.bsNormsForElectric.set_Sort(this.bsNormsForElectric.get_Sort());
         this.bsNormsForElectric.set_Sort(this.bsNormsForElectric.get_Sort());
         this.bsNormsForElectric.set_Position(this.bsNormsForElectric.IndexOf(bnfe));
     }
 }