public ActionResult Create(DeviceModel ins) { string ret = ""; ins.UserEntry = Session["IDUser"].ToString(); // ins.SiteCode = Session["IDSite"].ToString(); if (ModelState.IsValid) { try { // ret = EMC.EmployeeInsert(ins, IsActive); ret = dc.DeviceInsert(ins); } catch (Exception err) { ret = err.Message; return(Json(new { result = ret })); } } return(Json(new { result = ret })); }