public static int UpdateExistingRole(Role role)
        {
            string query   = string.Format(QUERY_UPDATE, role.RoleDescription, role.RoleID);
            int    results = DatabaseManager.ExecuteNonQuery(query);

            return(results);
        }
        public static int DeleteOrderMeal(int orderMealID)
        {
            string query   = string.Format(QUERY_DELETE_MEAL_FROM_ORDER, orderMealID);
            int    results = DatabaseManager.ExecuteNonQuery(query);

            return(results);
        }
        public static int InsertNewRole(Role role)
        {
            string query   = string.Format(QUERY_INSERT, role.RoleDescription);
            int    results = DatabaseManager.ExecuteNonQuery(query);

            return(results);
        }
Пример #4
0
        public static int UpdateExistingIngredient(Ingredient ingredient)
        {
            string query   = string.Format(QUERY_UPDATE, ingredient.IngredientName, ingredient.IngredientPrice, ingredient.IngredientID);
            int    results = DatabaseManager.ExecuteNonQuery(query);

            return(results);
        }
        public static int InsertOrderMeal(int orderID, int mealID, int quantity, decimal price)
        {
            string query   = string.Format(QUERY_INSERT_OM, orderID, mealID, quantity, price);
            int    results = DatabaseManager.ExecuteNonQuery(query);

            return(results);
        }
        public static int UpdateExistingMeal(Meal meal)
        {
            string query   = string.Format(QUERY_UPDATE, meal.MealName, meal.MealDescription, meal.MealID);
            int    results = DatabaseManager.ExecuteNonQuery(query);

            return(results);
        }
Пример #7
0
        public static int InsertNewIngredient(Ingredient ingredient)
        {
            string query   = string.Format(QUERY_INSERT, ingredient.IngredientName, ingredient.IngredientPrice, ingredient.IngredientID);
            int    results = DatabaseManager.ExecuteNonQuery(query);

            return(results);
        }
        public static int InsertNewOrder(Order order)
        {
            string query   = string.Format(QUERY_INSERT, order.OrderCustomer, order.OrderDate);
            int    results = DatabaseManager.ExecuteNonQuery(query);

            return(results);
        }
        public static int InsertNewMeal(Meal meal)
        {
            string query   = string.Format(QUERY_INSERT, meal.MealName, meal.MealDescription);
            int    results = DatabaseManager.ExecuteNonQuery(query);

            return(results);
        }
        public static int UpdateExistingOrder(Order order)
        {
            string query   = string.Format(QUERY_UPDATE, order.OrderCustomer, order.OrderDate, order.OrderID);
            int    results = DatabaseManager.ExecuteNonQuery(query);

            return(results);
        }
        public static int DeleteUserRole(int userRoleID)
        {
            string query   = string.Format(QUERY_DELETE_ROLE_FROM_USER, userRoleID);
            int    results = DatabaseManager.ExecuteNonQuery(query);

            return(results);
        }
        public static int InsertUserRole(int userID, int roleID)
        {
            string query   = string.Format(QUERY_INSERT_UR, userID, roleID);
            int    results = DatabaseManager.ExecuteNonQuery(query);

            return(results);
        }
        public static int DeleteMealIngredient(int mealIngredientID)
        {
            string query   = string.Format(QUERY_DELETE_INGREDIENT_FROM_MEAL, mealIngredientID);
            int    results = DatabaseManager.ExecuteNonQuery(query);

            return(results);
        }
        public static int InsertMealIngredient(int mealID, int IngredientID, int quantity, decimal price)
        {
            string query   = string.Format(QUERY_INSERT_MI, mealID, IngredientID, quantity, price);
            int    results = DatabaseManager.ExecuteNonQuery(query);

            return(results);
        }