Ejemplo n.º 1
0
 private void btnCounterPlaceChange_Click(object sender, System.EventArgs e)
 {
     if ((this.bsApartmentCounterPlaces.get_Current() != null) && (this.bsApartmentCounterPlaces.get_Current() != ApartmentCounterPlace.Null))
     {
         ApartmentCounterPlaceAddChangeForm form = new ApartmentCounterPlaceAddChangeForm(this.bsApartmentCounterPlaces.get_Current() as ApartmentCounterPlace);
         form.set_Text("Изменение места расположения");
         form.bAddChange.set_Text("Изменить");
         if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
         {
             this.bsApartmentCounterPlaces.set_DataSource(ApartmentCounterPlace.FindAllByCounterId(this.m_ApartmentCounter.Id));
         }
     }
 }
Ejemplo n.º 2
0
 private void tsbCounterPlaceAdd_Click(object sender, System.EventArgs e)
 {
     if (this.m_ApartmentCounter != ApartmentCounter.Null)
     {
         ApartmentCounterPlaceAddChangeForm form = new ApartmentCounterPlaceAddChangeForm(this.m_ApartmentCounter.Id);
         form.set_Text("Добавление места расположения счетчика");
         form.ShowDialog(this);
         if (form.DialogResult == System.Windows.Forms.DialogResult.OK)
         {
             form.ApartmentCounterPlace.SaveChanges();
             this.bsApartmentCounterPlaces.Add(form.ApartmentCounterPlace);
         }
     }
 }