예제 #1
0
 public MainWindow()
 {
     InitializeComponent();
     transportService          = new TransportsService("TransportDbConnection");
     transports                = transportService.GetAll();
     cBoxTransport.DataContext = transports;
 }
예제 #2
0
        private void UpdateControls()
        {
            int index = cBoxTransport.SelectedIndex;

            transportService            = new TransportsService("TransportDbConnection");
            transports                  = transportService.GetAll();
            cBoxTransport.DataContext   = transports;
            cBoxTransport.SelectedIndex = index;
        }