public static void InsertPurchaseIngredient(Purchase_Ingredient ingredient) { string query = "BEGIN " + "insert_purchase_ingredient(" + ingredient.Ingredient_ID + ", " + ingredient.Amount + "); " + "END;"; DB_Handler.ExecuteQuery(query); }
private static Purchase_Ingredient RowToEntity(DataRow row) { var ingredient = new Purchase_Ingredient { Ingredient_Name = row["Name"].ToString(), Unit_Cost = Int32.Parse(row["Unit_Cost"].ToString()), Ingredient_ID = Int32.Parse(row["Id"].ToString()), Amount = 0.0d }; return(ingredient); }