public ActionResult DocEdit(doc_docs item) { var mng = new DocsManager(); mng.SaveDoc(item); return(Json(new { result = true })); }
public ActionResult CreateDoc(string name, string number, string path, int typeID, int projectID, int contragentID) { var mng = new DocsManager(); int statusID = 1; var item = new doc_docs { id = 0, name = name, number = number, path = path, typeID = typeID, statusID = statusID, projectID = projectID, contragentID = contragentID, created = DateTime.Now.Date, createdBy = new BLL.Core.CoreManager().GetUserGuid() }; mng.SaveDoc(item); return(Json(new { result = item.id > 0, savedID = item.id, }, JsonRequestBehavior.AllowGet)); }