protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request.QueryString["CategoryID"])) { CategoryIDUrl = Request.QueryString["CategoryID"]; } else { CategoryIDUrl = GtypeHid.Value; } if (!string.IsNullOrEmpty(Request.QueryString["GoodsName"])) { GetTxtcontent = Common.NoHTML(Request.QueryString["GoodsName"]); } if (!IsPostBack) { DataBindClass(); A_Type.Value = "0";//查询类别(0,全部 1,销量 2,最新 3,促销) if (!string.IsNullOrEmpty(GetTxtcontent)) { HttpCookie SelectGoods = Request.Cookies["SelectGoods"]; if (SelectGoods != null) { SelectGoods.HttpOnly = true; string str = HttpUtility.UrlDecode(SelectGoods.Value, Encoding.GetEncoding("UTF-8")); str = str.Replace(GetTxtcontent + "&", ""); str += GetTxtcontent + "&"; SelectGoods.Value = HttpUtility.UrlEncode(str, Encoding.GetEncoding("UTF-8")); SelectGoods.Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(SelectGoods); } else { SelectGoods = new HttpCookie("SelectGoods"); SelectGoods.HttpOnly = true; string str = ""; str += GetTxtcontent + "&"; SelectGoods.Value = HttpUtility.UrlEncode(str, Encoding.GetEncoding("UTF-8")); SelectGoods.Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(SelectGoods); } Hi.Model.SYS_Select select = new Hi.Model.SYS_Select(); select.SelectNamestring = GetTxtcontent; select.Type = 2; LoginModel logUser = Session["UserModel"] as LoginModel; if (logUser != null) { select.UserID = logUser.UserID; } else { select.UserID = 0; } select.CreateDate = DateTime.Now;; select.ts = DateTime.Now; select.dr = 0; select.modifyuser = select.UserID; new Hi.BLL.SYS_Select().Add(select); } else { GetTxtcontent = "请输入商品名称"; } BindData(); //操作日志统计开始 Utils.WritePageLog(Request, "优质货源"); //操作日志统计结束 // A_Nes.Attributes.Add("class", "hover"); } this.TopNav1.getSelectType = "商品<i class=\"down-i\"></i><div class=\"cur\"><i>店铺</i></div>"; this.TopNav1.getSelectValue = GetTxtcontent; }
/// <summary> /// 增加一条数据 /// </summary> public int Add(Hi.Model.SYS_Select model) { return(dal.Add(model)); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Hi.Model.SYS_Select model) { return(dal.Update(model)); }
protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request["indid"])) { indid = Request["indid"]; } if (!IsPostBack) { LoginModel logUser = Session["UserModel"] as LoginModel; if (!string.IsNullOrEmpty(Request.QueryString["compname"])) { GetTxtcontent = Common.NoHTML(Request.QueryString["compname"]); HttpCookie SelectComp = Request.Cookies["SelectComp"]; if (SelectComp != null) { SelectComp.HttpOnly = true; string str = HttpUtility.UrlDecode(SelectComp.Value, Encoding.GetEncoding("UTF-8")); str = str.Replace(GetTxtcontent + "&", ""); str += GetTxtcontent + "&"; SelectComp.Value = HttpUtility.UrlEncode(str, Encoding.GetEncoding("UTF-8")); SelectComp.Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(SelectComp); } else { SelectComp = new HttpCookie("SelectComp"); SelectComp.HttpOnly = true; string str = ""; str += GetTxtcontent + "&"; SelectComp.Value = HttpUtility.UrlEncode(str, Encoding.GetEncoding("UTF-8")); SelectComp.Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(SelectComp); } Hi.Model.SYS_Select select = new Hi.Model.SYS_Select(); select.SelectNamestring = GetTxtcontent; select.Type = 1; if (logUser != null) { select.UserID = logUser.UserID; } else { select.UserID = 0; } select.CreateDate = DateTime.Now;; select.ts = DateTime.Now; select.dr = 0; select.modifyuser = select.UserID; new Hi.BLL.SYS_Select().Add(select); } else { GetTxtcontent = "请输入厂商名称"; } if (logUser != null) { islogUser = true; } BindData(); DataBindClass(); } }