Example #1
0
        public static void UpdateRotten_Ingredient(Model.Rotten_Ingredient rotten_Ingredient)
        {
            string query =
                "BEGIN " +
                "rotten_ingredient_pkg.update_rotten_ingredient(" + rotten_Ingredient.Id + ", " + rotten_Ingredient.Ingredient_Id + ", " + rotten_Ingredient.Amount + ", '" + rotten_Ingredient.Date_Added.ToString(string.Format("dd/MMM/yyyy")) + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
Example #2
0
 public static Model.Rotten_Ingredient RowToEntity(DataRow row)
 {
     Model.Rotten_Ingredient rotten_Ingredient = new Model.Rotten_Ingredient
     {
         Id            = Int32.Parse(row["Id"].ToString()),
         Ingredient_Id = Int32.Parse(row["Ingredient_Id"].ToString()),
         Amount        = Double.Parse(row["Amount"].ToString()),
         Date_Added    = Convert.ToDateTime(row["Date_Added"])
     };
     return(rotten_Ingredient);
 }