コード例 #1
0
ファイル: cart.aspx.cs プロジェクト: zoomlacms/web025
 protected void ProRPT_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         DataRowView dr = e.Item.DataItem as DataRowView;
         if (DataConvert.CStr(dr["Class"]) == "2")//套装促销
         {
             Repeater rpt = e.Item.FindControl("SuitPro_RPT") as Repeater;
             rpt.DataSource = proBll.Suit_GetProduct(DataConvert.CStr(dr["procontent"]), DataConvert.CLng(dr["Pronum"]));
             rpt.DataBind();
         }
     }
 }
コード例 #2
0
ファイル: cart.aspx.cs プロジェクト: zoomlacms/web043
        protected void ProRPT_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                DataRowView dr = e.Item.DataItem as DataRowView;
                switch (DataConvert.CLng(dr["Class"]))
                {
                case 2:    //套装促销
                    Repeater rpt = e.Item.FindControl("SuitPro_RPT") as Repeater;
                    rpt.DataSource = proBll.Suit_GetProduct(DataConvert.CStr(dr["procontent"]), DataConvert.CLng(dr["Pronum"]));
                    rpt.DataBind();
                    break;

                default:    //普通商品,支持赠品等促销逻辑
                {
                    Label ptLabel = e.Item.FindControl("Present_HTML") as Label;
                    ptLabel.Text = PageHelper.Aspx_GetHtml("/cart/comp/cart_present.aspx", dr);
                }
                break;
                }
            }
        }