/// <summary>
        /// Binds this instance.
        /// </summary>
        void Bind()
        {
            string where = null;

            if (ViewState["StarTime"] != null && ViewState["EndTime"] != null)
            {
                where += " (CreateTime>'" + ViewState["StarTime"].ToString() + "' AND CreateTime <'" + ViewState["EndTime"].ToString() + "') AND ";
            }

            where += " Id>-1 ";

            try
            {
                Repeater_admin.DataSource = Bll.GetList(Convert.ToInt32(Application["PageSize"]), Convert.ToInt32(ViewState["Page"]), where);
                Repeater_admin.DataBind();
                ViewState["PageCon"]     = Bll.GetRecordCount(where) / Convert.ToInt32(Application["PageSize"]) + 1;
                ViewState["PageContent"] = Bll.GetRecordCount(where);
                //Bll.GetList("");
            }
            catch //异常处理
            {
                Repeater_admin.DataSource = null;
                Repeater_admin.DataBind();
            }
        }
Beispiel #2
0
        /// <summary>
        /// Binds this instance.
        /// </summary>
        void Bind()
        {
            string where = null;

            where += " Id>-1 ";

            //try
            //{
            Repeater_admin.DataSource = Bll.GetList(Convert.ToInt32(Application["PageSize"]), Convert.ToInt32(ViewState["Page"]), where);
            Repeater_admin.DataBind();
            ViewState["PageCon"]     = Bll.GetRecordCount(where) / Convert.ToInt32(Application["PageSize"]) + 1;
            ViewState["PageContent"] = Bll.GetRecordCount(where);
            Bll.GetList("");
            //}
            //catch //异常处理
            //{
            //    Repeater_admin.DataSource = null;
            //    Repeater_admin.DataBind();
            //}
        }