public AccountServiceEquipmentsAddChangeForm(AccountServiceEquipment accountServiceEquipment, long aparmentId)
     : this()
 {
     this.m_AccountServiceEquipment = accountServiceEquipment;
     this.m_ApartmentId = aparmentId;
 }
 private void tsbDeleteEquipment_Click(object sender, System.EventArgs e)
 {
     if ((this.GetAccountServiceEquipment() != AccountServiceEquipment.Null) && (Messages.QuestionYesNo(this, "Вы действительно хотите удалить?") != System.Windows.Forms.DialogResult.No))
     {
         this.m_AccountServiceEquipment = this.GetAccountServiceEquipment();
         if ((this.m_AccountServiceEquipment != null) && (this.m_AccountServiceEquipment != AccountServiceEquipment.Null))
         {
             this.m_AccountServiceEquipment.Delete();
             this.UpdateBindingAccountServiceEquipments();
             this.IsUpdate = true;
         }
     }
 }
 public AccountServiceEquipmentsAddChangeForm()
 {
     this.m_AccountServiceEquipment = AccountServiceEquipment.Null;
     this.InitializeComponent();
     this.set_Font(Manager.WindowFont);
 }
 private void tsbAddEquipment_Click(object sender, System.EventArgs e)
 {
     if (this.m_AccountService != AccountService.Null)
     {
         AccountServiceEquipment accountServiceEquipment = new AccountServiceEquipment {
             AccountServiceId = this.m_AccountService.Id
         };
         AccountServiceEquipmentsAddChangeForm form = new AccountServiceEquipmentsAddChangeForm(accountServiceEquipment, this.m_ApartmentId);
         if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
         {
             this.bsAccountServiceEquipments.Add(accountServiceEquipment);
             this.bsAccountServiceEquipments.set_Sort(this.bsAccountServiceEquipments.get_Sort());
             this.bsAccountServiceEquipments.set_Position(this.bsAccountServiceEquipments.IndexOf(accountServiceEquipment));
             this.IsUpdate = true;
         }
     }
 }