Exemplo n.º 1
0
        //public int deleteData(string tableName, int itemID) {
        //    MySqlCommand deleteBudgetPlanCommand = new MySqlCommand(sqlStatementDeleteBudgetPlan);
        //    deleteBudgetPlanCommand.Parameters.AddWithValue("paramItemID", itemID);

        //    int executionResult = DBConnectionManager.deleteData(deleteBudgetPlanCommand);

        //    return executionResult;
        //}

        public int deleteData(QueryType option, QueryData paramContainer, DataTable sourceDataTable)
        {
            //Recreating the command object used to display the data in the DataGridView
            MySqlCommand deleteBudgetPlanCommand = getCorrectSqlCommandForDataDisplay(option, paramContainer);

            int executionResult = DBConnectionManager.deleteData(deleteBudgetPlanCommand, sourceDataTable);

            return(executionResult);
        }