private void buttonAddOrder_Click(object sender, EventArgs e) { RestController.AddOrder(dateTimePickerOrder.Value, Convert.ToInt32(textBoxTableID.Text)); RestController.RefreshOrderDishes(dataGridView1); RestController.FillOrderDetailsComboBox(comboBoxOrderDetails); RestController.FillOrderDetailsComboBox(comboBoxOrder); }
private void Form1_Load(object sender, EventArgs e) { RestController.FillOrderDetailsComboBox(comboBoxOrderDetails); RestController.FillOrderDetailsComboBox(comboBoxOrder); RestController.FillDishesComboBox(comboBoxDish); RestController.RefreshOrderDishes(dataGridView1); }
private void buttonAdd_Click(object sender, EventArgs e) { int dish_id = Convert.ToInt32(comboBoxDish.SelectedItem.ToString().Split(' ')[0]); int dishes_count = Convert.ToInt32(textBoxCount.Text); int order_id = Convert.ToInt32(comboBoxOrder.SelectedItem); RestController.AddDishToOrder(dish_id, dishes_count, order_id); RestController.RefreshOrderDishes(dataGridView1); RestController.FillOrderDetailsComboBox(comboBoxOrderDetails); RestController.FillOrderDetailsComboBox(comboBoxOrder); }