/* * The DeleteCateringItem method uses the Model classes to interact with data in the database. */ public ActionResult DeleteCateringItem(string eventID, string itemID) { Models.EventData eventData = new Models.EventData(); string saved = eventData.DeleteCateringItem(itemID); if (saved.StartsWith("Point8020.Error")) { return(RedirectToAction("TrappedError", "Home", new { ErrorMessage = "Item could not be deleted: Error Code is: " + saved, SPHostUrl = SharePointContext.GetSPHostUrl(HttpContext.Request).AbsoluteUri })); } else { return(RedirectToAction("Catering", "Home", new { EventID = eventID, SPHostUrl = SharePointContext.GetSPHostUrl(HttpContext.Request).AbsoluteUri })); } }