Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AdventureWorksDataContext db = new AdventureWorksDataContext();
        var noweProdukty             = (from p in db.Products
                                        orderby db.Losuj()
                                        select p).Take(3);

        WybraneProduktyListView.DataSource = noweProdukty;
        WybraneProduktyListView.DataBind();
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            AdventureWorksDataContext db = new AdventureWorksDataContext();
            var noweProdukty             = (from p in db.Products orderby db.Losuj() select p).Take(3);

            WybraneProduktyListView.DataSource = noweProdukty;
            WybraneProduktyListView.DataBind();

            GenericWebPart gwp = Parent as GenericWebPart; if (gwp != null)
            {
                gwp.Title = " Wybrane produkty:";
            }
        }