예제 #1
0
 private void buttonAdd_Click(object sender, EventArgs e)
 {
     //try
     {
         int    category_id = Convert.ToInt32(comboBoxDishCategory.SelectedItem.ToString().Split(' ')[0]);
         int    price       = Convert.ToInt32(textBoxPrice.Text);
         int    amount      = Convert.ToInt32(textBoxAmount.Text);
         string name        = textBoxName.Text;
         RestController.AddDish(category_id, price, amount, name, dataGridView1);
         RestController.RefreshDishMenu(dataGridView1, dishMenuBindingSource);
     }
     //catch (Exception ex)
     {
         //MessageBox.Show(ex.Message);
     }
 }
예제 #2
0
 private void buttonDelete_Click(object sender, EventArgs e)
 {
     RestController.DeleteSelectedDish(dataGridView1);
     RestController.RefreshDishMenu(dataGridView1, dishMenuBindingSource);
 }
예제 #3
0
 private void buttonDelete_Click(object sender, EventArgs e)
 {
     RestController.DeleteSelectedWorker(dataGridView1);
     RestController.RefreshStaff(dataGridView1);
     RestController.FillPositionComboBox(comboBoxPosition);
 }
예제 #4
0
 private void DishMenu_Load(object sender, EventArgs e)
 {
     RestController.RefreshDishMenu(dataGridView1, dishMenuBindingSource);
     RestController.FillCategoriesComboBox(comboBoxDishCategory);
 }
예제 #5
0
 private void Staff_Load(object sender, EventArgs e)
 {
     RestController.RefreshStaff(dataGridView1);
     RestController.FillPositionComboBox(comboBoxPosition);
 }