コード例 #1
0
        public HostsByNumOfHostingUnits()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl = FactoryBL.GetBl();

            //IEnumerable<IGrouping<int, BE.Host>> hosts;
            //List<BE.Host> hostList = new List<BE.Host>();
            //hosts = bl.GetHostsByNumOfHostingUnits();

            //foreach (var item in hosts)
            //{
            //    foreach (var v in item)
            //    {
            //        hostList.Add(v);
            //    }
            //}

            List <BE.Host> hostList = bl.GetHostList();


            HostsByNumOfHostingUnits_Grouping.ItemsSource = hostList;

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(HostsByNumOfHostingUnits_Grouping.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("NumOfHostingUnits");

            view.GroupDescriptions.Add(groupDescription);
        }
コード例 #2
0
        public AddHostingUnit(BE.Host ho)
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl          = FactoryBL.GetBl();
            hostingUnit = new BE.HostingUnit();
            BE.Host host = ho;
            this.DataContext = hostingUnit;

            errorMessages = new List <string>();

            //this.HostId.ItemsSource = bl.GetHostList();
            //this.HostId.DisplayMemberPath = "HostKey";
            //this.HostId.SelectedValuePath = "HostKey";

            this.HostId.Text = host.HostKey.ToString();

            this.Area.ItemsSource = Enum.GetValues(typeof(Enums.Area));
            this.Type.ItemsSource = Enum.GetValues(typeof(Enums.HostingUnitType));
            this.Food.ItemsSource = Enum.GetValues(typeof(Enums.Food));

            this.Pool.Text                = "No";
            this.Jacuzzi.Text             = "No";
            this.Porch.Text               = "No";
            this.ChildrenAttractions.Text = "No";
        }
コード例 #3
0
        public AddOrder()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl               = FactoryBL.GetBl();
            order            = new BE.Order();
            this.DataContext = order;

            this.GuestRequestKey.ItemsSource       = bl.GetGuestRequestList();
            this.GuestRequestKey.DisplayMemberPath = "GuestRequestKey";
            this.GuestRequestKey.SelectedValuePath = "GuestRequestKey";

            this.HostingUnitKey.ItemsSource       = bl.GetHostingUnitList();
            this.HostingUnitKey.DisplayMemberPath = "HostingUnitKey";
            this.HostingUnitKey.SelectedValuePath = "HostingUnitKey";

            this.Area.ItemsSource                = Enum.GetValues(typeof(Enums.Area));
            this.Type.ItemsSource                = Enum.GetValues(typeof(Enums.HostingUnitType));
            this.Pool.ItemsSource                = Enum.GetValues(typeof(Enums.Options));
            this.Jaccuzzi.ItemsSource            = Enum.GetValues(typeof(Enums.Options));
            this.Porch.ItemsSource               = Enum.GetValues(typeof(Enums.Options));
            this.Food.ItemsSource                = Enum.GetValues(typeof(Enums.Food));
            this.ChildrenAttractions.ItemsSource = Enum.GetValues(typeof(Enums.Options));
            this.EntryDate.DisplayDate           = DateTime.Now;
            this.ReleaseDate.DisplayDateEnd      = DateTime.Now;

            errorMessages = new List <string>();
        }
コード例 #4
0
        public GuestRequestsByArea()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl = FactoryBL.GetBl();
            //guestRequest = new GuestRequest();
            //this.DataContext = guestRequest;

            IEnumerable <IGrouping <Enums.Area, GuestRequest> > guestRequests;
            List <GuestRequest> guestRequestsList = new List <GuestRequest>();

            guestRequests = bl.GetGuestRequestsByArea();

            foreach (var item in guestRequests)
            {
                foreach (var v in item)
                {
                    guestRequestsList.Add(v);
                }
            }

            GuestRequestsByArea_Grouping.ItemsSource = guestRequestsList;

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(GuestRequestsByArea_Grouping.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("Area");

            view.GroupDescriptions.Add(groupDescription);
        }
コード例 #5
0
        public HostingUnitByArea()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl = FactoryBL.GetBl();

            IEnumerable <IGrouping <Enums.Area, BE.HostingUnit> > hostingUnits;
            List <BE.HostingUnit> hostingUnitsList = new List <BE.HostingUnit>();

            hostingUnits = bl.GetHostingUnitsByArea();

            foreach (var item in hostingUnits)
            {
                foreach (var v in item)
                {
                    hostingUnitsList.Add(v);
                }
            }

            HostingUnitByArea_Grouping.ItemsSource = hostingUnitsList;

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(HostingUnitByArea_Grouping.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("Area");

            view.GroupDescriptions.Add(groupDescription);
        }
コード例 #6
0
        public UpdateOrder(BE.Order or)
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl    = FactoryBL.GetBl();
            order = or;

            //this.OrderKey.ItemsSource = bl.GetOrderList();
            //this.OrderKey.DisplayMemberPath = "OrderKey";
            //this.OrderKey.SelectedValuePath = "OrderKey";

            this.OrderKey.Text = order.OrderKey.ToString();

            setOrderFields();

            //this.Area.Text = order.ToString();
            //this.Type.ItemsSource = Enum.GetValues(typeof(Enums.HostingUnitType));
            //this.Pool.ItemsSource = Enum.GetValues(typeof(Enums.Options));
            //this.Jaccuzzi.ItemsSource = Enum.GetValues(typeof(Enums.Options));
            //this.Porch.ItemsSource = Enum.GetValues(typeof(Enums.Options));
            //this.Food.ItemsSource = Enum.GetValues(typeof(Enums.Food));
            //this.ChildrenAttractions.ItemsSource = Enum.GetValues(typeof(Enums.Options));
            //this.EntryDate.DisplayDate = DateTime.Now;
            //this.ReleaseDate.DisplayDateEnd = DateTime.Now;
            this.Status.ItemsSource = Enum.GetValues(typeof(Enums.OrderStatus));

            errorMessages = new List <string>();
        }
コード例 #7
0
 public HostLogin()
 {
     InitializeComponent();
     InitializeComponent();
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
     bl   = FactoryBL.GetBl();
     host = new BE.Host();
 }
コード例 #8
0
        public UpdateHost(BE.Host ho)
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl   = FactoryBL.GetBl();
            host = ho;

            this.BankBranchDetails.ItemsSource = bl.GetBankAccounts();
            setHostFields();


            errorMessages = new List <string>();
        }
コード例 #9
0
        public AddHost()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl               = FactoryBL.GetBl();
            host             = new BE.Host();
            this.DataContext = host;

            this.BankBranch.ItemsSource = bl.GetBankAccounts();


            errorMessages = new List <string>();
        }
コード例 #10
0
        public DeleteHostingUnit()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl          = FactoryBL.GetBl();
            hostingUnit = null;

            this.HostingUnitKey.ItemsSource       = bl.GetHostingUnitList();
            this.HostingUnitKey.DisplayMemberPath = "HostingUnitKey";
            this.HostingUnitKey.SelectedValuePath = "HostingUnitKey";

            errorMessages = new List <string>();
        }
コード例 #11
0
        public HostingUnit(BE.HostingUnit hu)
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl          = FactoryBL.GetBl();
            hostingUnit = hu;
            setHostingUnitFields();

            List <BE.Order> orders = bl.GetOrderList();
            var             v      = from item in orders
                                     where item.HostingUnitKey == hostingUnit.HostingUnitKey
                                     select item;

            //if (v.FirstOrDefault() == null)
            //    MessageBox.Show("No available orders");
            orders = v.ToList();
            OrderList.ItemsSource = orders;
        }
コード例 #12
0
        public UpdateHostingUnit(BE.HostingUnit hu)
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl          = FactoryBL.GetBl();
            hostingUnit = hu;

            this.HostingUnitKey.Text = hostingUnit.HostingUnitKey.ToString();
            //this.HostingUnitKey.ItemsSource = bl.GetHostingUnitList();
            //this.HostingUnitKey.DisplayMemberPath = "HostingUnitKey";
            //this.HostingUnitKey.SelectedValuePath = "HostingUnitKey";

            this.Area.ItemsSource = Enum.GetValues(typeof(Enums.Area));
            this.Type.ItemsSource = Enum.GetValues(typeof(Enums.HostingUnitType));
            this.Food.ItemsSource = Enum.GetValues(typeof(Enums.Food));

            setHostingUnitFields();

            errorMessages = new List <string>();
        }
コード例 #13
0
        public AddGuestRequest()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl               = FactoryBL.GetBl();
            guestRequest     = new GuestRequest();
            this.DataContext = guestRequest;

            this.Area.ItemsSource                = Enum.GetValues(typeof(Enums.Area));
            this.Type.ItemsSource                = Enum.GetValues(typeof(Enums.HostingUnitType));
            this.Pool.ItemsSource                = Enum.GetValues(typeof(Enums.Options));
            this.Jaccuzzi.ItemsSource            = Enum.GetValues(typeof(Enums.Options));
            this.Porch.ItemsSource               = Enum.GetValues(typeof(Enums.Options));
            this.Food.ItemsSource                = Enum.GetValues(typeof(Enums.Food));
            this.ChildrenAttractions.ItemsSource = Enum.GetValues(typeof(Enums.Options));
            this.EntryDate.DisplayDateStart      = DateTime.Now;
            this.ReleaseDate.DisplayDateStart    = DateTime.Now;

            errorMessages = new List <string>();
        }
コード例 #14
0
ファイル: Host.xaml.cs プロジェクト: Michal-Edry/.NetProject
        public Host(BE.Host ho)
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl   = FactoryBL.GetBl();
            host = ho;

            setHostFields();
            //this.BankBranch.ItemsSource = bl.GetBankAccounts();

            //errorMessages = new List<string>();

            List <BE.HostingUnit> hostingUnits = (from item in bl.GetHostingUnitList()
                                                  where host.HostKey == item.Owner.HostKey
                                                  select item).ToList();

            //List < BE.HostingUnit > hostingUnits = bl.GetHostingUnitList();
            HostingUnitsList.ItemsSource = hostingUnits;

            this.HostingUnitsList.ItemsSource = hostingUnits;
        }
コード例 #15
0
        public Manager()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl = FactoryBL.GetBl();

            List <GuestRequest> guestRequests = bl.GetGuestRequestList();

            GuestRequests.ItemsSource = guestRequests;

            List <BE.Host> hosts = bl.GetHostList();

            Hosts.ItemsSource = hosts;

            List <BE.HostingUnit> hostingUnits = bl.GetHostingUnitList();

            HostingUnits.ItemsSource = hostingUnits;

            List <BE.Order> orders = bl.GetOrderList();

            Orders.ItemsSource = orders;
        }
コード例 #16
0
        public GetGuestRequestsByNumOfPeople()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl = FactoryBL.GetBl();
            int help = 1;

            IEnumerable <IGrouping <int, GuestRequest> > guestRequests;
            List <GuestRequest> guestRequestsList = new List <GuestRequest>();

            guestRequests = bl.GetGuestRequestsByNumOfPeople();

            foreach (var item in guestRequests)
            {
                foreach (var v in item)
                {
                    guestRequestsList.Add(v);
                }
            }

            //foreach (var item in guestRequests)
            //{
            //    GetGuestRequestsByNumOfPeople_Grouping.ItemsSource = item;
            //    help = item.First().NumOfAdults + item.First().NumOfKids;

            //    CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(GetGuestRequestsByNumOfPeople_Grouping.ItemsSource);
            //    PropertyGroupDescription groupDescription = new PropertyGroupDescription("help");
            //    view.GroupDescriptions.Add(groupDescription);
            //}
            guestRequestsList = guestRequestsList.OrderBy(g => g.NumOfTotalPeople).ToList();
            GetGuestRequestsByNumOfPeople_Grouping.ItemsSource = guestRequestsList;

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(GetGuestRequestsByNumOfPeople_Grouping.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("NumOfTotalPeople");

            view.GroupDescriptions.Add(groupDescription);
        }
コード例 #17
0
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            IBL bl = FactoryBL.GetBl();

            return(bl.GetDish((int)value).DishPrice);
        }
コード例 #18
0
ファイル: Program.cs プロジェクト: Michal-Edry/.NetProject
        static void Main(string[] args)
        {
            IBl bl = FactoryBL.GetBl();

            try
            {
                #region GuestRequset
                GuestRequest g1 = new GuestRequest()
                {
                    GuestRequestKey   = Configuration.GuestRequestKey++,
                    FirstName         = "li",
                    LastName          = "edri",
                    Email             = "*****@*****.**",
                    RequirementStatus = Enums.RequirementStatus.DealMade,
                    RegistrationDate  = DateTime.Today,
                    EntryDate         = new DateTime(2020, 1, 3),
                    ReleaseDate       = new DateTime(2020, 1, 8),
                    Area                = Enums.Area.Jerusalem,
                    HostingUnitType     = Enums.HostingUnitType.Hotel,
                    NumOfAdults         = 2,
                    NumOfKids           = 0,
                    Pool                = Enums.Options.Necessary,
                    Jacuzzi             = Enums.Options.Optional,
                    Porch               = Enums.Options.Optional,
                    ChildrenAttractions = Enums.Options.NotInterested,
                    Food                = Enums.Food.All,
                };
                GuestRequest g2 = new GuestRequest()
                {
                    GuestRequestKey   = Configuration.GuestRequestKey++,
                    FirstName         = "Michal",
                    LastName          = "edry",
                    Email             = "*****@*****.**",
                    RequirementStatus = Enums.RequirementStatus.Open,
                    RegistrationDate  = DateTime.Today,
                    EntryDate         = new DateTime(2020, 1, 24),
                    ReleaseDate       = new DateTime(2020, 1, 29),
                    Area                = Enums.Area.North,
                    HostingUnitType     = Enums.HostingUnitType.Zimmer,
                    NumOfAdults         = 4,
                    NumOfKids           = 3,
                    Pool                = Enums.Options.Necessary,
                    Jacuzzi             = Enums.Options.Necessary,
                    Porch               = Enums.Options.NotInterested,
                    ChildrenAttractions = Enums.Options.Optional,
                    Food                = Enums.Food.Breakfast,
                };
                GuestRequest g3 = new GuestRequest()
                {
                    GuestRequestKey   = Configuration.GuestRequestKey++,
                    FirstName         = "shlomo",
                    LastName          = "bokris",
                    Email             = "*****@*****.**",
                    RequirementStatus = Enums.RequirementStatus.DealExpires,
                    RegistrationDate  = DateTime.Today,
                    EntryDate         = new DateTime(2020, 2, 15),
                    ReleaseDate       = new DateTime(2020, 3, 1),
                    Area                = Enums.Area.All,
                    HostingUnitType     = Enums.HostingUnitType.Camp,
                    NumOfAdults         = 5,
                    NumOfKids           = 1,
                    Pool                = Enums.Options.NotInterested,
                    Jacuzzi             = Enums.Options.NotInterested,
                    Porch               = Enums.Options.NotInterested,
                    ChildrenAttractions = Enums.Options.Necessary,
                    Food                = Enums.Food.All,
                };

                bl.AddGuestRequest(g1);
                bl.AddGuestRequest(g2);
                bl.AddGuestRequest(g3);
                //foreach (var item in bl.GetGuestRequestList())
                //{
                //    Console.WriteLine(item);
                //}

                //g1.Area = Enums.Area.Center;
                //bl.UpdateGuestRequest(g1);
                //foreach (var item in bl.GetGuestRequestList())
                //{
                //    Console.WriteLine(item);
                //}

                //List<GuestRequest> l1 = bl.DealExpires();
                //foreach(var item in l1)
                //{
                //    Console.WriteLine(item);
                //}

                //var v = bl.GetAllGuesstRequests(t => t.Area == Enums.Area.Jerusalem);
                //v.ToList();
                //foreach (var item in v)
                //{
                //    Console.WriteLine(item);
                //}
                #endregion
                #region HostingUnits
                //HostingUnit h1 = new HostingUnit()
                //{
                //    HostingUnitKey = Configuration.HostUnitKey++,
                //    Owner = new Host()
                //    {
                //        HostKey = 209146133,
                //        FirstName = "li",
                //        LastName = "bokris",
                //        PhoneNumber = "050-3680202",
                //        Email = "*****@*****.**",
                //        BankBranchDetails = new BankBranch()
                //        {
                //            BankNumber = 20,
                //            BankName = "mizrahi",
                //            BranchNumber = 416,
                //            BranchAddress = "habad 1/2",
                //            BranchCity = "hifa"
                //        },
                //        BankAccountNumber = 926833,
                //        CollectionClearance = true
                //    },
                //    HostingUnitName = "patal",
                //    Area = Enums.Area.Jerusalem,
                //    HostingUnitType = Enums.HostingUnitType.Hotel,
                //    Pool = true,
                //    Jacuzzi = true,
                //    ChildrenAttractions = true,
                //    Porch = true,
                //    Food = Enums.Food.All,
                //    Beds = 4
                //};
                //h1.Diary[4, 12] = true;
                //h1.Diary[4, 13] = true;
                //h1.Diary[4, 14] = true;
                //h1.Diary[4, 15] = true;

                //HostingUnit h2 = new HostingUnit()
                //{
                //    HostingUnitKey = Configuration.HostUnitKey++,
                //    Owner = new Host()
                //    {
                //        HostKey = 210030565,
                //        FirstName = "Michal",
                //        LastName = "Chen",
                //        PhoneNumber = "058-6334444",
                //        Email = "*****@*****.**",
                //        BankBranchDetails = new BankBranch()
                //        {
                //            BankNumber = 11,
                //            BankName = "Leumi",
                //            BranchNumber = 916,
                //            BranchAddress = "Zohar 1/2",
                //            BranchCity = "Biet Shemesh"
                //        },
                //        BankAccountNumber = 1235555,
                //        CollectionClearance = true
                //    },
                //    HostingUnitName = "Plaza",
                //    Area = Enums.Area.South,
                //    HostingUnitType = Enums.HostingUnitType.Apartment,
                //    Pool = false,
                //    Jacuzzi = true,
                //    ChildrenAttractions = false,
                //    Porch = true,
                //    Food = Enums.Food.Breakfast,
                //    Beds = 8
                //};
                //h2.Diary[2, 12] = true;
                //h2.Diary[2, 13] = true;
                //h2.Diary[2, 14] = true;
                //h2.Diary[2, 15] = true;
                //h2.Diary[2, 16] = true;
                //h2.Diary[2, 17] = true;

                //HostingUnit h3 = new HostingUnit()
                //{
                //    HostingUnitKey = Configuration.HostUnitKey++,
                //    Owner = new Host()
                //    {
                //        HostKey = 209146133,
                //        FirstName = "li",
                //        LastName = "bokris",
                //        PhoneNumber = "050-3680202",
                //        Email = "*****@*****.**",
                //        BankBranchDetails = new BankBranch()
                //        {
                //            BankNumber = 20,
                //            BankName = "mizrahi",
                //            BranchNumber = 416,
                //            BranchAddress = "habad 1/2",
                //            BranchCity = "hifa"
                //        },
                //        BankAccountNumber = 926833,
                //        CollectionClearance = true
                //    },
                //    HostingUnitName = "lila",
                //    Area = Enums.Area.North,
                //    HostingUnitType = Enums.HostingUnitType.Zimmer,
                //    Pool = true,
                //    Jacuzzi = true,
                //    ChildrenAttractions = false,
                //    Porch = false,
                //    Food = Enums.Food.Dinner,
                //    Beds = 6
                //};
                //h2.Diary[6, 3] = true;
                //h2.Diary[6, 4] = true;
                //h2.Diary[8, 12] = true;
                //h2.Diary[8, 13] = true;
                //h2.Diary[3, 10] = true;
                //h2.Diary[2, 17] = true;

                //bl.AddHostingUnit(h1);
                //bl.AddHostingUnit(h2);
                //bl.AddHostingUnit(h3);
                ////foreach(var item in bl.GetHostingUnitList())
                ////{
                ////    Console.WriteLine(item);
                ////}

                ////bl.DeleteHostingUnit(10000002);
                ////foreach (var item in bl.GetHostingUnitList())
                ////{
                ////    Console.WriteLine(item);
                ////}

                ////h2.Owner.FirstName = "Yael";
                ////bl.UpdateHostingUnit(h2);
                ////foreach (var item in bl.GetHostingUnitList())
                ////{
                ////    Console.WriteLine(item);
                ////}

                ////List<HostingUnit> l2 = bl.GetAvailableHostingUnitList(new DateTime(2020, 6, 3), 4);
                ////foreach(var item in l2)
                ////{
                ////    Console.WriteLine(item);
                ////}

                ////List<HostingUnit> l3 = bl.FiveStars();
                ////foreach (var item in l3)
                ////{
                ////    Console.WriteLine(item);
                ////}

                ////List<HostingUnit> l4 = bl.Hotels();
                ////foreach (var item in l4)
                ////{
                ////    Console.WriteLine(item);
                ////}

                ////Console.WriteLine(bl.numOfHostingUnitsUpNorth());

                ////List<HostingUnit> l5 = bl.HasChildrenAttractions();
                ////foreach (var item in l5)
                ////{
                ////    Console.WriteLine(item);
                ////}
                #endregion
                #region Order
                Order o1 = new Order()
                {
                    HostingUnitKey  = 10000001,
                    GuestRequestKey = 10000000,
                    OrderKey        = Configuration.OrderKey++,
                    Status          = Enums.OrderStatus.EmailSent,
                    CreateDate      = new DateTime(2019, 12, 12),
                    OrderDate       = new DateTime(2019, 12, 25)
                };
                Order o2 = new Order()
                {
                    HostingUnitKey  = 10000002,
                    GuestRequestKey = 10000001,
                    OrderKey        = Configuration.OrderKey++,
                    Status          = Enums.OrderStatus.NotYetAddressed,
                    CreateDate      = new DateTime(2020, 7, 10),
                    OrderDate       = new DateTime(2020, 7, 14)
                };
                Order o3 = new Order()
                {
                    HostingUnitKey  = 10000000,
                    GuestRequestKey = 10000001,
                    OrderKey        = Configuration.OrderKey++,
                    Status          = Enums.OrderStatus.CloseByClient,
                    CreateDate      = new DateTime(2020, 6, 8),
                    OrderDate       = new DateTime(2020, 6, 11)
                };

                bl.AddOrder(o1);
                bl.AddOrder(o2);
                bl.AddOrder(o3);

                //foreach(var item in bl.GetOrderList())
                //{
                //    Console.WriteLine(item);
                //}

                //o2.Status = Enums.OrderStatus.EmailSent;
                //bl.UpdateOrder(o2);
                //foreach (var item in bl.GetOrderList())
                //{
                //    Console.WriteLine(item);
                //}

                //List<Order> l1 = bl.GetPassOrdersList(1);
                //foreach (var item in l1)
                //{
                //    Console.WriteLine(item);
                //}

                //Console.WriteLine(bl.NumOfOrders(g1));

                //Console.WriteLine(bl.NumOfSendOrdersAndCloseOrders(h1));

                //List<Order> l2 = bl.NotYetAddressedOrders();
                //foreach (var item in l2)
                //{
                //    Console.WriteLine(item);
                //}
                #endregion
                #region Grouping

                ////g3.Area = Enums.Area.Jerusalem;
                ////bl.UpdateGuestRequest(g3);
                //int i = 1;
                //var v = bl.GetGuestRequestsByArea();
                //foreach (var item in v)
                //{
                //    Console.WriteLine("Group number " + i++);
                //    foreach(var w in item)
                //    {
                //        Console.WriteLine(w);
                //    }
                //    Console.WriteLine();
                //}

                ////g3.NumOfKids = 2;
                ////bl.UpdateGuestRequest(g3);
                //int i = 1;
                //var v = bl.GetGuestRequestsByNumOfPeople();
                //foreach(var item in v)
                //{
                //    Console.WriteLine("Group number " + i++);
                //    foreach (var w in item)
                //    {
                //        Console.WriteLine(w);
                //    }
                //    Console.WriteLine();
                //}


                //int i = 1;
                //var v = bl.GetHostsByNumOfHostingUnits();
                //foreach (var item in v)
                //{
                //    Console.WriteLine("Group number " + i++);
                //    foreach (var w in item)
                //    {
                //        Console.WriteLine(w);
                //    }
                //    Console.WriteLine();
                //}


                ////g3.Area = Enums.Area.Jerusalem;
                ////bl.UpdateGuestRequest(g3);
                //int i = 1;
                //var v = bl.GetHostingUnitsByArea();
                //foreach (var item in v)
                //{
                //    Console.WriteLine("Group number " + i++);
                //    foreach (var w in item)
                //    {
                //        Console.WriteLine(w);
                //    }
                //    Console.WriteLine();
                //}
                #endregion
                #region Other Function
                //Console.WriteLine(bl.BetweenDays(new DateTime(2019, 12, 10)));
                //Console.WriteLine(bl.BetweenDays(new DateTime(2020, 3, 10), new DateTime(2020,3,20)));
                ////Console.WriteLine(bl.BetweenDays(new DateTime(2020, 3, 10)));
                #endregion
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            Console.ReadKey();
        }