예제 #1
0
 private void tsBtnEditApartmentEquipment_Click(object sender, System.EventArgs e)
 {
     ApartmentEquipment equip = this.bsNewApartmentEquipment.get_Current() as ApartmentEquipment;
     if (equip != null)
     {
         equip.ApartmentId = this.m_OldApartment.Id;
         ApartmentEquipmentsAddChangeForm form = new ApartmentEquipmentsAddChangeForm(equip, false, 0);
         if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
         {
             equip.ApartmentId = Apartment.Null.Id;
             equip.FromDate = equip.Dateb;
             this.dgvNewApartmentEquipment.Refresh();
         }
     }
     else
     {
         Messages.ShowMessage("Выберите объект для редактирования");
     }
 }
예제 #2
0
 private void btnEquipmentsAdd_Click(object sender, System.EventArgs e)
 {
     if (this.m_Apartment != Apartment.Null)
     {
         ApartmentEquipment equip = new ApartmentEquipment {
             ApartmentId = this.m_Apartment.Id
         };
         ApartmentEquipmentsAddChangeForm form = new ApartmentEquipmentsAddChangeForm(equip);
         if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
         {
             this.bsApartmentEquipment.Add(equip);
             this.bsApartmentEquipment.set_Sort(this.bsApartmentEquipment.get_Sort());
         }
     }
 }
예제 #3
0
 private void tsBtnAddApartmentEquipment_Click(object sender, System.EventArgs e)
 {
     ApartmentEquipment equip = new ApartmentEquipment {
         ApartmentId = this.m_OldApartment.Id
     };
     ApartmentEquipmentsAddChangeForm form = new ApartmentEquipmentsAddChangeForm(equip, false, 1);
     if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
     {
         equip.ApartmentId = Apartment.Null.Id;
         equip.FromDate = equip.Dateb;
         this.bsNewApartmentEquipment.Add(equip);
     }
 }