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 изменитьToolStripMenuItem_Click(object sender, EventArgs e) { // add order GoOrders(); if (CurrentTable != Table.Orders) { return; } var insertor = new Insertor(); insertor.InsertOrder(lvData); }