/* * The DeleteAttachmentItem method uses the Model classes to interact with data in the database. */ public ActionResult DeleteAttachmentItem(string eventID, string itemID) { Models.EventData eventData = new Models.EventData(); string saved = eventData.DeleteAttachmentItem(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("Attachments", "Home", new { EventID = eventID, SPHostUrl = SharePointContext.GetSPHostUrl(HttpContext.Request).AbsoluteUri })); } }