public AccountServiceGroupsAddChangeForm(AccountServiceGroup sg) : this() { this.m_AccountServiceGroup = sg; }
private void btnAddAccountServiceGroup_Click(object sender, System.EventArgs e) { if (this.m_Account != Account.Null) { AccountServiceGroup sg = new AccountServiceGroup { AccountId = this.m_Account.Id }; AccountServiceGroupsAddChangeForm form = new AccountServiceGroupsAddChangeForm(sg); if (form.ShowDialog() == System.Windows.Forms.DialogResult.Yes) { this.bsAccountServiceGroups.Add(sg); this.bsAccountServiceGroups.set_Sort(this.bsAccountServiceGroups.get_Sort()); this.bsAccountServiceGroups.set_Position(this.bsAccountServiceGroups.IndexOf(sg)); } } }