示例#1
0
        public void getimgs()
        {
            var db = new Pizza15Model();

            var BrewFestCat = (from q in db.tbl_ImageCategory
                               where q.CategoryID == 19
                               select new { q.CategoryID, q.SubCategoryID, q.SubCategoryName, q.CategoryName }).ToList();

            OuterRptBrewFest.DataSource = BrewFestCat;
            OuterRptBrewFest.DataBind();

            //carousel repeaters

            var BrewFestcarousel = (from q in db.tbl_Images
                                    where q.CategoryID == 19
                                    select new { q.ImageUrl }).ToList();

            RptcarouselBrewFest.DataSource = BrewFestcarousel;
            RptcarouselBrewFest.DataBind();
        }
示例#2
0
        public void getimgs()
        {
            var db = new Pizza15Model();

            //var BrewFestCat = (from q in db.tbl_ImageCategory
            //                   where q.CategoryID == 1
            //                   select new { q.CategoryID, q.SubCategoryID, q.SubCategoryName }).ToList();

            //OuterRptBrewFest.DataSource = BrewFestCat;
            //OuterRptBrewFest.DataBind();

            var EmployeesCat = (from q in db.tbl_ImageCategory
                                where q.CategoryID == 2
                                select new { q.CategoryID, q.SubCategoryID, q.SubCategoryName }).ToList();

            OuterRptEmployees.DataSource = EmployeesCat;
            OuterRptEmployees.DataBind();

            var FoodPicturesCat = (from q in db.tbl_ImageCategory
                                   where q.CategoryID == 3
                                   select new { q.CategoryID, q.SubCategoryID, q.SubCategoryName }).ToList();

            OuterRptFoodPictures.DataSource = FoodPicturesCat;
            OuterRptFoodPictures.DataBind();

            var OurFriendssCat = (from q in db.tbl_ImageCategory
                                  where q.CategoryID == 4
                                  select new { q.CategoryID, q.SubCategoryID, q.SubCategoryName }).ToList();

            OuterRptOurFriends.DataSource = OurFriendssCat;
            OuterRptOurFriends.DataBind();

            var PubPicturesCat = (from q in db.tbl_ImageCategory
                                  where q.CategoryID == 5
                                  select new { q.CategoryID, q.SubCategoryID, q.SubCategoryName }).ToList();

            OuterRptPubPictures.DataSource = PubPicturesCat;
            OuterRptPubPictures.DataBind();

            var RandomStuffCat = (from q in db.tbl_ImageCategory
                                  where q.CategoryID == 6
                                  select new { q.CategoryID, q.SubCategoryID, q.SubCategoryName }).ToList();

            OuterRptRandomStuff.DataSource = RandomStuffCat;
            OuterRptRandomStuff.DataBind();


            //carousel repeaters

            var BrewFestcarousel = (from q in db.tbl_Images
                                    where q.CategoryID == 1
                                    select new { q.ImageUrl }).ToList();

            RptcarouselBrewFest.DataSource = BrewFestcarousel;
            RptcarouselBrewFest.DataBind();

            var Employeescarousel = (from q in db.tbl_Images
                                     where q.CategoryID == 2
                                     select new { q.ImageUrl }).ToList();

            RptcarouselEmployees.DataSource = Employeescarousel;
            RptcarouselEmployees.DataBind();

            var FoodPicturescarousel = (from q in db.tbl_Images
                                        where q.CategoryID == 3
                                        select new { q.ImageUrl }).ToList();

            RptcarouselFoodPictures.DataSource = FoodPicturescarousel;
            RptcarouselFoodPictures.DataBind();

            var OurFriendscarousel = (from q in db.tbl_Images
                                      where q.CategoryID == 4
                                      select new { q.ImageUrl }).ToList();

            RptcarouselOurFriends.DataSource = OurFriendscarousel;
            RptcarouselOurFriends.DataBind();

            var PubPicturescarousel = (from q in db.tbl_Images
                                       where q.CategoryID == 5
                                       select new { q.ImageUrl }).ToList();

            RptcarouselPubPictures.DataSource = PubPicturescarousel;
            RptcarouselPubPictures.DataBind();

            var RandomStuffcarousel = (from q in db.tbl_Images
                                       where q.CategoryID == 6
                                       select new { q.ImageUrl }).ToList();

            RptcarouselRandomStuff.DataSource = RandomStuffcarousel;
            RptcarouselRandomStuff.DataBind();
        }