Exemplo n.º 1
0
 protected void dlUrunler_ItemDataBound(object sender, DataListItemEventArgs args)
 {
     if (args.Item.ItemType == ListItemType.Item || args.Item.ItemType == ListItemType.AlternatingItem)
     {
         Repeater    childRepeater        = (Repeater)args.Item.FindControl("rptCommentList");
         HiddenField hfCommentedProductId = (HiddenField)args.Item.FindControl("hfCommentedProductId");
         childRepeater.DataSource = GgDbProvider.GetCommentListForProduct(Convert.ToInt32(hfCommentedProductId.Value)).ToList();
         childRepeater.DataBind();
     }
 }
Exemplo n.º 2
0
    protected void rptSupplier_ItemDataBound(object sender, RepeaterItemEventArgs args)
    {
        if (args.Item.ItemType == ListItemType.Item || args.Item.ItemType == ListItemType.AlternatingItem)
        {
            Repeater    childRepeater        = (Repeater)args.Item.FindControl("rptCommentList");
            HiddenField hfCommentedProductId = (HiddenField)args.Item.FindControl("hfCommentedProductId");
            Panel       pnlInfo = (Panel)args.Item.FindControl("pnlInfo");

            childRepeater.DataSource = GgDbProvider.GetCommentListForProduct(Convert.ToInt32(hfCommentedProductId.Value)).ToList();
            childRepeater.DataBind();
            if (childRepeater.Items.Count < 1)
            {
                pnlInfo.Visible = true;
            }
        }
    }