Exemplo n.º 1
0
        private void buttonBreakOrder_Click(object sender, EventArgs e)
        {
            Controllers.Interfaces.IClientController controller = new Controllers.ClientController(Model);
            Order order = new Order();

            order.Data   = textBox2.Text;
            order.Id     = Convert.ToInt32(textBox1.Text);
            order.Status = (OrderStatus)Enum.Parse(typeof(OrderStatus), textStatusOrder.Text);
            controller.BreakOrder(order);
            label4.Text = "BreakOrder is Done";
        }
 private void Refresh()
 {
     try
     {
         clientController         = new Controllers.ClientController();
         mainDataGrid.ItemsSource = clientController.Clients;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "ERROR");
     }
 }
Exemplo n.º 3
0
        private void buttonOrderStatus_Click(object sender, EventArgs e)
        {
            Controllers.Interfaces.IClientController controller = new Controllers.ClientController(Model);
            Order order = new Order();

            order.Data   = textBox2.Text;
            order.Id     = Convert.ToInt32(textBox1.Text);
            order.Status = (OrderStatus)Enum.Parse(typeof(OrderStatus), textStatusOrder.Text);

            OrderStatus orderStatus = controller.CheckOrderStatus(order);

            textStatusOrder.Text = orderStatus.ToString();
        }
        public ClientsForm()
        {
            InitializeComponent();

            try
            {
                clientController         = new Controllers.ClientController();
                mainDataGrid.ItemsSource = clientController.Clients;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ERROR DB");
            }
        }
Exemplo n.º 5
0
        public AddClient()
        {
            InitializeComponent();

            DataBase.EntitiesWpfDataBase entities = new DataBase.EntitiesWpfDataBase();

            cbGender.ItemsSource = entities.Gender.ToList();



            try
            {
                clientController = new Controllers.ClientController();

                mainGrid.DataContext = clientController.newClient;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ERROR DB");
            }
        }