Esempio n. 1
0
        public void ShowPicNews()
        {
            strPageNo = Request["PageNo"];
            try
            {
                PageNo = Convert.ToInt32(strPageNo);
                if (PageNo == 0)
                {
                    PageNo = 1;
                }
                if (PageNo > 50)
                {
                    PageNo = 50;
                }

                BOLNews NewsBOL     = new BOLNews();
                int     ResultCount = NewsBOL.SearchPicNewsCount();
                rptNewsList.DataSource = NewsBOL.SearchPicNews(_pageSize, PageNo);;
                rptNewsList.DataBind();

                ConcatUrl = "";
                int PageCount = ResultCount / _pageSize;
                if (ResultCount % _pageSize > 0)
                {
                    PageCount++;
                }
                pgrToolbar.PageNo    = PageNo;
                pgrToolbar.PageCount = PageCount;
                pgrToolbar.ConcatUrl = ConcatUrl;
                pgrToolbar.PageBind();
            }
            catch
            {
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BOLHardCode HardCodeBOL = new BOLHardCode();

            HardCodeBOL.TableOrViewName = "HCContentTypes";
            lblHeader.Text = HardCodeBOL.GetNameByCode(_hCContentTypeCode);

            BOLNews NewsBOL   = new BOLNews();
            int     TakeCount = 4;

            if (_hCContentTypeCode == 5)//دیدگاه
            {
                TakeCount = 2;
            }
            if (_hCContentTypeCode == 8)//دیگر رسانه ها
            {
                TakeCount = 5;
            }
            if (_hCContentTypeCode == 3)//گزارش
            {
                TakeCount = 3;
            }
            if (_hCContentTypeCode == 2)//مصاحبه
            {
                TakeCount = 2;
            }
            rptItems.DataSource = NewsBOL.GetNewsByContentType(_hCContentTypeCode, TakeCount, 1);
            rptItems.DataBind();
            hplMore.NavigateUrl = "~/News/?CT=" + _hCContentTypeCode;
        }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string UserAgent = Request.UserAgent;

        if (!Page.IsPostBack)
        {
            //tnMostVisited.ShowLatestTextNews(100);

            try
            {
                BOLNews NewsBOL = new BOLNews();

                Keyword = Request["Keyword"];
                if (string.IsNullOrEmpty(Keyword))
                {
                    NewsList1.ShowPicNews();
                }
                //else
                //NewsList1.SearchNews(Keyword);

                rptKhabardaanPicNews.Visible    = true;
                rptKhabardaanPicNews.DataSource = NewsBOL.GetRandPicNews(4);
                rptKhabardaanPicNews.DataBind();
            }

            catch (Exception err)
            {
                BOLErrorLogs ErrorLogsBOL = new BOLErrorLogs();
                ErrorLogsBOL.Insert(err.Message, DateTime.Now, Request.Url.AbsolutePath, "News_Default::Load");
            }
        }
    }
Esempio n. 4
0
        public void ShowLatestNews()
        {
            strPageNo = Request["PageNo"];
            try
            {
                PageNo = Convert.ToInt32(strPageNo);
                if (PageNo == 0)
                {
                    PageNo = 1;
                }
                if (PageNo > 50)
                {
                    PageNo = 50;
                }

                BOLNews NewsBOL = new BOLNews();
                IQueryable <vLatestNews> ItemList = NewsBOL.GetLatestNews(_pageSize, PageNo);
                int ResultCount = NewsBOL.GetLatestNewsCount();
                rptNewsList.DataSource = ItemList;
                rptNewsList.DataBind();

                int PageCount = ResultCount / _pageSize;
                if (ResultCount % _pageSize > 0)
                {
                    PageCount++;
                }
                pgrToolbar.PageNo    = PageNo;
                pgrToolbar.PageCount = PageCount;
                pgrToolbar.ConcatUrl = ConcatUrl;
                pgrToolbar.PageBind();
            }
            catch
            {
            }
        }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                int     NewsCode = Convert.ToInt32(ViewState["_newsCode"]);
                BOLNews NewsBOL  = new BOLNews();
                rptNews.DataSource = NewsBOL.GetRelatedNews(NewsCode, 5, 1);
                rptNews.DataBind();

                //int RelatedCount = NewsBOL.GetRelatedNewsCount(NewsCode);
                //if (RelatedCount == 0)
                //    this.Visible = false;
                //else if (RelatedCount > 3)
                //{
                MoreLink.Text        = "تمام اخبار مرتبط... ";
                MoreLink.NavigateUrl = "~/News/RelatedNews.aspx?Code=" + NewsCode;
                //}
                //else
                //    MoreLink.Visible = false;
            }
            catch (Exception exp)
            {
                BOLErrorLogs ErrorLogsBOL = new BOLErrorLogs();
                ErrorLogsBOL.Insert(exp.Message, DateTime.Now, Request.Url.AbsolutePath, "UCRelatedNews");
            }
        }
Esempio n. 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BOLNews NewsBOL = new BOLNews();

            rptNews.DataSource = NewsBOL.GetEditorChoice(10);
            rptNews.DataBind();
        }
Esempio n. 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string strPageNo = Request["PageNo"];

            Int32.TryParse(strPageNo, out PageNo);
            if (PageNo == 0)
            {
                PageNo = 1;
            }

            if (!Page.IsPostBack)
            {
                BOLNews NewsBOL = new BOLNews();
                rptNews.DataSource = NewsBOL.GetNews(PageNo, PageSize);
                rptNews.DataBind();

                int ResultCount = NewsBOL.GetNewsCount();
                int PageCount   = (int)ResultCount / PageSize;
                if (ResultCount % PageSize > 0)
                {
                    PageCount++;
                }

                ConcatUrl           += "";
                pgrToolbar.PageNo    = PageNo;
                pgrToolbar.PageCount = PageCount;
                pgrToolbar.ConcatUrl = ConcatUrl;
                pgrToolbar.PageBind();
            }
        }
Esempio n. 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BOLNews NewsBOL = new BOLNews();

            rptSideNews.DataSource = NewsBOL.GetSmallNews(6, 1);
            rptSideNews.DataBind();
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string strCode = Request["Code"];
            int    Code;
            Int32.TryParse(strCode, out Code);
            BOLNews NewsBOL = new BOLNews();
            NewsList1.ShowNewsByCatCode(Code, null);

            string strPageNo = Request["PageNo"];
            int    PageNo    = Convert.ToInt32(strPageNo);
            if (PageNo == 0)
            {
                PageNo = 1;
            }


            IBaseBOL <DataTable> HardCodeBOL = new BOLHardCode();
            HardCodeBOL.QueryObjName = "HCResourceSitesCats";
            DataTable dtCurCat = HardCodeBOL.GetDetails(Code);
            if (dtCurCat.Rows.Count == 1)
            {
                ltrHeader.Text = "آخرین خبرهای " + dtCurCat.Rows[0]["Name"].ToString() + " صفحه " + Tools.ChangeEnc(PageNo);
                Page.Title     = " آخرین خبرهای " + dtCurCat.Rows[0]["Name"].ToString() + " صفحه " + Tools.ChangeEnc(PageNo);
            }
        }
        catch (Exception err)
        {
            BOLErrorLogs ErrorLogsBOL = new BOLErrorLogs();
            ErrorLogsBOL.Insert(err.Message, DateTime.Now, Request.Url.AbsolutePath, "NewsByCatCode::Load");
        }
    }
Esempio n. 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            switch (_hCNewsTypeCode)
            {
            case 1:
                ltrHeader.Text = "خبر";
                break;

            case 2:
                ltrHeader.Text = "یادداشت";
                break;

            case 3:
                ltrHeader.Text = "گزارش";
                break;

            case 4:
                ltrHeader.Text = "گفتگو";
                break;

            default:
                break;
            }

            BOLNews NewsBOL = new BOLNews();

            rptNews.DataSource = NewsBOL.GetLatestNews(5, _hCNewsTypeCode);
            rptNews.DataBind();

            hplArchive.NavigateUrl = "~/News/?NTC=" + _hCNewsTypeCode;
        }
Esempio n. 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BOLNews NewsBOL = new BOLNews();

            rptNews.DataSource = NewsBOL.GetNewsByContentType(9, 6, 1);
            rptNews.DataBind();
        }
Esempio n. 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BOLNews NewsBOL = new BOLNews();

            rptImageGallery.DataSource = NewsBOL.GetImageGallery(5);
            rptImageGallery.DataBind();
        }
Esempio n. 13
0
        internal void LoadMainCats(int MCat)
        {
            strPageNo = Request["PageNo"];
            try
            {
                PageNo = Convert.ToInt32(strPageNo);
            }
            catch
            {
            }
            if (PageNo == 0)
            {
                PageNo = 1;
            }

            BOLNews NewsBOL     = new BOLNews();
            int     SkipCount   = (PageNo - 1) * PageSize;
            var     ItemList    = NewsBOL.GetMainCatItems(new int[] { }, PageSize, PageNo, MCat).Select(t => new { t.Code, t.Title, t.Priority, t.SoTitr, t.NewsDate, t.Abstract, t.PicFile1 }).Distinct().OrderByDescending(p => p.Priority).Skip(SkipCount).Take(PageSize);;
            int     ResultCount = NewsBOL.GetMainCatItemsCount(MCat);

            rptNewsList.DataSource = ItemList;
            rptNewsList.DataBind();

            ConcatUrl = "&MCat=" + MCat;
            int PageCount = ResultCount / _pageSize;

            if (ResultCount % _pageSize > 0)
            {
                PageCount++;
            }
            pgrToolbar.PageNo    = PageNo;
            pgrToolbar.PageCount = PageCount;
            pgrToolbar.ConcatUrl = ConcatUrl;
            pgrToolbar.PageBind();
        }
Esempio n. 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BOLNews NewsBOL = new BOLNews();

            rptNews.DataSource = NewsBOL.GetLatest10News();
            rptNews.DataBind();
        }
Esempio n. 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            int     KeywordCode = Convert.ToInt32(Request["Code"]);
            BOLNews NewsBOL     = new BOLNews();

            BOLKeywords KeywordsBOL = new BOLKeywords();
            Keywords    CurKeyword  = ((IBaseBOL <Keywords>)KeywordsBOL).GetDetails(KeywordCode);
            if (CurKeyword != null)
            {
                Response.Redirect("~/NK" + CurKeyword.Code + "_" + Tools.ReplaceSpaceWithUnderline(CurKeyword.Name) + ".html", false);
                return;

                NewsList1.ShowNewsByKeywordCode(KeywordCode);

                lblTitle.Text = " خبرهای " + CurKeyword.Name;
                Page.Title    = "خبرهای " + CurKeyword.Name;
                HtmlMeta metadesc = (HtmlMeta)Page.Master.FindControl("description");
                metadesc.Attributes["content"] = CurKeyword.Name;
            }
            else
            {
                Response.Redirect("~/", false);
            }
        }
        catch (Exception err)
        {
            BOLErrorLogs ErrorLogsBOL = new BOLErrorLogs();
            ErrorLogsBOL.Insert(err.Message, DateTime.Now, Request.Url.AbsolutePath, "NewsByKeywordCode::Load");
            Response.Redirect("~/", false);
        }
    }
Esempio n. 16
0
        public void ShowNewsByNewsTypeCode(int HCNewsCatCode, int HCNewsTypeCode)
        {
            strPageNo = Request["PageNo"];
            try
            {
                PageNo = Convert.ToInt32(strPageNo);
            }
            catch
            {
            }
            if (PageNo == 0)
            {
                PageNo = 1;
            }

            BOLNews            NewsBOL  = new BOLNews();
            IQueryable <vNews> ItemList = NewsBOL.GetNewsByCatCode(HCNewsCatCode, PageSize, PageNo, null, HCNewsTypeCode);
            int ResultCount             = NewsBOL.GetNewsByCatCodeCount(HCNewsCatCode, HCNewsTypeCode);

            rptNewsList.DataSource = ItemList;
            rptNewsList.DataBind();

            ConcatUrl = "&Code=" + HCNewsCatCode + "&NT=" + HCNewsCatCode;
            int PageCount = ResultCount / _pageSize;

            if (ResultCount % _pageSize > 0)
            {
                PageCount++;
            }
            pgrToolbar.PageNo    = PageNo;
            pgrToolbar.PageCount = PageCount;
            pgrToolbar.ConcatUrl = ConcatUrl;
            pgrToolbar.PageBind();
        }
Esempio n. 17
0
    protected void rptHeadlines_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        BOLNews NewsBOL = new BOLNews();

        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            HyperLink hplRelatedNews = (HyperLink)e.Item.FindControl("hplRelatedNews");
            int       NewsCode       = Convert.ToInt32(hplRelatedNews.Attributes["Code"]);

            Image  imgNews = (Image)e.Item.FindControl("imgNews");
            string PicName = imgNews.Attributes["PicName"];
            if (string.IsNullOrEmpty(PicName))
            {
                imgNews.Visible = false;
            }


            //int RelatedNewsCount = NewsBOL.GetRelatedNewsCount(NewsCode);
            //if (RelatedNewsCount > 0)
            //{
            //    hplRelatedNews.Text = "مشاهده " + Tools.ChangeEnc( NewsBOL.GetRelatedNewsCount(NewsCode).ToString()) + " خبر مرتبط";
            //    hplRelatedNews.NavigateUrl = "~/News/RelatedNews.aspx?Code=" + NewsCode;
            //}
            //else
            hplRelatedNews.Visible = false;
        }
    }
Esempio n. 18
0
        public void LoadPicNews()
        {
            BOLNews NewsBOL = new BOLNews();
            IQueryable <Khabardaan.Code.DAL.vNews> NewList = NewsBOL.LoadPicNews(20);

            rptNews61.DataSource = NewList.Skip(0).Take(6);
            rptNews61.DataBind();

            string ReturnCodeList = "";

            foreach (var item in NewList)
            {
                if (ReturnCodeList == "")
                {
                    ReturnCodeList = item.Code.ToString();
                }
                else
                {
                    ReturnCodeList += "," + item.Code.ToString();
                }
            }


            rptNews41.DataSource = NewList.Skip(6).Take(4);
            rptNews41.DataBind();

            rptNews62.DataSource = NewList.Skip(10).Take(6);
            rptNews62.DataBind();

            rptNews42.DataSource = NewList.Skip(16).Take(4);
            rptNews42.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            strPageNo = Request["PageNo"];
            try
            {
                PageNo = Convert.ToInt32(strPageNo);
            }
            catch
            {
            }
            if (PageNo == 0)
            {
                PageNo = 1;
            }

            BOLNews NewsBOL = new BOLNews();

            IQueryable <News> ItemList = NewsBOL.GetImageGallery(PageSize, PageNo);
            int ResultCount            = NewsBOL.GetImageGalleryCount();

            rptImageGallery.DataSource = ItemList;
            rptImageGallery.DataBind();

            ConcatUrl = "";
            int PageCount = ResultCount / PageSize;

            if (ResultCount % PageSize > 0)
            {
                PageCount++;
            }
            pgrToolbar.PageNo    = PageNo;
            pgrToolbar.PageCount = PageCount;
            pgrToolbar.ConcatUrl = ConcatUrl;
            pgrToolbar.PageBind();
        }
Esempio n. 20
0
        public void ShowLatestTextNews(int?MaxLen)
        {
            strPageNo = Request["PageNo"];
            try
            {
                PageNo = Convert.ToInt32(strPageNo);
            }
            catch
            {
            }
            if (PageNo == 0)
            {
                PageNo = 1;
            }


            PageNo = 1;
            BOLNews NewsBOL = new BOLNews();

            if (_newsType == NewsTypes.RandNews)
            {
                IQueryable <vRandTextNews> ItemList = NewsBOL.GetLatestTextNews(_pageSize, PageNo, MaxLen);
                ItemCount = ItemList.Count();

                rptNewsList.DataSource = ItemList;
                rptNewsList.DataBind();
            }
            else
            {
                rptNewsList.DataSource = NewsBOL.GetMostVisitedTextNews(_pageSize, PageNo, MaxLen);
                rptNewsList.DataBind();
            }
        }
Esempio n. 21
0
        public void GetRelatedNews(int Code)
        {
            BOLNews NewsBOL = new BOLNews();

            rptRelatedNews.DataSource = NewsBOL.GetRelatedNews(Code, 10);
            rptRelatedNews.DataBind();
            this.Visible = true;
        }
Esempio n. 22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.ContentType = "text/xml";
        BOLNews NewsBOL = new BOLNews();

        rptNews.DataSource = NewsBOL.GetLatestNewsList(null, new int[] {}, 10, 1, null, null, null);
        rptNews.DataBind();
    }
Esempio n. 23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //HtmlGenericControl script = new HtmlGenericControl("script");
            //script.Attributes.Add("src", this.ResolveClientUrl("~/Admin/Scripts/farsi.js"));
            //script.Attributes.Add("type", "text/javascript");
            //Page.Header.Controls.Add(script);

            if (!Page.IsPostBack)
            {
                int    Code    = 0;
                string strCode = Request["Code"];
                Int32.TryParse(strCode, out Code);
                BOLNews NewsBOL = new BOLNews();
                News    CurNews = ((IBaseBOL <News>)NewsBOL).GetDetails(Code);
                if (CurNews != null)
                {
                    NewsCode          = Code.ToString();
                    ViewState["Code"] = CurNews.Code;

                    lblSuTitr.Text = CurNews.SoTitr;
                    Page.Title     = lblTitle.Text = CurNews.Title;

                    DateTimeMethods dtm           = new DateTimeMethods();
                    string          strDateTime   = "";
                    string          strCurrentMin = CurNews.NewsDate.Minute.ToString();


                    strDateTime += Tools.ChageEnc(dtm.GetPersianLongDate(CurNews.NewsDate));
                    strDateTime += " ساعت: " + Tools.ChageEnc(CurNews.NewsDate.Hour + ":" + strCurrentMin);

                    lblDate.Text = strDateTime;

                    lblNewsCode.Text = " کد : " + Tools.ChageEnc(CurNews.Code.ToString());

                    if (!string.IsNullOrEmpty(CurNews.PicFile1))
                    {
                        hplImage.ImageUrl    = CurNews.PicFile1;
                        hplImage.NavigateUrl = CurNews.PicFile1;
                    }
                    else
                    {
                        hplImage.ImageUrl = "~/images/Nopic.gif";
                    }

                    string Abstract = CurNews.Abstract;
                    Abstract = Abstract.Replace("style=", "style1=");
                    Abstract = Abstract.Replace("<br />", "</p><p>");
                    //NewBody = NewBody.Replace("<div", "<p");


                    ltrNewsBody.Text = Tools.FormatText(Abstract);
                    BOLComments CommentsBOL  = new BOLComments();
                    int         CommentCount = CommentsBOL.GetCommentCount(CurNews.Code);

                    lblAbstract.Text = Tools.FormatText(CurNews.Abstract);
                }
            }
        }
Esempio n. 24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                int    HCContentTypeCode    = 0;
                string strHCContentTypeCode = Request["CT"];
                string strCaseCode          = Request["CaseCode"];
                string strDate         = Request["d"];
                string strNewsTypeCode = Request["NTC"];

                Int32.TryParse(strHCContentTypeCode, out HCContentTypeCode);
                string Keyword = Request["Keyword"];
                string strMCat = Request["MCat"];
                int    MCat;
                int    CaseCode;
                int    NewsTypeCode;

                Int32.TryParse(strCaseCode, out CaseCode);
                Int32.TryParse(strMCat, out MCat);
                Int32.TryParse(strNewsTypeCode, out NewsTypeCode);

                int    WorkGroupCode    = 0;
                string strWorkGroupCode = Request["WG"];
                Int32.TryParse(strWorkGroupCode, out WorkGroupCode);

                if (HCContentTypeCode != 0)
                {
                    BOLHardCode HardCodeBOL = new BOLHardCode();
                    HardCodeBOL.TableOrViewName = "HCContentTypes";
                    //lblHeader.Text = HardCodeBOL.GetNameByCode(HCContentTypeCode);

                    //BOLNews NewsBOL = new BOLNews();
                    //vNews LatestNews = NewsBOL.GetLatestNews(1);
                    NewsList1.ShowNewsByContentTypeCode(HCContentTypeCode);
                }
                else if (MCat != 0)
                {
                    BOLNews NewsBOL = new BOLNews();
                    NewsList1.LoadMainCats(MCat);
                }
                else if (!string.IsNullOrEmpty(Keyword))
                {
                    //BOLNews NewsBOL = new BOLNews();
                    //vNews LatestNews = NewsBOL.GetLatestNews(1);
                    NewsList1.PageSize       = 10;
                    NewsList1.CurrentKeywrod = Keyword;
                    NewsList1.SearchNews(Keyword);
                }
                else if (!string.IsNullOrEmpty(strDate))
                {
                    NewsList1.ShowLatestNews(null, 10, new int[] { }, null, null, true, strDate, NewsTypeCode);
                }
                else
                {
                    NewsList1.ShowLatestNews(null, 10, new int[] { }, null, null, true, null, NewsTypeCode);
                }
            }
        }
Esempio n. 25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int LangCode = Tools.GetLang();

            BOLNews NewsBOL = new BOLNews();

            rptItems.DataSource = NewsBOL.GetMostViewedNews(LangCode, 3);
            rptItems.DataBind();
        }
Esempio n. 26
0
 protected void Page_Load(object sender, EventArgs e)
 {
     msgBox.Text = "";
     if (!Page.IsPostBack)
     {
         BOLNews NewsBOL = new BOLNews();
         rptLatestNews.DataSource = NewsBOL.GetLatestNewsList(null, new int[] {}, 20, 1, null, null, null);
         rptLatestNews.DataBind();
     }
 }
Esempio n. 27
0
    public int SaveChanges(bool IsNewRecord)
    {
        string  NewsTitle = "";
        Courses ObjTable;

        if (IsNewRecord)
        {
            ObjTable = new Courses();
            dataContext.Courses.InsertOnSubmit(ObjTable);
        }
        else
        {
            ObjTable = dataContext.Courses.Single(p => p.Code.Equals(this.Code));
        }
        try
        {
            #region Save Controls
            string BaseID = this.ToString().Substring(3, this.ToString().Length - 3);
            Tools  tools  = new Tools();
            tools.AccessList = tools.GetAccessList(BaseID);
            foreach (WebControl wc in ObjectList)
            {
                string       Property     = wc.ID.Substring(3, wc.ID.Length - 3);
                PropertyInfo pi           = ObjTable.GetType().GetProperty(Property);
                string       FullPropName = BaseID + "." + Property;
                if (tools.HasAccess("Edit", BaseID + "." + Property))
                {
                    pi.SetValue(ObjTable, Tools.GetControlValue(wc), new object[] { });
                }

                if (Property == "Title")
                {
                    NewsTitle = ((TextBox)wc).Text;
                }
            }
            #endregion

            if (tools.HasAccess("Edit", "Courses"))
            {
                dataContext.SubmitChanges();
            }
        }
        catch (Exception exp)
        {
            throw exp;
        }

        if (IsNewRecord)
        {
            BOLNews NewsBOL = new BOLNews();
            NewsBOL.Insert(NewsTitle, "Courses.aspx");
        }

        return(ObjTable.Code);
    }
Esempio n. 28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BOLNews NewsBOL = new BOLNews();

            rptNewsTicker.DataSource = NewsBOL.GetLatestTelexNews(10);
            rptNewsTicker.DataBind();

            BOLLinks LinksBOLD = new BOLLinks();

            rptLinks.DataSource = LinksBOLD.GetLinks();
            rptLinks.DataBind();
        }
Esempio n. 29
0
 protected void btnRemoveFromSelected_Click(object sender, EventArgs e)
 {
     if (ViewState["SelectedCode"] != null)
     {
         int     NewsToRemoveCode = Convert.ToInt32(ViewState["SelectedCode"]);
         BOLNews NewsBOL          = new BOLNews();
         int     NewPririty       = 0;
         NewsBOL.SetNewPriority(NewsToRemoveCode, NewPririty);
         rptLatestNews.DataSource = NewsBOL.GetLatestNewsList(null, new int[] { }, 20, 1, null, null, null);
         rptLatestNews.DataBind();
     }
 }
Esempio n. 30
0
    protected void Page_Load(object sender, EventArgs e)
    {
        BOLLogs LogsBOL = new BOLLogs();

        LogsBOL.LogRequest();

        Response.ContentEncoding = System.Text.Encoding.UTF8;
        Response.ContentType     = "text/xml";
        BOLNews NewsBOL = new BOLNews();

        rptNews.DataSource = NewsBOL.GetLatestNews(10, 1);
        rptNews.DataBind();
    }