private void RptBind(string _strWhere, string _orderby) { txtKeywords.Text = this.keywords; BLL.payment bll = new BLL.payment(); this.rptList.DataSource = bll.GetList(0, _strWhere, _orderby); this.rptList.DataBind(); }
private void RptBind(string _strWhere, string _orderby) { Model.wx_userweixin weixin = GetWeiXinCode(); _strWhere = " wid=" + weixin.id + " " + _strWhere; txtKeywords.Text = this.keywords; BLL.payment bll = new BLL.payment(); this.rptList.DataSource = bll.GetList(0, _strWhere, _orderby); this.rptList.DataBind(); }
private void RptBind(string _strWhere, string _orderby) { Model.wx_userweixin weixin = GetWeiXinCode(); _strWhere = " wid="+weixin.id+" " + _strWhere; txtKeywords.Text = this.keywords; BLL.payment bll = new BLL.payment(); this.rptList.DataSource = bll.GetList(0, _strWhere, _orderby); this.rptList.DataBind(); }
/// <summary> /// 确认订单页面 /// </summary> public void confirmOrder() { //1用户的地址 BLL.wx_shop_user_addr uAddrBll = new BLL.wx_shop_user_addr(); IList <Model.wx_shop_user_addr> uaddrList = uAddrBll.GetOpenidAddrName(openid, wid); if (uaddrList == null || uaddrList.Count <= 0 || uaddrList[0].id <= 0) { } else { this.Document.SetValue("addrinfo", uaddrList[0]); } //快递信息列表 BLL.express expressBll = new BLL.express(); DataSet dsExpress = expressBll.GetExpressList100(wid); this.Document.SetValue("express", dsExpress); //支付信息列表 BLL.payment pbll = new BLL.payment(); DataSet dsPay = pbll.GetList(0, " is_lock=0 and wid=" + wid, " sort_id asc"); this.Document.SetValue("payment", dsPay); //购物车里的商品 BLL.wx_shop_cart cartBll = new BLL.wx_shop_cart(); IList <Model.cartProduct> cartList = cartBll.GetCartList(openid, wid); this.Document.SetValue("cartlist", cartList); string cartStr = "["; if (cartList.Count > 0) { for (int i = cartList.Count - 1; i >= 0; i--) { if (i != 0) { cartStr += "{ \"ic\": \"" + cartList[i].id + "\", \"attr\": \"\", \"bc\": \"" + cartList[i].productNum + "\", \"mid\": " + cartList[i].skuId + " },"; } else { cartStr += "{ \"ic\": \"" + cartList[i].id + "\", \"attr\": \"\", \"bc\": \"" + cartList[i].productNum + "\", \"mid\": " + cartList[i].skuId + " }"; } } } cartStr += "]"; decimal alltotPrice = cartList.Sum(item => item.totPrice); this.Document.SetValue("alltot", alltotPrice * 100); this.Document.SetValue("alltot_y", alltotPrice); this.Document.SetValue("cartStr", cartStr); }
private void TreeBind(string strWhere) { BLL.payment bll = new BLL.payment(); DataTable dt = bll.GetList(0, strWhere, "sort_id asc,id asc").Tables[0]; this.ddlPaymentId.Items.Clear(); this.ddlPaymentId.Items.Add(new ListItem("请选择支付方式", "")); foreach (DataRow dr in dt.Rows) { this.ddlPaymentId.Items.Add(new ListItem(dr["title"].ToString(), dr["id"].ToString())); } }
private void RptBind(string _strWhere, string _orderby) { this.page = DTRequest.GetQueryInt("page", 1); txtKeywords.Text = this.keywords; BLL.payment bll = new BLL.payment(); this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("payment_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
protected void changeValue(object sender, EventArgs e) { BLL.payment bll = new BLL.payment(); this.rptList.DataSource = bll.GetList(0, "id>0", "sort_id asc,id desc"); this.rptList.DataBind(); }
private void RptBind(string _orderby) { BLL.payment bll = new BLL.payment(); this.rptList.DataSource = bll.GetList(0, "", _orderby); this.rptList.DataBind(); }
/// <summary> /// 确认订单页面 /// </summary> public void confirmOrder() { //1用户的地址 BLL.wx_shop_user_addr uAddrBll = new BLL.wx_shop_user_addr(); IList<Model.wx_shop_user_addr> uaddrList = uAddrBll.GetOpenidAddrName(openid, wid); if (uaddrList == null || uaddrList.Count <= 0 || uaddrList[0].id <= 0) { } else { this.Document.SetValue("addrinfo", uaddrList[0]); } //快递信息列表 BLL.express expressBll = new BLL.express(); DataSet dsExpress = expressBll.GetExpressList100(wid); this.Document.SetValue("express", dsExpress); //支付信息列表 BLL.payment pbll = new BLL.payment(); DataSet dsPay = pbll.GetList(0, " is_lock=0 and wid=" + wid, " sort_id asc"); this.Document.SetValue("payment", dsPay); //购物车里的商品 BLL.wx_shop_cart cartBll = new BLL.wx_shop_cart(); IList<Model.cartProduct> cartList = cartBll.GetCartList(openid, wid); this.Document.SetValue("cartlist", cartList); string cartStr = "["; if (cartList.Count > 0) { for (int i = cartList.Count - 1; i >= 0; i--) { if (i != 0) { cartStr += "{ \"ic\": \"" + cartList[i].id + "\", \"attr\": \"\", \"bc\": \"" + cartList[i].productNum + "\", \"mid\": " + cartList[i].skuId + " },"; } else { cartStr += "{ \"ic\": \"" + cartList[i].id + "\", \"attr\": \"\", \"bc\": \"" + cartList[i].productNum + "\", \"mid\": " + cartList[i].skuId + " }"; } } } cartStr += "]"; decimal alltotPrice = cartList.Sum(item => item.totPrice); this.Document.SetValue("alltot", alltotPrice*100); this.Document.SetValue("cartStr", cartStr); }
/// <summary> /// /// </summary> public void ShopDetailPage() { BLL.wx_shop_product artDal = new BLL.wx_shop_product(); int pid = MyCommFun.RequestInt("pid"); Model.wx_shop_product product = artDal.GetModel(pid); if (product != null) { string skuStr = "{\"attr\":["; string availSkuStr = "{"; if (product.skulist != null && product.skulist.Count > 0) { //////////////////生成新的list对数据进行分类 List <int?> arrlist = new List <int?>(); for (int i = 0; i < product.skulist.Count; i++) { arrlist.Add(product.skulist[i].attributeId); } IList <int?> nlist = arrlist.Distinct().ToList();//去除重复值 ////////////////////// for (int j = 0; j < nlist.Count; j++) { ////////////////////////////////////// List <Model.wx_shop_sku> newskulist = new List <Model.wx_shop_sku>(); for (int i = 0; i < product.skulist.Count; i++) { if (product.skulist[i].attributeId == nlist[j].Value) { newskulist.Add(product.skulist[i]); } } ///////////////////////////////////// string dh = ""; if (j == (nlist.Count - 1)) { dh = ""; } else { dh = ","; } skuStr += "{\"attrname\":\"" + newskulist[j].attrName + "\",\"attrlist\": ["; string skuname = ""; for (int i = 0; i < newskulist.Count; i++) { string addprice = newskulist[i].price.ToString(); newskulist[i].price += product.salePrice; // newskulist[i].price *= 100; string dhi = "", dhk = ","; if (i != (newskulist.Count - 1)) { dhi = ","; } else { dhi = ""; //availSkuStr } if (j == (nlist.Count - 1) && i == (newskulist.Count - 1)) { dhk = ""; } skuStr += "{ \"pid\": " + newskulist[i].id + ", \"aname\": \"" + newskulist[i].attributeValue + "\", \"addprice\": \"" + addprice + "\", \"stockPrice\": \"" + newskulist[i].price + "\", \"maketPrice\": \"" + product.marketPrice + "\" }" + dhi + " "; // skuStr += "{ \"attrname\": \"" + newskulist[i].attributeValue + "\", \"stockPrice\": \"" + newskulist[i].price + "\", \"maketPrice\": \"" + product.marketPrice * 100 + "\" }" + dhi + ""; availSkuStr += "\"" + newskulist[i].attrName + ":" + newskulist[i].attributeValue + "\": { \"pid\": " + newskulist[i].id + ", \"stockCount\": \"\", \"stockPrice\": \"" + newskulist[i].price + "\", \"maketPrice\": \"" + product.marketPrice * 100 + "\" }" + dhk + " "; skuname = newskulist[i].attrName; } skuStr += "]}" + dh; } skuStr += "]}"; availSkuStr += "}"; //XCWeiXin.DAL.ShopSKUDal skuDal = new DAL.ShopSKUDal(); //IList<Model.ShopSKU> skulist = skuDal.SKUConvert(product.skulist); //this.Document.SetValue("skulist", skulist[0]); } else { skuStr += "]}"; } if (availSkuStr == "{}") { availSkuStr = "{ \"\": { \"pid\": 0, \"stockCount\": \"\", \"stockPrice\": \"" + product.salePrice + "\", \"maketPrice\": \"" + product.marketPrice * 100 + "\" } }"; } this.Document.SetValue("skuStr", skuStr); this.Document.SetValue("availSkuStr", availSkuStr); this.Document.SetValue("model", product); //快递信息列表 BLL.express expressBll = new BLL.express(); DataSet dsExpress = expressBll.GetExpressList100(wid); this.Document.SetValue("express", dsExpress); //支付信息列表 BLL.payment pbll = new BLL.payment(); DataSet dsPay = pbll.GetList(0, " is_lock=0 and wid=" + wid, " sort_id asc"); this.Document.SetValue("payment", dsPay); } }