protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { string selIDs = QueryStringHelper.GetString("ids"); string[] stemp = selIDs.Split(','); foreach (string s in stemp) { try { int i = int.Parse(s); allSels.Add(i); } catch { } } InitTree(); } } catch (Exception ex) { log.Error(ex.Message); } foreach (int j in allSels) { try { ExtendNode(j); } catch { } } }
protected void Page_Load(object sender, EventArgs e) { try { string rmStr = QueryStringHelper.GetString("isrm"); string tejiaStr = QueryStringHelper.GetString("istj"); string cxstr = QueryStringHelper.GetString("iscx"); if (!string.IsNullOrEmpty(rmStr)) { //热门 bll.Update(int.Parse(rmStr.Split(',')[1]), int.Parse(rmStr.Split(',')[0]), 1); } if (!string.IsNullOrEmpty(tejiaStr)) { //特价 bll.Update(int.Parse(tejiaStr.Split(',')[1]), int.Parse(tejiaStr.Split(',')[0]), 0); } if (!string.IsNullOrEmpty(cxstr)) { //促销 bll.Update(int.Parse(cxstr.Split(',')[1]), int.Parse(cxstr.Split(',')[0]), 2); } } catch (Exception ex) { log.Error(ex.Message); } }
protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e) { if (!Page.IsPostBack) { string code = QueryStringHelper.GetString("code"); if (!string.IsNullOrEmpty(code)) { InitData(e.NewPageIndex, code); } } }
public ReturnValue GetItemByCode() { try { string goods_code = QueryStringHelper.GetString("goods_code", ""); return(returnValue); } catch (Exception ex) { returnValue.ErrorCode = 1; returnValue.ErrorMsg = ex.Message; return(returnValue); } }
protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e) { try { if (!Page.IsPostBack) { string name = QueryStringHelper.GetString("title"); int stateid = QueryStringHelper.GetInt("stateid"); InitData(e.NewPageIndex, name, stateid); } } catch (Exception ex) { log.Error(ex.Message); } }
public ReturnValue UpdateItemByCode() { try { string model = QueryStringHelper.GetString("model", ""); if (string.IsNullOrEmpty(model)) { returnValue.ErrorCode = 1; returnValue.ErrorMsg = "model不能为空"; return(returnValue); } string feemz = QueryStringHelper.GetString("feemz", ""); returnValue.ShowMsg = testDemoServices.GetLocHouseRoomName("feemz").GUID; return(returnValue); } catch (Exception ex) { returnValue.ErrorCode = 1; returnValue.ErrorMsg = ex.Message; return(returnValue); } }
protected override void Initialize(HttpControllerContext controllerContext) { //获取token string uname = QueryStringHelper.GetString("tokencode"); //判断对比 if (string.IsNullOrEmpty(uname) || ConfigHelper.GetSettings("TokenCode") != uname) { //返回没有权限消息 ReturnValue result = new ReturnValue(); result.ErrorMsg = "tokencode令牌无效"; result.ErrorCode = 100; HttpContext.Current.Response.Write(JsonHelper.ObjectToJSON(result)); //var response= controllerContext.Request.CreateResponse(HttpStatusCode.OK); //response.Content = new StringContent(JsonHelper.ObjectToJSON(result), Encoding.UTF8, "application/json"); HttpContext.Current.Response.End(); } else { base.Initialize(controllerContext); } }
protected void ibtnAdd_Click(object sender, EventArgs e) { //验证代码 try { SiteConfig tempModel = new SiteConfig(); try { tempModel = bllSiteConfig.GetModel(hdfID.Value); } catch { } if (tempModel == null) { tempModel = new SiteConfig(); tempModel.description = txtDescription.Value; tempModel.title = txtTitle.Value; tempModel.mata = txtMata.Value; tempModel.footer = txtFooter.Value; tempModel.codeNo = QueryStringHelper.GetString("code"); bllSiteConfig.Add(tempModel); } else { tempModel.description = txtDescription.Value; tempModel.title = txtTitle.Value; tempModel.mata = txtMata.Value; tempModel.footer = txtFooter.Value; bllSiteConfig.Update(tempModel); } Msg.Show("保存成功!"); } catch (Exception ex) { log.Error(ex.Message); Msg.Show("网络错误!原因:" + ex.Message); } }