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;
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            BlApi.IBl          bl  = BlApi.BlFactory.GetBLObj();
            Order              tmp = bl.GetOrder(5);
            List <HostingUnit> lst = bl.GetAllHostingUnits().ToList();

            Console.WriteLine(tmp);
            foreach (var i in lst)
            {
                Console.WriteLine(i);
            }

            Console.WriteLine((bl.GetPerson(212282610)));
            try
            {
                bl.UpdateStatusOrder(OrderStatus.APPROVED, 5);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            IEnumerable <IGrouping <Areas, BO.GuestRequest> > g = bl.GetGroupGuestRequestsByArea();

            foreach (var item in g)
            {
                foreach (var y in item)
                {
                    Console.WriteLine(y);
                }
            }
        }