Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ((MasterPage)Page.Master).imp = "class=\"active\"";
            var pageNum = 1;

            try {
                if (!string.IsNullOrEmpty(Request.QueryString["Page"]))
                {
                    pageNum = Convert.ToInt32(Request.QueryString["Page"]);
                }
            }
            catch (Exception ex) {
                pageNum = 1;
            }
            var sql = "select row_number() over(order by PIID DESC) as rownum, * from ProfInfo where Status=1";

            Pager11.GetDataBind("Repeater", "rptList", sql, pageNum, 5, " ", "rownum", "Expert.aspx?");
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ((MasterPage)Page.Master).imp = "class=\"active\"";
            //rptCom.DataSource = _comInfoDal.GetList(" Status=1 order by CreateDate desc ", new List<SqlParameter>()).Tables[0];
            //rptCom.DataBind();
            var pageNum = 1;

            try {
                if (!string.IsNullOrEmpty(Request.QueryString["Page"]))
                {
                    pageNum = Convert.ToInt32(Request.QueryString["Page"]);
                }
            }
            catch (Exception ex) {
                pageNum = 1;
            }
            var sql = "select row_number() over(order by CreateDate DESC) as rownum, AdvisoryList.*,OrgEmployees.EmplName from AdvisoryList JOIN OrgUsers ON OrgUsers.UId = AdvisoryList.UId JOIN OrgEmployees ON OrgEmployees.EmplId = OrgUsers.EmplId where AdvisoryList.Status=1 and AdvisoryList.MType=0";

            Pager11.GetDataBind("Repeater", "rptList", sql, pageNum, 5, " ", "rownum", "Message.aspx?");
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ((MasterPage)Page.Master).org = "class=\"active\"";
            //rptCom.DataSource = _comInfoDal.GetList(" Status=1 order by CreateDate desc ", new List<SqlParameter>()).Tables[0];
            //rptCom.DataBind();
            var pageNum = 1;

            try {
                if (!string.IsNullOrEmpty(Request.QueryString["Page"]))
                {
                    pageNum = Convert.ToInt32(Request.QueryString["Page"]);
                }
            }
            catch (Exception ex) {
                pageNum = 1;
            }
            var sql = "select row_number() over(order by OID DESC) as rownum, * from ProfOrg where Status=1";

            Pager11.GetDataBind("Repeater", "rptList", sql, pageNum, 6, " ", "rownum", "Mechanism.aspx?");
        }
Beispiel #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ((MasterPage)Page.Master).index = "class=\"active\"";
            var pageNum = 1;

            try {
                if (!string.IsNullOrEmpty(Request.QueryString["Page"]))             //页数判断
                {
                    pageNum = Convert.ToInt32(Request.QueryString["Page"]);
                }
            }
            catch (Exception ex) {
                pageNum = 1;
            }
            var       sql       = "select row_number() over(order by dbo.CMArticle.AddTime DESC) as rownum, dbo.CMArticle.* from dbo.CMArticle join dbo.CMColumn ON CMColumn.ColId = CMArticle.ColId where CMArticle.Status=1 AND CMColumn.ColName='客户评价'";
            Database  db        = DatabaseFactory.CreateDatabase();
            var       sqlCount  = "select count(*) from dbo.CMArticle join dbo.CMColumn ON CMColumn.ColId = CMArticle.ColId where CMArticle.Status=1 AND CMColumn.ColName='客户评价'";
            DbCommand dbCommand = db.GetSqlStringCommand(sqlCount);
            object    obj       = db.ExecuteScalar(dbCommand);

            Literal1.Text = obj.ToString();
            Pager11.GetDataBind("Repeater", "rptList", sql, pageNum, 6, " ", "rownum", "CMessage.aspx?");
        }