private void btnAdd_Click(object sender, System.EventArgs e) { OrganizationProperties organizationProperties = new OrganizationProperties { OrganizationId = this.m_organization.Id }; OrganizationPropertieAddChangeForm form = new OrganizationPropertieAddChangeForm(organizationProperties); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.UpdateBindingSource(); } }
public OrganizationPropertieAddChangeForm(OrganizationProperties organizationProperties) : this() { this.sfdPropertie.Faset = FasetsEnum.OrganizationProperties; this.sfdPropertie.RefreshValues(); this.m_organizationPropertie = organizationProperties; if (this.m_organizationPropertie.IsNew) { this.set_Text("Добавление свойств организации"); this.butOK.set_Text("Добавить"); } else { this.set_Text("Изменение свойств организации"); this.butOK.set_Text("Изменить"); } this.m_organizationPropertie.BeginEdit(); this.bindingSource.set_DataSource(this.m_organizationPropertie); this.sfdPropertie.SetSelectedFasetItem(this.m_organizationPropertie.PropertyId); }
public OrganizationPropertieAddChangeForm() { this.m_organizationPropertie = OrganizationProperties.Null; this.InitializeComponent(); }