private void DisplayDiscountResults() { resultBLProducts = BLProduct.RetrieveDiscountedProductsFromDB(connectionString); ResultTitle.InnerText = "Sales"; ResultImage.Src = "/Images/sales2016promo.jpg"; ResultDescription.InnerText = " Dont miss out of this great sale of among our great products with up to 30 % discount. This sale only applies to the products in our current stock. Dont miss out!! First come, first served!"; DisplayProducts(); }
private void RetrieveRandomDiscountedProducts() { List <BLProduct> discountedProducts = BLProduct.RetrieveDiscountedProductsFromDB(connectionString); Random randomProduct = new Random(); int ad1 = randomProduct.Next(0, discountedProducts.Count - 2); int ad2 = randomProduct.Next(ad1 + 1, discountedProducts.Count - 1); adProductList.Add(discountedProducts[ad1]); adProductList.Add(discountedProducts[ad2]); Session["adProductList"] = adProductList; }