public JsonResult SaveHcontext(string hcode, string hcontext) { JsonData d = new JsonData(); Sys_HelpMenu sa = new Sys_HelpMenu(); Sys_HelpContext sal = new Sys_HelpContext(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { sa = shmb.Query(" and hcode='" + hcode + "'"); sal.cdate = DateTime.Now.ToString(); sal.hcode = hcode; sal.hname = sa != null ? sa.hname : ""; sal.hcontext = hcontext; sal.maker = iv.u.ename; if (shcb.Add(sal) > 0) { d.d = "S"; } else { d.d = "F"; } } else { d.d = iv.badstr; } return(Json(d)); }
public JsonResult InitHcontext(string hcode) { JsonData d = new JsonData(); SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { Sys_HelpContext sal = new Sys_HelpContext(); if (hcode != "") { Sys_HelpContext sall = shcb.Query(" and hcode='" + hcode + "'"); if (sall == null) { sal.hcode = hcode; } else { sal = sall; } } d.d = js.Serialize(sal); } else { d.d = iv.badstr; } return(Json(d)); }