Esempio n. 1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            int dish_id      = Convert.ToInt32(comboBoxDish.SelectedValue.ToString().Split(' ')[0]);
            int order_id     = Convert.ToInt32(comboBoxOrder.SelectedValue);
            int dishes_count = Convert.ToInt32(textBoxCount.Text);

            DataDisplayController.AddOderDish(dish_id, order_id, dishes_count, dataGridView1, comboBoxDish, comboBoxOrder);
        }
Esempio n. 2
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            string name        = textBoxName.Text;
            string passport_id = textBoxPassportID.Text;
            string email       = textBoxEmail.Text;

            DataDisplayController.AddWorker(name, passport_id, email, dataGridView1, comboBoxPosition, comboBoxFire);
        }
Esempio n. 3
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            int    category_id = comboBoxDishCategory.SelectedIndex + 1;
            int    price       = Convert.ToInt32(textBoxPrice.Text);
            int    amount      = Convert.ToInt32(textBoxAmount.Text);
            string name        = textBoxName.Text;

            DataDisplayController.AddDish(category_id, price, amount, name, dataGridView1);
        }
Esempio n. 4
0
 public Dish_menu()
 {
     InitializeComponent();
     DataDisplayController.CategoryTableAdapter.Fill(restDataSet.dish_category);
     DataDisplayController.FillComboBox(restDataSet.dish_category as DataTable, dataGridView1, comboBoxDishCategory, restDataSet);
     DataDisplayController.DataGridViewDisplayDataTable(dataGridView1, restDataSet, restDataSet.dish_menu as DataTable);
     DataDisplayController.DishMenuAdapter.Fill(restDataSet.dish_menu);
     dataGridView1.Columns[0].Visible = false;
 }
Esempio n. 5
0
 private void buttonAddOrder_Click(object sender, EventArgs e)
 {
     DataDisplayController.AddOrder(dateTimePickerOrder, textBoxTableID);
     DataDisplayController.DishDictionaryAdapter.Fill(DataDisplayController.restDataSet.dish_dictionary);
     DataDisplayController.FillComboBox(DataDisplayController.restDataSet.dish_dictionary as DataTable, dataGridView1, comboBoxDish, DataDisplayController.restDataSet);
     DataDisplayController.orderTableAdapter.Fill(DataDisplayController.restDataSet.order);
     DataDisplayController.FillComboBox(DataDisplayController.restDataSet.order as DataTable, dataGridView1, comboBoxOrder, DataDisplayController.restDataSet, 0);
     DataDisplayController.FillComboBox(DataDisplayController.restDataSet.order as DataTable, dataGridView1, comboBoxOrderDetails, DataDisplayController.restDataSet, 0);
 }
Esempio n. 6
0
 public MainForm()
 {
     InitializeComponent();
     dataGridView1.AutoSize = true;
     DataDisplayController.DishDictionaryAdapter.Fill(DataDisplayController.restDataSet.dish_dictionary);
     DataDisplayController.FillComboBox(DataDisplayController.restDataSet.dish_dictionary as DataTable, dataGridView1, comboBoxDish, DataDisplayController.restDataSet);
     DataDisplayController.orderTableAdapter.Fill(DataDisplayController.restDataSet.order);
     DataDisplayController.FillComboBox(DataDisplayController.restDataSet.order as DataTable, dataGridView1, comboBoxOrder, DataDisplayController.restDataSet, 0);
     DataDisplayController.FillComboBox(DataDisplayController.restDataSet.order as DataTable, dataGridView1, comboBoxOrderDetails, DataDisplayController.restDataSet, 0);
 }
Esempio n. 7
0
 public Staff()
 {
     InitializeComponent();
     DataDisplayController.staffTableAdapter.Fill(restDataSet.staff);
     DataDisplayController.positionTableAdapter.Fill(restDataSet.position);
     DataDisplayController.FillComboBox(restDataSet.staff as DataTable, dataGridView1, comboBoxFire, restDataSet);
     DataDisplayController.FillComboBox(restDataSet.position as DataTable, dataGridView1, comboBoxPosition, restDataSet);
     DataDisplayController.DataGridViewDisplayDataTable(dataGridView1, restDataSet, restDataSet.rest_staff);
     DataDisplayController.RestStaffAdapter.Fill(restDataSet.rest_staff);
     dataGridView1.Columns[0].Visible = false;
 }
Esempio n. 8
0
        private void OrderDetails_Load(object sender, EventArgs e)
        {
            DataDisplayController.InitOrderDetailAdapter(OrderId);
            DataDisplayController.OrderDetailsAdapter.Fill(DataDisplayController.restDataSet.OrderComments);
            DataDisplayController.DataGridViewDisplayDataTable(dataGridViewComments, DataDisplayController.restDataSet, DataDisplayController.restDataSet.OrderComments as DataTable);

            DataDisplayController.InitServiceDetailAdapter(OrderId);
            DataDisplayController.ServiceDetailsAdapter.Fill(DataDisplayController.restDataSet.ServiceDetails);
            DataDisplayController.DataGridViewDisplayDataTable(dataGridViewService, DataDisplayController.restDataSet, DataDisplayController.restDataSet.ServiceDetails as DataTable);
            dataGridViewService.Columns[0].Visible = false;
            dataGridViewService.Columns[3].Visible = false;

            DataDisplayController.InitFineDetailAdapter(OrderId);
            DataDisplayController.FineDetailsAdapter.Fill(DataDisplayController.restDataSet.FineDetails);
            DataDisplayController.DataGridViewDisplayDataTable(dataGridViewFines, DataDisplayController.restDataSet, DataDisplayController.restDataSet.FineDetails as DataTable);
            dataGridViewFines.Columns[0].Visible = false;
            dataGridViewFines.Columns[3].Visible = false;
        }
Esempio n. 9
0
 private void toXMLToolStripMenuItem_Click(object sender, EventArgs e)
 {
     DataDisplayController.ExportMenuToXML(dataGridView1);
 }
Esempio n. 10
0
 private void buttonDelete_Click(object sender, EventArgs e)
 {
     DataDisplayController.DeleteDish(dataGridView1);
 }
Esempio n. 11
0
 private void ordersToolStripMenuItem_Click(object sender, EventArgs e)
 {
     DataDisplayController.DataGridViewDisplayOrderList(dataGridView1);
 }
Esempio n. 12
0
 private void Form1_Load(object sender, EventArgs e)
 {
     DataDisplayController.DataGridViewDisplayDataTable(dataGridView1, DataDisplayController.restDataSet, DataDisplayController.restDataSet.order_list as DataTable);
     DataDisplayController.OrderListAdapter.Fill(DataDisplayController.restDataSet.order_list);
     dataGridView1.Columns[0].Name = "Order №";
 }
Esempio n. 13
0
 private void buttonDelete_Click(object sender, EventArgs e)
 {
     DataDisplayController.DeleteWorker(dataGridView1, comboBoxFire, comboBoxPosition);
 }