protected void Page_Load(object sender, EventArgs e) { _users = new Tea.Web.UI.ShopPage().GetUserInfo(); data_type.DataSource = Tea.DBUtility.DbHelperSQL.Query("select * from shop_article_category where channel_id=7 and call_index='1' order by sort_id desc"); data_type.DataBind(); key = TWRequest.GetQueryString("key"); this.page = TWRequest.GetQueryInt("page", 1); this.tid = TWRequest.GetQueryInt("tid", 0); this.hid = TWRequest.GetQueryInt("hid", 0); this.sort = TWRequest.GetQueryInt("sort", 0); if (sort == 1) { _orderby = "add_time desc,id desc"; } if (sort == 2) { _orderby = "click desc"; } if (sort == 3) { _orderby = "market_price,id"; } if (sort == 4) { _orderby = "market_price desc,id"; } if (tid != 0) { _sql = _sql + " and (category_id=" + tid + " or more_type like'%," + tid + ",%')"; tname = new Tea.BLL.article_category().GetTitle(tid); try { Tea.Model.article_category model = new Tea.BLL.article_category().GetModel(tid); title = model.seo_title; keyword = model.seo_keywords; describe = model.seo_description; } catch (Exception eee) { } } if (!string.IsNullOrEmpty(key)) { _sql = _sql + " and title like'%" + key + "%'"; tname = key; } Tea.Web.UI.ShopPage bll_view = new Tea.Web.UI.ShopPage(); data_list.DataSource = bll_view.GetViewList("view_article_product", "", this.pageSize, this.page, _sql, _orderby, out this.totalCount); data_list.DataBind(); string pageUrl = Utils.CombUrlTxt("index.aspx", "tid={0}&key={1}&sort={2}&page={3}", tid.ToString(), key.ToString(), sort.ToString(), "__id__"); PageContent.InnerHtml = Utils.OutPageListWeb(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
protected void Page_Load(object sender, EventArgs e) { key = TWRequest.GetQueryString("key"); this.page = TWRequest.GetQueryInt("page", 1); _sql = _sql + " and quan_where='zhe'"; Tea.BLL.article bll = new Tea.BLL.article(); Tea.Web.UI.ShopPage bll_view = new Tea.Web.UI.ShopPage(); data_list.DataSource = bll_view.GetViewList("shop_quan", "", this.pageSize, this.page, _sql, _orderby, out this.totalCount); data_list.DataBind(); string pageUrl = Utils.CombUrlTxt("quan.aspx", "key={0}&page={1}", key.ToString(), "__id__"); PageContent.InnerHtml = Utils.OutPageListWeb(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
protected void Page_Load(object sender, EventArgs e) { key = TWRequest.GetQueryString("key"); this.page = TWRequest.GetQueryInt("page", 1); this.tid = TWRequest.GetQueryInt("tid", 0); this.sort = TWRequest.GetQueryInt("sort", 0); DataSet ds = new Tea.BLL.basic().GetList(0, "basic_where='news'", "basic_sort"); data_news.DataSource = ds; data_news.DataBind(); if (tid == 0) { if (ds.Tables[0].Rows.Count > 0) { tid = Utils.StrToInt(ds.Tables[0].Rows[0]["basic_value"].ToString(), 0); } } if (sort == 1) { _orderby = "add_time desc,id desc"; } if (sort == 2) { _orderby = "add_time,id"; } if (tid != 0) { _sql = _sql + " and category_id=" + tid + ""; } if (!string.IsNullOrEmpty(key)) { _sql = _sql + " and title like'%" + key + "%'"; } Tea.Web.UI.ShopPage bll_view = new Tea.Web.UI.ShopPage(); data_list.DataSource = bll_view.GetViewList("shop_about", "", this.pageSize, this.page, _sql, _orderby, out this.totalCount); data_list.DataBind(); string pageUrl = Utils.CombUrlTxt("news.aspx", "tid={0}&sort={1}&page={2}", sort.ToString(), "__id__"); PageContent.InnerHtml = Utils.OutPageListWeb(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
protected void Page_Load(object sender, EventArgs e) { id = TWRequest.GetQueryInt("id"); del = TWRequest.GetQueryInt("del", 0); page = TWRequest.GetQueryInt("page", 1); if (id > 0) { Tea.BLL.goods_trace bll_trace = new Tea.BLL.goods_trace(); Tea.Model.goods_trace model_trace = new Tea.Model.goods_trace(); DataSet ds = Tea.DBUtility.DbHelperSQL.Query("select * from shop_goods_trace where user_name='" + userModel.user_name + "' and goods_id=" + id + ""); if (ds.Tables[0].Rows.Count == 0) { Tea.Model.article model = new Tea.BLL.article().GetModel(id); model_trace.user_name = userModel.user_name; model_trace.add_time = System.DateTime.Now; model_trace.goods_id = id; model_trace.goods_color = model.title; bll_trace.Add(model_trace); } Response.Redirect("goods.aspx"); } if (del != 0) { Tea.Model.goods_trace model = new Tea.BLL.goods_trace().GetModel(del); if (model.user_name == userModel.user_name) { new Tea.BLL.goods_trace().Delete(del); } Response.Redirect("goods.aspx"); } _sql = "username='******' "; Tea.Web.UI.ShopPage bll_view = new Tea.Web.UI.ShopPage(); data_list.DataSource = bll_view.GetViewList("view_goods_trace", "", this.pageSize, this.page, _sql, _orderby, out this.totalCount); data_list.DataBind(); show = data_list.Items.Count; string pageUrl = Utils.CombUrlTxt("goods.aspx", "page={0}", "__id__"); PageContent.InnerHtml = Utils.OutPageListWeb(10, this.page, this.totalCount, pageUrl, 8); }
private void RptBind(int _channel_id, int _category_id, string _strWhere, string _orderby) { string _sql = ""; this.page = TWRequest.GetQueryInt("page", 1); if (this.category_id > 0) { this.ddlCategoryId.SelectedValue = _category_id.ToString(); _sql = _sql + " and category_id in(select id from shop_article_category where class_list like '%," + _category_id + ",%')"; } this.txtKeywords.Text = this.keywords; //圖表或列表顯示 Tea.Web.UI.ShopPage bll_view = new Tea.Web.UI.ShopPage(); this.rptList1.DataSource = bll_view.GetViewList("view_user_group_price", "", this.pageSize, this.page, _strWhere + _sql, _orderby, out this.totalCount); this.rptList1.DataBind(); //綁定頁碼 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("goods.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}&goods_ids={5}", _channel_id.ToString(), _category_id.ToString(), this.keywords, this.property, "__id__", this.goods_ids); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
protected void Page_Load(object sender, EventArgs e) { key = TWRequest.GetQueryString("key"); this.page = TWRequest.GetQueryInt("page", 1); _sql = "user_id=" + userModel.id + ""; Tea.BLL.article bll = new Tea.BLL.article(); if (!string.IsNullOrEmpty(key)) { _sql = _sql + " and title like'%" + key + "%'"; } Tea.Web.UI.ShopPage bll_view = new Tea.Web.UI.ShopPage(); data_list.DataSource = bll_view.GetViewList("view_order_point", "", this.pageSize, this.page, _sql, _orderby, out this.totalCount); data_list.DataBind(); show = data_list.Items.Count; string pageUrl = Utils.CombUrlTxt("pint.aspx", "key={0}&page={1}", key.ToString(), "__id__"); PageContent.InnerHtml = Utils.OutPageListWeb(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
protected void Page_Load(object sender, EventArgs e) { _users = new Tea.Web.UI.ShopPage().GetUserInfo(); key = TWRequest.GetQueryString("key"); this.page = TWRequest.GetQueryInt("page", 1); this.tid = TWRequest.GetQueryInt("tid", 0); this.hid = TWRequest.GetQueryInt("hid", 0); this.sort = TWRequest.GetQueryInt("sort", 0); if (sort == 1) { _orderby = "add_time desc,id desc"; } if (sort == 2) { _orderby = "click desc"; } if (sort == 3) { _orderby = "market_price,id"; } if (sort == 4) { _orderby = "market_price desc,id"; } if (tid != 0) { _sql = _sql + " and (category_id=" + tid + " or more_type like'%," + tid + ",%')"; tname = new Tea.BLL.article_category().GetTitle(tid); } if (!string.IsNullOrEmpty(key)) { _sql = _sql + " and (title like'%" + key + "%' or sub_title like'%" + key + "%')"; sqlkey = sqlkey + " and (title like'%" + key + "%' or sub_title like'%" + key + "%')"; tname = key; IList _list = new ArrayList(); DataSet ds = Tea.DBUtility.DbHelperSQL.Query("select category_id,more_type from view_article_product where " + sqlkey); foreach (DataRow dr in ds.Tables[0].Rows) { if (!_list.Contains(dr["category_id"].ToString())) { _list.Add(dr["category_id"].ToString()); } string more_type = dr["more_type"].ToString(); IList __list = more_type.Split(','); foreach (object ob in __list) { if (!_list.Contains(ob.ToString())) { _list.Add(ob.ToString()); } } } sql = "0"; foreach (object ob in _list) { if (!string.IsNullOrEmpty(ob.ToString())) { sql = sql + "," + ob.ToString(); } } } //Response.Write(sql); //Response.End(); if (!string.IsNullOrEmpty(sql)) { data_type.DataSource = Tea.DBUtility.DbHelperSQL.Query("select * from shop_article_category where channel_id=7 and id in(" + sql + ") and call_index='1' order by sort_id desc"); data_type.DataBind(); } Tea.Web.UI.ShopPage bll_view = new Tea.Web.UI.ShopPage(); data_list.DataSource = bll_view.GetViewList("view_article_product", "", this.pageSize, this.page, _sql, _orderby, out this.totalCount); data_list.DataBind(); string pageUrl = Utils.CombUrlTxt("search.aspx", "tid={0}&key={1}&sort={2}&page={3}", tid.ToString(), key.ToString(), sort.ToString(), "__id__"); PageContent.InnerHtml = Utils.OutPageListWeb(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
protected void Page_Load(object sender, EventArgs e) { _sql = "user_id='" + userModel.id + "' and status!=4"; end = TWRequest.GetQueryString("end"); begin = TWRequest.GetQueryString("begin"); this.page = TWRequest.GetQueryInt("page", 1); this.state = TWRequest.GetQueryInt("state", 0); this.day = TWRequest.GetQueryInt("day", 0); del = TWRequest.GetQueryInt("del"); if (del > 0) { try { Tea.Model.orders model = bll.GetModel(del); if (model.user_id == userModel.id) { if (model.status == 1) { model.status = 4; bll.Update(model); Response.Write(ljd.function.LocalHint("訂單取消成功!", "order.aspx")); } else { Response.Write(ljd.function.LocalHint("只是未確認的訂單才能取消!", "order.aspx")); } } } catch (Exception eee) { } } if (state != 0) { if (state == 1) { _sql = _sql + " and payment_status=2"; } if (state == 2) { _sql = _sql + " and express_status=2"; } if (state == 3) { _sql = _sql + " and payment_status!=2"; } } if (!string.IsNullOrEmpty(begin)) { _sql = _sql + " and (add_time between '" + begin + "' and '" + end + "')"; } if (day == 1) { _sql = "user_id='" + userModel.id + "' and status!=4 and datediff(year,add_time,getdate())=0"; } Tea.Web.UI.ShopPage bll_view = new Tea.Web.UI.ShopPage(); data_list.DataSource = bll_view.GetViewList("shop_orders", "", this.pageSize, this.page, _sql, _orderby, out this.totalCount); data_list.DataBind(); show = data_list.Items.Count; string pageUrl = Utils.CombUrlTxt("order.aspx", "state={0}&day={1}&begin={2}&end={3}&page={4}", state.ToString(), day.ToString(), begin, end, "__id__"); PageContent.InnerHtml = Utils.OutPageListWeb(this.pageSize, this.page, this.totalCount, pageUrl, 8); }