Beispiel #1
0
        public MainWindow()
        {
            InitializeComponent();
            bL = MyBL.Instance;
            string hostingUnitName = "Nave Mahmad";

            bL.addHostingUnit(new HostingUnit(new Host(), hostingUnitName, Enums.HostingUnitType.Zimmer));
            bL.addOrder(new BE.Order(Enums.OrderStatus.Closed, DateTime.Now));

            lb_HostingUnits.DataContext = bL.getAllHostingUnits();
            // lb_HostingUnits.DataContext = bL.getHostingUnits(hostingUnit => hostingUnit.HostingUnitType == Enums.HostingUnitType.Zimmer);
        }
Beispiel #2
0
 public void creatOrder(GuestRequest guestRequest, HostingUnit hostingUnit)
 {
     if (bL.getAllOrders(item => item.GuestRequestKey == guestRequest.GuestRequestKey &&
                         item.HostingUnitKey == hostingUnit.HostingUnitKey).Count == 0)
     {
         Order = new Order();
         Order.GuestRequestKey = guestRequest.GuestRequestKey;
         Order.HostingUnitKey  = hostingUnit.HostingUnitKey;
         Order.GuestMail       = guestRequest.MailAddress;
         bL.addOrder(Order);
     }
 }