private void Add_Click(object sender, EventArgs e) { var insertor = new Insertor(); switch (CurrentTable) { case Table.Orders: insertor.InsertOrder(lvData); break; case Table.Customers: insertor.InsertCustomer(lvData); break; case Table.Operators: insertor.InsertOperator(lvData); break; case Table.Couriers: insertor.InsertCourier(lvData); break; case Table.Employees: insertor.InsertEmployee(lvData); break; case Table.Restaurants: insertor.InsertNewRestaurants(lvData); break; case Table.Users: UsersCode.Insert(lvData); break; } }
private void button1_Click(object sender, EventArgs e) { var insert = new Insertor(); insert.InsertDish(listView1, _order); //var insert_dish = new InsertDish(_order, listView1); //insert_dish.ShowDialog(); _lvData.Clear(); var filler = new ListViewFiller(); filler.FillOrders(_lvData); }
private void изменитьToolStripMenuItem_Click(object sender, EventArgs e) { // add order GoOrders(); if (CurrentTable != Table.Orders) { return; } var insertor = new Insertor(); insertor.InsertOrder(lvData); }
private void button1_Click(object sender, EventArgs e) { if (lvData.SelectedItems.Count == 0) { return; } var rest_for_transfer = lvData.SelectedItems[0].Tag as естораны; // хранится выделенный ресторан if (rest_for_transfer == null) { return; } var insert_new_dish = new Insertor(); insert_new_dish.InsertNewDish(lvDish, rest_for_transfer); }