Example #1
0
    private void BindUpdateBulletin()
    {
        L_BulletionInfo bulletion = new BulletionInfo().GetBulletinInfo(bulletinID, 0);

        if (bulletion == null)
        {
            Response.Write(WebUnitily.AlertUrl("信息不存在,请您重新选择"));
            Response.End();
        }
        txtTitle.Text   = bulletion.BulletinTitle;
        txtContent.Text = bulletion.BulletinContent;
    }
Example #2
0
    private void bindBulletin()
    {
        IList  iL;
        string CacheName = "cachBulletinProduct";

        if (HttpContext.Current.Cache[CacheName] == null)
        {
            iL = new BulletionInfo().GetBulletinList();
            HttpContext.Current.Cache.Add(CacheName, iL, null, DateTime.MaxValue, new TimeSpan(0, 5, 0, 0, 0), System.Web.Caching.CacheItemPriority.Normal, null);
        }
        iL = (IList)HttpContext.Current.Cache.Get(CacheName);
        if (iL.Count > 0)
        {
            rpBulletinList.DataSource = iL;
            rpBulletinList.DataBind();
        }
    }