Пример #1
0
 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);
     }
 }
Пример #2
0
 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);
     }
 }
Пример #3
0
 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());;
     }
 }
Пример #4
0
 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);
     }
 }