示例#1
0
 private void tsbEdit_Click(object sender, System.EventArgs e)
 {
     AccountProperty currentAccountProperty = this.GetCurrentAccountProperty();
     if ((currentAccountProperty != null) && (currentAccountProperty != AccountProperty.Null))
     {
         AccountPropertiesAddChangeForm form = new AccountPropertiesAddChangeForm(currentAccountProperty);
         form.set_Text("Изменение параметра");
         if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
         {
             this.bsAccountProperties.set_Sort(this.bsAccountProperties.get_Sort());
             this.UpdateBindingSourceAccountProperties();
         }
     }
 }
示例#2
0
 private void tbsAdd_Click(object sender, System.EventArgs e)
 {
     AccountProperty accProp = new AccountProperty {
         AccountId = this.m_Account.Id
     };
     AccountPropertiesAddChangeForm form = new AccountPropertiesAddChangeForm(accProp);
     form.set_Text("Добавление параметра");
     if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
     {
         this.bsAccountProperties.set_DataSource(AccountProperty.FindByPropertyId(accProp.AccountId, (long) accProp.PropertyId));
         this.bsAccountProperties.set_Sort(this.bsAccountProperties.get_Sort());
         this.UpdateBindingSourceAccountProperties();
     }
 }