コード例 #1
0
        protected void rp_bindproduct_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
        {
            int num = (int)System.Web.UI.DataBinder.Eval(e.Item.DataItem, "ProductId");

            if (num > 0)
            {
                System.Web.UI.WebControls.Repeater repeater = e.Item.FindControl("rp_sku") as System.Web.UI.WebControls.Repeater;
                System.Data.DataTable skusByProductId       = SubSiteProducthelper.GetSkusByProductId(num);
                repeater.DataSource = skusByProductId;
                repeater.DataBind();
            }
        }
コード例 #2
0
        protected void rp_bindproduct_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            int productId = (int)DataBinder.Eval(e.Item.DataItem, "ProductId");

            if (productId > 0)
            {
                Repeater  repeater        = e.Item.FindControl("rp_sku") as Repeater;
                DataTable skusByProductId = SubSiteProducthelper.GetSkusByProductId(productId);
                repeater.DataSource = skusByProductId;
                repeater.DataBind();
            }
        }
コード例 #3
0
 private void grdAuthorizeProducts_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         DataTable skusByProductId = SubSiteProducthelper.GetSkusByProductId(Convert.ToInt32(this.grdAuthorizeProducts.DataKeys[e.Row.RowIndex].Value));
         Grid      grid            = (Grid)e.Row.FindControl("grdSkus");
         if (grid != null)
         {
             grid.DataSource = skusByProductId;
             grid.DataBind();
         }
     }
 }