public AreaPropertyAddChangeForm(AreaPropertie arProp) { this.InitializeComponent(); this.set_Font(Manager.WindowFont); this.areaPropertie = arProp; this.propertyComboBox.Faset = FasetsEnum.AreaProperties; this.propertyComboBox.RefreshValuesWithNull(); this.propertyComboBox.SelectedFasetItem = FasetItem.Null; if (!arProp.IsNew) { this.set_Text("Изменить свойство"); this.propertyComboBox.SelectedFasetItem = FasetItem.FindById(arProp.PropertyId); this.valueTextBox.set_Text(arProp.Value.ToString()); this.propertyComboBox.set_Enabled(false); } }
private void addBtn_Click(object sender, System.EventArgs e) { AreaPropertie arProp = new AreaPropertie { AreaId = this.areaId }; new AreaPropertyAddChangeForm(arProp).ShowDialog(this); this.updateAPBindingSource(); }