public static void InsertFoodIngredient(Model.Food_Ingredient fi, int Id) { string query = "BEGIN " + "food_ingredient_pkg.insert_food_ingredient(" + Id + ", " + fi.Ingredient_Id + ", " + fi.Amount + ");" + " END;"; DB_Handler.ExecuteQuery(query); }
public static Model.Food_Ingredient RowToEntity2(DataRow row) { Model.Food_Ingredient f_ingredient = new Model.Food_Ingredient { Ingredient_Id = Int32.Parse(row["Id"].ToString()), Ingredient_Name = row["Name"].ToString(), Amount = 0.0d, Unit_Cost = Int32.Parse(row["Unit_Cost"].ToString()) }; return(f_ingredient); }