private void tsbChangeRelation_Click(object sender, System.EventArgs e) { AccountServiceRelation accountServiceRelations = this.GetAccountServiceRelations(); if (accountServiceRelations != AccountServiceRelation.Null) { AccountServiceRelationsAddChangeForm form = new AccountServiceRelationsAddChangeForm(accountServiceRelations, this.m_AccountService.AccountId); if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { this.bsAccountServiceRelations.set_Sort(this.bsAccountServiceRelations.get_Sort()); this.bsAccountServiceRelations.set_Position(this.bsAccountServiceRelations.IndexOf(accountServiceRelations)); } } }
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)); } } }