コード例 #1
0
        protected void gvGroup_SelectedIndexChanged(object sender, EventArgs e)
        {
            GoodsGroup group = new GoodsGroup();

            group.GroupCode = (int)gvGroup.SelectedValue;
            GoodsTable gt = new GoodsTable();

            dlRecommend.DataSource = gt.GetRecommendGoods(group);
            dlRecommend.DataBind();
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                GoodsGroupTable ggt = new GoodsGroupTable();
                gvGroup.DataSource = ggt.GetGoodsGroup();
                gvGroup.DataBind();

                GoodsTable gt = new GoodsTable();
                dlRecommend.DataSource = gt.GetRecommendGoods();
                dlRecommend.DataBind();
                Session["CurrentPage"] = "index.aspx";
            }
        }