private void SerchAvto_Click(object sender, RoutedEventArgs e) { if (!RequestsClass.keySerch) { RequestsClass.CheckDriverLicence(DriverLicenceSeriesTbox.Text.ToString(), DriverLicenceNumberTbox.Text.ToString()); return; } using (MyDBconnection db = new MyDBconnection()) { db.Cars.Load(); DatagridFirst.ItemsSource = db.Cars.Local.Where(x => x.DriverID == RequestsClass.Driver); } }
private void SetchInsurance_Click(object sender, RoutedEventArgs e) { if (!RequestsClass.keySerch) { RequestsClass.CheckVIn(VinTbox.Text.ToString()); return; } using (MyDBconnection db = new MyDBconnection()) { db.Insurances.Load(); DatagridFirst.ItemsSource = db.Insurances.Local.Where(x => x.InsuranceID == RequestsClass.PackageDocuments); } }
private void SerchAvto_Click(object sender, RoutedEventArgs e) { if (!RequestsClass.keySerch) { RequestsClass.CheckVIn(VinTbox.Text.ToString()); return; } using (MyDBconnection db = new MyDBconnection()) { db.Cars.Load(); DatagridFirst.ItemsSource = db.Cars.Local.Where(x => x.Vin == VinTbox.Text.ToString());; } }
private void SerchDriverLicence_Click(object sender, RoutedEventArgs e) { if (!RequestsClass.keySerch) { RequestsClass.CheckVIn(VinTbox.Text.ToString()); return; } using (MyDBconnection db = new MyDBconnection()) { db.DriversLicenses.Load(); DatagridFirst.ItemsSource = db.DriversLicenses.Local.Where(x => x.DriverID == RequestsClass.Driver); } }