private void OrderList_Click(object sender, RoutedEventArgs e)
        {
            ListOrdersWindow listOrdersWindow = new ListOrdersWindow();

            listOrdersWindow.Show();
            this.Close();
        }
Exemple #2
0
        private void NewOrder_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                OrderModel NewOrder = new OrderModel()
                {
                    IdDevice           = DeviceLogic.GetIdDevice(dt.Rows[DeviceList.SelectedIndex].ItemArray[0].ToString()),
                    IdClient           = SecurityContext.IdUser,
                    DateOrder          = DateTime.Today,
                    ProblemDescription = ProblemDescription.Text,
                    SelectedService    = (Service.SelectedIndex + 1),
                    StageOrder         = 1
                };



                OrderLogic.SaveOrder(NewOrder);
                MessageBox.Show("Заказ успешно оформлен");

                ListOrdersWindow listOrdersWindow = new ListOrdersWindow();
                listOrdersWindow.Show();
                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }