Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (!Page.IsPostBack)
        //{
        //    BOLProducts ProductsBOL = new BOLProducts();
        //    IQueryable<vRandProducts> ProductList = ProductsBOL.GetRandProduct();
        //    if (ProductList.Count() == 0)
        //        this.Visible = false;
        //    foreach (var CurProduct in ProductList)
        //    {
        //        hplTitle.Text = CurProduct.Title;
        //        hplTitle.NavigateUrl = "~/Shop/ShowProduct.aspx?Code=" + CurProduct.Code;
        //        lblPrice.Text = Tools.ChangeEnc(Tools.FormatCurrency(CurProduct.Price.ToString()));

        //        hplPicFile.ImageUrl = "~/Files/Products/" + CurProduct.PicFile;
        //        hplPicFile.NavigateUrl = "~/Shop/ShowProduct.aspx?Code=" + CurProduct.Code;
        //    }
        //}
        try
        {
            BOLUserADSs UserADSsBOL = new BOLUserADSs();
            rptTextAds.DataSource = UserADSsBOL.GetRandAds(5);
            rptTextAds.DataBind();
        }
        catch
        {
        }
    }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try{
         BOLUserADSs UserADSsBOL = new BOLUserADSs();
         rptTextAds.DataSource = UserADSsBOL.GetRandAds(12);
         rptTextAds.DataBind();
     }
     catch (Exception err)
     {
         BOLErrorLogs ErrorLogsBOL = new BOLErrorLogs();
         ErrorLogsBOL.Insert(err.Message, DateTime.Now, Request.Url.AbsolutePath, "UCTextAds::Load");
     }
 }