public ActionResult GetDocTypeTemplate(int id) { var mng = new DocsManager(); var item = mng.GetDocTypeTemplate(id); return(Json(new { id = item.id, name = item.name, typeID = item.typeID, path = item.path, ord = item.ord, })); }
public ActionResult DocTypeTemplates_remove(int id) { var res = false; var mng = new DocsManager(); var item = mng.GetDocTypeTemplate(id); if (item != null) { mng.DeleteDocTypeTemplate(id); res = true; } return(Json(new { result = res, msg = "Шаблон удален!" })); }