예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender">kontrolka wywołująca zdarzenie</param>
        /// <param name="e">argumenty zdarzenia</param>
        private void buttonFillRightDataGridView_Click(object sender, EventArgs e)
        {
            switch (listBoxDatabaseTableChoosing.SelectedIndex)
            {
            case 0:
                Deliverer.GetAllDeliverers(sqlConnection, sqlDataAdapter, dataGridViewSecondTable);
                break;

            case 1:
                Supply.GetAllSupplies(sqlConnection, sqlDataAdapter, dataGridViewSecondTable);
                break;

            case 2:
                Delivery.GetAllDeliveries(sqlConnection, sqlDataAdapter, dataGridViewSecondTable);
                break;

            case 3:
                Waiter.GetAllWaiters(sqlConnection, sqlDataAdapter, dataGridViewSecondTable);
                break;

            case 4:
                Client.GetAllClients(sqlConnection, sqlDataAdapter, dataGridViewSecondTable);
                break;

            case 5:
                Cook.GetAllCooks(sqlConnection, sqlDataAdapter, dataGridViewSecondTable);
                break;

            case 6:
                Manager.GetAllManagers(sqlConnection, sqlDataAdapter, dataGridViewSecondTable);
                break;

            case 7:
                Meal.GetAllMeals(sqlConnection, sqlDataAdapter, dataGridViewSecondTable);
                break;

            case 8:
                MealCategory.GetAllMealCategories(sqlConnection, sqlDataAdapter, dataGridViewSecondTable);
                break;

            case 9:
                Car.GetAllCars(sqlConnection, sqlDataAdapter, dataGridViewSecondTable);
                break;

            case 10:
                Shopping.GetAllShoppings(sqlConnection, sqlDataAdapter, dataGridViewSecondTable);
                break;

            case 11:
                Transaction.GetAllTransactions(sqlConnection, sqlDataAdapter, dataGridViewSecondTable);
                break;
            }
        }