private void OpenDetailView(AbstractTransport transport) { var detailForm = new DetailViewCarForm(); detailForm.SetCorrectTransportType(transport); detailForm.Show(); this.Hide(); }
private void SearchBox_TextChanged(object sender, EventArgs e) { GridTransport.Rows.Clear(); List <AbstractTransport> findedItems; if (searchBox.Text != "") { findedItems = this.listTransport.Where(x => x.CheckExist(searchBox.Text)).ToList(); } else { findedItems = this.listTransport; } AbstractTransport.SetDataInGrid(this.GridTransport, findedItems); }
private void FillListView() { this.listTransport = DataBaseService.GetInstanse().GetAllTransports(); AbstractTransport.SetDataInGrid(this.GridTransport, this.listTransport); }