public AddBusWindow(IBL _bl)
 {
     InitializeComponent();
     this.bl     = _bl;
     this.newBus = new BL.BO.Bus();
     DataContext = this.newBus;
 }
 public UpdateBusWindow(IBL _bl, BL.BO.Bus _bus)
 {
     InitializeComponent();
     if (_bus == null)
     {
         return;
     }
     this.bl                          = _bl;
     this.busToUpdate                 = _bus;
     DataContext                      = this.busToUpdate;
     cbStatus.ItemsSource             = Enum.GetValues(typeof(BL.BO.BusStatus));
     this.licenseNumberTextBlock.Text = _bus.LicenceNum.ToString();
 }
 private void busDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     this.bus = (BL.BO.Bus) this.busDataGrid.SelectedItem;
     this.btnDeleteBus.IsEnabled = true;
     this.btnUpdateBus.IsEnabled = true;
 }