public MainWindow() { InitializeComponent(); person = new Person(); host = new Host(); host.HostInfo = new Person(); host.AccountDetails = new BankBranch(); lstRequest = new List <GuestRequest>(); lstUnits = new List <HostingUnit>(); lstOrders = new List <Order>(); orders = new List <Order>(); clients = bl.GetPersons().ToList(); //// orders = bl.GetOrdersList().ToList(); Units = bl.GetAllHostingUnits().ToList(); hosts = bl.GetHostList().ToList(); /* בנייה של גריד הרשמה לאורח */ AddPersonGuestGrid.DataContext = person; /* סוף! */ /* בנייה של גריד הרשמה למארח */ AddPersonHostGrid.DataContext = host; hostListView.ItemsSource = hosts; personListView.ItemsSource = clients; hostingUnitListView.ItemsSource = Units; orderManagerListView.ItemsSource = orders; order = new Order(); email = new BackgroundWorker(); email.DoWork += MailSend_DoWork; email.RunWorkerCompleted += MailSend_RunWorkerCompleted; }