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


C# Brand.getBrandall方法代码示例

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


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

示例1: listingtblbody

    public void listingtblbody()
    {
        Brand objbrand = new Brand();
        string page = Request.QueryString["Page"];
        if (page == null) page = "1";
        int HOWMANYPAGES = 0;
        List<Brand> objbrandlisting = objbrand.getBrandall(true,9 ,page.ToString(), "20", out  HOWMANYPAGES);

        Table tblbrand = new Table();

        tblbrand.Width = Unit.Percentage(100);
        tblbrand.CellPadding = 0;
        tblbrand.CellSpacing = 0;
        tblbrand.BorderWidth = 0;
        TableRow tblrow = new TableRow();
        TableCell tblcell = new TableCell();
        int sum = 0;
        for (int i = 0; i < objbrandlisting.Count; i++)
        {
            tblrow.HorizontalAlign = HorizontalAlign.Center;
            tblcell = new TableCell();
            tblcell.Style.Add("background", "white");
            string Brandid = objbrandlisting[i].BrandID;
            string logo = objbrandlisting[i].Logo;
            Image imag = new Image();
            imag.Width = 190;
            imag.Height = 190;
            imag.ImageUrl = "~/images/" + objbrandlisting[i].Logo;
            imag.Attributes.Add("onclick", "javascript:window.open('Branddetail.aspx?id=" + Brandid + "');");
            tblcell.Controls.Add(imag);
            tblrow.Cells.Add(tblcell);

            sum = sum + 1;
            if (sum == 5)
            {
                tblbrand.Controls.Add(tblrow);
                tblrow = new TableRow();
                sum = 0;
            }

            else
            {
                tblbrand.Controls.Add(tblrow);
            }
        }

        phbrand.Controls.Add(tblbrand);

        string firstPageUrl = "http://localhost/fuck/Brand/Brandlisting.aspx?";

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

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

示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        Brand testing = new Brand();
        string page = Request.QueryString["Page"];
        if (page == null) page = "1";
        int HOWMANYPAGES = 0;
        List<Brand> www = testing.getBrandall(true, page.ToString(), "6", out  HOWMANYPAGES);

        Table All = new Table();
        All.CellPadding = 1;
        All.CellSpacing = 1;

        //All.Style.Add("background-color", "#EDEFF4");
        All.CssClass = "topalign";
        All.Width = Unit.Percentage(100);
        TableRow allrows = new TableRow();
        TableCell allcells = new TableCell();
        allcells.CssClass = "topalign";

        Table tblmid = new Table();
        tblmid.BorderWidth = 2;
        tblmid.CssClass = "topalign";
        tblmid.Width = Unit.Pixel(100);
        TableRow tblmidrow = new TableRow();
        TableCell tblmidcell = new TableCell();
        tblmidcell.CssClass = "topalign";
        tblmidcell.BorderWidth = 2;

        Table firsttbl = new Table();
        firsttbl.CssClass = "topalign";
        firsttbl.Width = Unit.Percentage(100);
        firsttbl.CellPadding = 0;
        firsttbl.CellSpacing = 0;
        TableRow firsttblrow = new TableRow();
        TableCell firsttblcell = new TableCell();

        int i = 0;
        foreach (Brand output in www)
        {

            firsttblcell = new TableCell();
            firsttblcell.Style.Add("align" , "center");
            ImageButton img = new ImageButton();
            img.Width = 150;
            img.Height = 150;
            img.ImageUrl = "~/images/" + output.Logo;
            img.PostBackUrl = "~/Brand/Branddetail.aspx?brandid=" + output.BrandID + "";

            firsttblcell.Controls.Add(img);
            firsttblrow.Cells.Add(firsttblcell);

            firsttblcell = new TableCell();

            //min table for + and - click
           Table a1 = new Table();
            TableRow a2 = new TableRow();
            TableCell a3 = new TableCell();

            a3.Style.Add("align", "left");
            LinkButton btnadd = new LinkButton();
            btnadd.Text = "+";
            btnadd.Style.Add("text-decoration","none");
            a3.Controls.Add(btnadd);
            a2.Cells.Add(a3);
            a1.Controls.Add(a2);

            a3 = new TableCell();
            a2 = new TableRow();
            LinkButton btmin = new LinkButton();
            btmin.Text = "-";
            btmin.Style.Add("text-decoration", "none");
            a3.Controls.Add(btmin);
            a2.Cells.Add(a3);
            a1.Controls.Add(a2);

            firsttblcell.Controls.Add(a1);
            firsttblrow.Cells.Add(firsttblcell);
            firsttbl.Controls.Add(firsttblrow);

            //  firsttblrow.Cells.Add(firsttblcell);
        //    firsttbl.Rows.Add(firsttblrow);
            //min table for +  and -

            firsttblrow = new TableRow();
            firsttblcell = new TableCell();
            firsttblcell.CssClass = "topalign";
            firsttblcell.ColumnSpan = 2;
            Label lbl2 = new Label();
          // firsttblcell.Style.Add("background-color", "#b0c4de");
            lbl2.Text ="Brand Name : " + output.BrandName;
            lbl2.CssClass = "lblcomments";
            firsttblcell.Controls.Add(lbl2);
            firsttblrow.Cells.Add(firsttblcell);
            firsttbl.Rows.Add(firsttblrow);

            //   description row
           firsttblrow = new TableRow();
            firsttblcell = new TableCell();
            firsttblcell.CssClass = "topalign";
            firsttblcell.ColumnSpan = 2;
//.........这里部分代码省略.........
开发者ID:ziad007,项目名称:URI2,代码行数:101,代码来源:Archimedes.aspx.cs

示例3: listingtblbody

    public void listingtblbody()
    {
        Brand objbrand = new Brand();
        string page = Request.QueryString["Page"];
        if (page == null) page = "1";
        int HOWMANYPAGES = 0;
        List<Brand> objbrandlisting = objbrand.getBrandall(true, 9, page.ToString(), "20", out  HOWMANYPAGES);

        Table tblbrand = new Table();

        tblbrand.Width = Unit.Percentage(100);
        tblbrand.CellPadding = 0;
        tblbrand.CellSpacing = 0;
        tblbrand.BorderWidth = 0;
        TableRow tblrow = new TableRow();
        TableCell tblcell = new TableCell();
        int sum = 0;
        int sums = 0;
        int value = 0;
        for (int i = 0; i < objbrandlisting.Count; i++)
        {
            tblrow.HorizontalAlign = HorizontalAlign.Center;
            tblcell = new TableCell();
            tblcell.Style.Add("background", "white");
            string Brandid = objbrandlisting[i].BrandID;
            string logo = objbrandlisting[i].Logo;
            Image imag = new Image();
            imag.Width = 190;
            imag.Height = 190;
            imag.ImageUrl = "~/images/" + objbrandlisting[i].Logo;
            tblcell.Style.Add("-webkit-filter", "grayscale(1)");
            tblcell.Style.Add("filter", "gray");
            imag.Attributes.Add("onclick", "javascript:window.open('Archimedes.aspx?id=" + Brandid + "');");
            tblcell.Controls.Add(imag);
            tblrow.Cells.Add(tblcell);

            sum = sum + 1;
            sums = sums + 1;
            string id= Request.QueryString["id"];

            if (id == Brandid)
            {
                if (sums <= 5  && sums > 0)
                {
                    value = 5;
                }
                if (sums <= 10 && sums > 5)
                {
                    value = 10;
                }
                if (sums <= 15 && sums > 10)
                {
                    value = 15;
                }
                if (sums <= 20 && sums > 15)
                {
                    value = 20;
                }

            }

            if (sums == value)
            {
                if (id != null)
                {

                    tblbrand.Controls.Add(tblrow);
                    tblrow = new TableRow();
                    tblcell = new TableCell();
                    tblcell.ColumnSpan = 5;
                    tblcell.Controls.Add(main);
                    tblrow.Cells.Add(tblcell);
                }
                else
                {
                  //  main.Style.Add("display", "none");
                }
            }

            if (id == null)
            {
                main.Style.Add("display", "none");
            }

            if (sum == 5)
            {
                tblbrand.Controls.Add(tblrow);
                tblrow = new TableRow();
                sum = 0;
            }

            else
            {
                tblbrand.Controls.Add(tblrow);
            }
        }

        phbrand.Controls.Add(tblbrand);

        string firstPageUrl = "http://localhost/fuck/Brand/Brandlisting.aspx?";
//.........这里部分代码省略.........
开发者ID:ziad007,项目名称:URI3,代码行数:101,代码来源:Archimedes.aspx.cs

示例4: listingtblbody

    public void listingtblbody(Table tblbrand, TableRow tblrow, TableCell tblcell)
    {
        Brand objbrand = new Brand();
        string page = Request.QueryString["Page"];
        if (page == null) page = "1";
        int HOWMANYPAGES = 0;
        List<Brand> objbrandlisting = objbrand.getBrandall(true, page.ToString(), "5", out  HOWMANYPAGES);

        for (int i = 0; i < objbrandlisting.Count; i++)
        {
            tblrow = new TableRow();
            tblcell.CssClass = "bodycells";
            tblrow.HorizontalAlign = HorizontalAlign.Center;

            tblrow.Style.Add("background-color", "#EDE9D3");
            tblcell = new TableCell();
            //  tblcell.Width = 600;
            string Brandid = objbrandlisting[i].BrandID;
            string logo = objbrandlisting[i].Logo;
            Image imag = new Image();
            imag.Width = 40;
            imag.Height = 40;
            imag.ImageUrl = "~/images/" + objbrandlisting[i].Logo;
            //  imag.PostBackUrl="Branddetail.aspx?brandid=" + a + "";
            tblcell.Controls.Add(imag);
            tblrow.Cells.Add(tblcell);

            tblcell = new TableCell();
            HyperLink lnk = new HyperLink();
            lnk.CssClass = "lblNav";
            lnk.NavigateUrl = "Branddetail.aspx?brandid=" + Brandid + "";
            lnk.Text = "<PRE> " + objbrandlisting[i].BrandName;
            lnk.Style.Add("text-decoration", "none");
            tblcell.Controls.Add(lnk);
            tblrow.Cells.Add(tblcell);

            tblcell = new TableCell();
            HyperLink website = new HyperLink();
            website.Text = objbrandlisting[i].Website;
            lnk.NavigateUrl = "Branddetail.aspx?brandid=" + Brandid + "";
            tblcell.Controls.Add(website);
            tblrow.Cells.Add(tblcell);

            tblcell = new TableCell();
            Button btnedit = new Button();
            btnedit.PostBackUrl = "http://localhost/Fuck/Brand/EditBrand.aspx?id=" + Brandid + "";
            btnedit.Text = "Edit";
            tblcell.Controls.Add(btnedit);
            tblrow.Cells.Add(tblcell);

            tblcell = new TableCell();
            Button btnapprove = new Button();
            string str = "";
            if (int.Parse(page) > 1)
            {
                int number = int.Parse(page);
                str = "Brandlisting.aspx?page=" + number + "&dl=1&id=" + objbrandlisting[i].BrandID + "";
            }
            else
            {
                str = "Brandlisting.aspx?dl=1&id=" + objbrandlisting[i].BrandID + "";
            }
            btnapprove.PostBackUrl = str;
            btnapprove.Text = "Approve";
            tblcell.Controls.Add(btnapprove);
            tblrow.Cells.Add(tblcell);

            tblcell = new TableCell();
            Button reject = new Button();
            if (int.Parse(page) > 1)
            {
                int number = int.Parse(page);
                str = "Brandlisting.aspx?page=" + number + "&dl=2&id=" + objbrandlisting[i].BrandID + "";
            }
            else
            {
                str = "Brandlisting.aspx?dl=2&id=" + objbrandlisting[i].BrandID + "";
            }
            reject.PostBackUrl = str;
            reject.Text = "Reject";
            tblcell.Controls.Add(reject);
            tblrow.Cells.Add(tblcell);

            tblbrand.Controls.Add(tblrow);
        }

        phbrand.Controls.Add(tblbrand);

        string firstPageUrl = "http://localhost/fuck/Brand/Brandlisting.aspx?";

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

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


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