private void tsbDeleteRelation_Click(object sender, System.EventArgs e)
 {
     if ((this.GetAccountServiceRelations() != AccountServiceRelation.Null) && (Messages.QuestionYesNo(this, "Вы действительно хотите удалить?") != System.Windows.Forms.DialogResult.No))
     {
         this.m_AccountServiceRelation = this.GetAccountServiceRelations();
         if ((this.m_AccountServiceRelation != null) && (this.m_AccountServiceRelation != AccountServiceRelation.Null))
         {
             this.m_AccountServiceRelation.Delete();
             this.UpdateBindingAccountServiceRelations();
         }
     }
 }
 public AccountServiceRelationsAddChangeForm(AccountServiceRelation accountServiceRelation, long accountId)
     : this()
 {
     this.m_AccountServiceRelation = accountServiceRelation;
     this.m_AccountId = accountId;
 }
 private void tsbAddRelation_Click(object sender, System.EventArgs e)
 {
     if (this.m_AccountService != AccountService.Null)
     {
         AccountServiceRelation accountServiceRelation = new AccountServiceRelation {
             ParentId = this.m_AccountService.Id
         };
         AccountServiceRelationsAddChangeForm form = new AccountServiceRelationsAddChangeForm(accountServiceRelation, this.m_AccountService.AccountId);
         if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
         {
             this.bsAccountServiceRelations.Add(accountServiceRelation);
             this.bsAccountServiceRelations.set_Sort(this.bsAccountServiceRelations.get_Sort());
             this.bsAccountServiceRelations.set_Position(this.bsAccountServiceRelations.IndexOf(accountServiceRelation));
         }
     }
 }
 public AccountServiceRelationsAddChangeForm()
 {
     this.m_AccountServiceRelation = AccountServiceRelation.Null;
     this.InitializeComponent();
     this.set_Font(Manager.WindowFont);
 }