Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            m_AdminForm = AdminBlogArticleFilter.GetFromFilter("filter");
            int userid = _Request.Get <int>("userid", Method.Get, 0);

            if (userid > 0)
            {
                m_AdminForm.AuthorID = userid;
            }

            if (_Request.IsClick("advancedsearch"))
            {
                SearchAlbums();
            }
            else if (_Request.IsClick("deletechecked"))
            {
                DeleteChecked();
            }
            else if (_Request.IsClick("deletesearched"))
            {
                DeleteSearched();
                //DeletedSearchResult();
            }

            using (ErrorScope es = new ErrorScope())
            {
                int pageNumber = _Request.Get <int>("page", 0);

                m_ArticleListPageSize = m_AdminForm.PageSize;

                m_ArticleList = BlogBO.Instance.GetBlogArticlesForAdmin(MyUserID, m_AdminForm, pageNumber);

                if (m_ArticleList != null)
                {
                    m_TotalArticleCount = m_ArticleList.TotalRecords;

                    UserBO.Instance.WaitForFillSimpleUsers <BlogArticle>(m_ArticleList);
                }

                if (es.HasUnCatchedError)
                {
                    es.CatchError <ErrorInfo>(delegate(ErrorInfo error) {
                        ShowError(error);
                    });
                }
            }
        }