Beispiel #1
0
        public ActionResult DeleteDocument(int documentId, int scheduleId)
        {
            Document doc = _docFacade.GetById(documentId);

            _docFacade.Delete(doc);

            if (System.IO.File.Exists(Server.MapPath(UPLOAD_FOLDER + doc.FileName)))
            {
                System.IO.File.Delete(Server.MapPath(UPLOAD_FOLDER + doc.FileName));
            }

            this.AddNotification("Document deleted", NotificationType.SUCCESS);
            return(RedirectToAction("Module", "Schedule", new { id = scheduleId }));
        }