public ActionResult EditContract(Mikhailova_contracts item) { var mng = new ContractsManager(); mng.SaveContract(item); return(Json(new { result = true })); }
public ActionResult CreateContract(string number, string path, int typeID, int contagentID, string desc, decimal summa) { var mng = new ContractsManager(); int statusID = 1; var item = new Mikhailova_contracts { id = 0, number = number, date = DateTime.Now.Date, path = path, typeID = typeID, statusID = statusID, contagentID = contagentID, summa = summa, desc = desc }; mng.SaveContract(item); return(Json(new { result = item.id > 0, savedID = item.id, }, JsonRequestBehavior.AllowGet)); }