private void btnAddresses_Click(object sender, System.EventArgs e) { base.set_UseWaitCursor(true); AreaAddressesForm form = new AreaAddressesForm(this.addressesSource, this.addressesDest); if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { this.addressesSource = form.GetAddressesSource(); this.addressesDest = form.GetAddressesDest(); base.set_UseWaitCursor(false); } }
private void changetoolStripButton_Click(object sender, System.EventArgs e) { AreaAddressesForm form = new AreaAddressesForm(this.addressesSource, this.addressesDest); if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { this.addressesSource = form.GetAddressesSource(); this.addressesDest = form.GetAddressesDest(); this.bsAddress.set_DataSource(this.addressesDest); if (this.AddressSelected != null) { this.AddressSelected(); } } }
protected override void SelectObject(object sender, System.EventArgs e) { AreaAddressesForm form; if (((this.addressesSource.get_Count() == 0) && (this.addressesDest.get_Count() == 0)) && this.IsByUser) { this.addressesSource = LocalAddress.GetUserAddresses(); if (this.addressesSource.get_Count() == 0) { Messages.ShowMessage("Адресный план для данного пользователя пустой"); return; } } if (this.m_SelectedByUserArea == Area.Null) { form = new AreaAddressesForm(this.addressesSource, this.addressesDest); this.addressesSource = form.GetAddressesSource(); if (base.txt.get_Text() != "") { this.addressesDest = form.GetAddressesDest(); } } else { form = new AreaAddressesForm(this.m_SelectedByUserArea); } form.ShowDialog(this); if (form.DialogResult == System.Windows.Forms.DialogResult.OK) { this.m_SelectedByUserArea = form.SelectedByUserArea; this.addressesDest = form.GetAddressesDest(); this.addressesSource = form.GetAddressesSource(); this.Fill(); } }