示例#1
0
        private void Buttonaddorder_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (!(txt_hostingUnitName.Text == ""))
                {
                    Order o = new Order();
                    o.Status          = orderStatus.NotYetAddressed;
                    o.GuestRequestKey = gr.GuestRequestKey;
                    o.HostingUnitKey  = hu.HostingUnitKey;
                    //o.OrderDate=
                    o.CreateDate = DateTime.Now.Date;
                    MainWindow.bl.addOrder(o);
                    listgrkByArea.Remove(o.GuestRequestKey);
                    //  MainWindow.bl.updateOrderStatus(o, orderStatus.emailSent);
                    cb_grKey.DataContext = listgrkByArea;
                }
                else
                {
                    MessageBox.Show("אנא הכנס מספר יחידה", "ERROR", MessageBoxButton.OK, MessageBoxImage.Information);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "ERROR", MessageBoxButton.OK, MessageBoxImage.Information);
            }
            MessageBox.Show("ההזמנה הוספה בהצלחה", "הוספת הזמנה", MessageBoxButton.OK, MessageBoxImage.Information);
            this.Close();
            Window tmp = new clientListWindow(hostingUnitsnew);

            tmp.ShowDialog();
        }
示例#2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            this.Close();
            List <int>         x    = MainWindow.bl.gethostingUnitKeyByTz(helper_id);
            List <HostingUnit> list = new List <HostingUnit>();

            foreach (int item in x)
            {
                list.Add(MainWindow.bl.getHostingUnitByKey(item));
            }

            Window tmp = new clientListWindow(list);

            tmp.ShowDialog();
        }