public ActionResult TemplateEdit(Mikhailova_docTypeTemplates item)
        {
            var mng = new ContractsManager();

            mng.SaveDocTypeTemplate(item);
            return(Json(new { result = true }));
        }
        public ActionResult CreateTemplate(string name, int typeID, string path, int ord)
        {
            var mng  = new ContractsManager();
            var item = new Mikhailova_docTypeTemplates {
                id = 0, name = name, typeID = typeID, path = path, ord = ord
            };

            mng.SaveDocTypeTemplate(item);

            return(Json(new
            {
                result = item.id > 0,
                savedID = item.id,
            }, JsonRequestBehavior.AllowGet));
        }