protected override void SelectObject(object sender, System.EventArgs e) { ServicesForm form = new ServicesForm { IsMultiSelect = true }; form.SetFilter(this.FilterServiceProvider, this.FilterServiceTypes, this.addressesSource, this.addressesDest, this.ServicesOld); form.ShowDialog(this); this.ServicesOld = form.SelectedServices; this.FillServices(); }
private void btnGetServices_Click(object sender, System.EventArgs e) { System.DateTime date = this.dbxDate.IsNull ? Constants.NullDate : this.dbxDate.Value; Area @null = Area.Null; if ((this.Addresses != null) && (this.Addresses.get_Count() > 0)) { @null = new Area(); @null.SaveChanges(); @null.SaveAddresses(this.m_Addresses); } this.m_Services = (this.bsServices.get_DataSource() ?? new ObjectList<ServiceOld>()) as ObjectList<ServiceOld>; ServicesForm form = new ServicesForm(@null, date, this.m_Services, null, House.Null, System.DateTime.MinValue, System.DateTime.MaxValue) { IsMultiSelect = true }; form.ShowDialog(this); this.bsServices.set_DataSource(form.SelectedServices); @null.DeleteWithRelations(); this.cbAll.set_Checked(true); this.dgvServices_SelectedAllRows(); if (this.OnServicesSelected != null) { this.OnServicesSelected(form.SelectedServices); } }
private void tsBtnSearchService_Click(object sender, System.EventArgs e) { ServicesForm form = new ServicesForm { IsMultiSelect = false }; if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.Yes) { this.SelectedService(form.SelectedServices); } }