当前位置: 首页>>代码示例>>C#>>正文


C# Comments.getCommentall方法代码示例

本文整理汇总了C#中Comments.getCommentall方法的典型用法代码示例。如果您正苦于以下问题:C# Comments.getCommentall方法的具体用法?C# Comments.getCommentall怎么用?C# Comments.getCommentall使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Comments的用法示例。


在下文中一共展示了Comments.getCommentall方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: info

    public void info()
    {
        string t = Request.QueryString["brandid"];
        Brand brand = new Brand();
        int brandid = int.Parse(t);
        brand = brand.getBrandDetails(brandid.ToString());

        desc.Text = brand.BrandDescription;
        name.Text = brand.BrandName;
        A1.HRef = "http://" + brand.Website;
        A1.InnerText = brand.Website;
        Table All = new Table();
        All.CssClass = "bdetails";
        All.Width = Unit.Percentage(100);
        All.CellPadding = 1;
        All.CellSpacing = 1;

        TableRow Allrow = new TableRow();
        TableCell Allcell = new TableCell();

        Comments testing = new Comments();
        string page = Request.QueryString["Page"];
        if (page == null) page = "1";
        int HOWMANYPAGES = 0;
        List<Comments> www = testing.getCommentall(brandid, page.ToString(), "3", out  HOWMANYPAGES);

        for (int i = 0; i < www.Count; i++)
        {
            Security.UserInfo usr = new Security.UserInfo();
            usr = usr.getUserProfile(www[i].UserID.ToString());

            Allrow = new TableRow();
            Allcell = new TableCell();
            Image imag = new Image();
            imag.Width = 40;
            imag.Height = 40;
            Allcell.Width = 40;
            imag.ImageUrl = "~/images/" + usr.PhotoUrl;
            Allcell.Controls.Add(imag);
            Allrow.Cells.Add(Allcell);

            //    Allrow.Style.Add("background-color", "#EDE9D3");
            Allcell = new TableCell();
            Allcell.Style.Add("align", "left");

            Table tbl = new Table();
            tbl.Width = Unit.Percentage(100);
            TableRow tblrow = new TableRow();
            TableCell tblcell = new TableCell();

            tblcell.Text = usr.Fname + " " + usr.Lname;
            tblcell.Style.Add("color", "blue");
            tblrow.Cells.Add(tblcell);
            tbl.Controls.Add(tblrow);

            tblrow = new TableRow();
            tblcell = new TableCell();

            tblcell.Text = www[i].Comment;
            tblcell.Style.Add("color", "blue");
            tblrow.Cells.Add(tblcell);
            tbl.Controls.Add(tblrow);

            tblrow = new TableRow();
            tblcell = new TableCell();
            LinkButton lbdelete = new LinkButton();
            tblcell.Controls.Add(lbdelete);
            lbdelete.Text = " Delete";
            lbdelete.Style.Add("text-decoration", "none");
            tblcell.Style.Add("color", "blue");
            tblrow.Cells.Add(tblcell);
            tbl.Controls.Add(tblrow);

            tblrow = new TableRow();
            tblcell = new TableCell();

            tblcell.Controls.Add(new LiteralControl("<hr>"));
            tblrow.Cells.Add(tblcell);

            tbl.Controls.Add(tblrow);

            Allcell.Controls.Add(tbl);
            Allrow.Cells.Add(Allcell);
            All.Controls.Add(Allrow);
        }

        php.Controls.Add(All);
        string firstPageUrl = "http://localhost/fuck/Brand/Branddetail.aspx";

        //SHARIF Page={0} shoule be like this
        string pagerFormat = "http://localhost/fuck/Brand/Branddetail.aspx?Page={0}";

        bottomPager.Show(int.Parse(page), HOWMANYPAGES, firstPageUrl, pagerFormat, true);
    }
开发者ID:ziad007,项目名称:URI2,代码行数:94,代码来源:Branddetail.aspx.cs


注:本文中的Comments.getCommentall方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。