private void tsbChange_Click(object sender, System.EventArgs e) { AccountHouseHolder currentAccountHouseHolder = this.GetCurrentAccountHouseHolder(); if (currentAccountHouseHolder == AccountHouseHolder.Null) { System.Windows.Forms.MessageBox.Show("Выберите элемент для изменения"); } else { AccountHouseHolderHistoryAddChangeForm form = new AccountHouseHolderHistoryAddChangeForm(currentAccountHouseHolder); form.ShowDialog(this); if (form.DialogResult == System.Windows.Forms.DialogResult.OK) { currentAccountHouseHolder.SaveChanges(); this.UpdateAccountHouseHolderHistory(); } } }
private void tsbAdd_Click(object sender, System.EventArgs e) { AccountHouseHolder accountHouseHolder = new AccountHouseHolder { AccountId = this.m_accountId }; AccountHouseHolderHistoryAddChangeForm form = new AccountHouseHolderHistoryAddChangeForm(accountHouseHolder); form.ShowDialog(this); if (form.DialogResult == System.Windows.Forms.DialogResult.OK) { accountHouseHolder.SaveChanges(); this.UpdateAccountHouseHolderHistory(); } }