public ActionResult Docs_remove(int id) { var res = false; var mng = new DocsManager(); var item = mng.GetDoc(id); if (item != null) { mng.DeleteDoc(id); res = true; } return(Json(new { result = res, msg = "Документ удален!" })); }
public ActionResult GetDoc(int id) { var mng = new DocsManager(); var item = mng.GetDoc(id); item.path = CopyFileOnFolderID(item.id, item.path); return(Json(new { id = item.id, name = item.name, number = item.number, path = item.path, typeID = item.typeID, statusID = item.statusID, projectID = item.projectID, contragentID = item.contragentID, created = item.created.ToString("dd.MM.yyyy") })); }