Esempio n. 1
0
 void LoadData()
 {
     try
     {
         db = new KupiProdaiDBEntities();
         db.tWorkers.Load();
         dtSpotsman.ItemsSource = db.tWorkers.Local.ToBindingList();
     }
     catch
     {
         MessageBox.Show("Ошибка");
         db.Dispose();
     }
 }
Esempio n. 2
0
 public WindowEdit(tWorker worker, KupiProdaiDBEntities d)
 {
     InitializeComponent();
     db                      = d;
     sp                      = worker;
     tbFIO.Text              = worker.sFIO;
     txAddress.Text          = worker.address;
     dtpBithday.SelectedDate = worker.bithday;
     tbphone.Text            = worker.phone;
     tbbase.Text             = worker.base_worker;
     tbexp.Text              = Convert.ToString(worker.experience);
     tbsp.Text               = worker.special;
     tbprice.Text            = Convert.ToString(worker.price);
     tbpas.Text              = Convert.ToString(worker.passport);
 }