public ActionResult GetTemplate(int id) { var mng = new ContractsManager(); 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 Templates_remove(int id) { var res = false; var mng = new ContractsManager(); var item = mng.GetDocTypeTemplate(id); if (item != null) { mng.DeleteDocTypeTemplate(id); res = true; } return(Json(new { result = res, msg = "Шаблон удален!" })); }