示例#1
0
        //  public event Action<ICollection<Car>> AssignCarsToOwner;

        public CarsDialog(Owner owner)
        {
            receivedOwner = owner;
            InitializeComponent();
            context = new CarOwnerDbContext();
            lblOwnerName.Content = owner.Name;
            RefreshCarsClearFields();
        }
示例#2
0
 public MainWindow()
 {
     InitializeComponent();
     try
     {
         context = new CarOwnerDbContext();
         RefreshOwnersClearFields();
     }
     catch (SystemException ex)
     {
         MessageBox.Show("Fatal error connecting to database:\n" + ex.Message);
         Environment.Exit(1);
     }
 }