/// <summary> /// 获取信息配置信息 /// </summary> /// <param name="context"></param> /// <returns></returns> private string GetConfigureConfigInfo(HttpContext context) { BLLJIMP.Model.ConfigBarCodeInfo model = bll.Get <BLLJIMP.Model.ConfigBarCodeInfo>(string.Format(" WebSiteOwner='{0}'", bll.WebsiteOwner)); if (model != null) { resp.Status = 0; resp.ExObj = model; } else { resp.Status = -1; resp.Msg = ""; } return(Common.JSONHelper.ObjectToJson(resp)); }
/// <summary> /// 配置返回结果 /// </summary> /// <param name="context"></param> /// <returns></returns> private string ConfigureConfigInfo(HttpContext context) { string popupInfo = context.Request["PopupInfo"]; string queryNum = context.Request["QueryNum"]; if (string.IsNullOrEmpty(popupInfo)) { resp.Status = -1; resp.Msg = "请配置返回结果"; goto OutF; } if (string.IsNullOrEmpty(queryNum)) { resp.Status = -1; resp.Msg = "请输入查询"; goto OutF; } BLLJIMP.Model.ConfigBarCodeInfo model = bll.Get <BLLJIMP.Model.ConfigBarCodeInfo>(string.Format(" WebSiteOwner='{0}'", bll.WebsiteOwner)); if (model != null) { model.PopupInfo = popupInfo; model.QueryNum = Convert.ToInt32(queryNum); model.websiteOwner = bll.WebsiteOwner; bool IsTrue = bll.Update(model); if (IsTrue) { resp.Status = 0; resp.Msg = "更新成功"; goto OutF; } else { resp.Status = 0; resp.Msg = "更新失败"; goto OutF; } } else { model = new BLLJIMP.Model.ConfigBarCodeInfo() { PopupInfo = popupInfo, QueryNum = Convert.ToInt32(queryNum), websiteOwner = bll.WebsiteOwner }; bool IsTrue = bll.Add(model); if (IsTrue) { resp.Status = 0; resp.Msg = "添加成功"; goto OutF; } else { resp.Status = 0; resp.Msg = "添加失败"; goto OutF; } } OutF: return(Common.JSONHelper.ObjectToJson(resp)); }