private void updateComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ComboBox         comboBox   = sender as ComboBox;
            MessageBoxResult messageBox = MessageBox.Show("האם הינך בטוח שברצונך לשנות את סטטוס ההזמנה?", "שאלה", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.Yes, MessageBoxOptions.RtlReading);

            if (messageBox == MessageBoxResult.No)
            {
                return;
            }
            order = comboBox.DataContext as Order;
            OrderStatus Status = (OrderStatus)comboBox.SelectedItem;

            try
            {
                if (Status == OrderStatus.MAIL_SENT)
                {
                    email.RunWorkerAsync();
                }
                else
                {
                    bl.UpdateStatusOrder(Status, order.Key);
                }
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }
            finally
            {
                lstOrders = bl.GetOrdersByHost(int.Parse(tb_HostId.Text)).ToList();
                this.OrdersViewList.ItemsSource = lstOrders;
                this.OrdersViewList.Items.Refresh();
            }
        }
Exemplo n.º 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);
                }
            }
        }
        static void Main(string[] args)
        {
            BlApi.IBl bl  = BlApi.BlFactory.GetBLObj();
            Order     tmp = bl.GetOrder(5);



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