Esempio n. 1
0
        private void Bind()
        {
            if (!string.IsNullOrEmpty(funName))
            {
                int totalRecords = 0;
                switch (funName)
                {
                case "PictureScratchLotto":
                    var pslBll = new PictureScratchLotto();
                    rpData.DataSource = pslBll.GetList(pageIndex, pageSize, out totalRecords, "", null);
                    rpData.DataBind();
                    break;

                case "PictureAdStartup":
                    var padsuBll = new PictureAdStartup();
                    rpData.DataSource = padsuBll.GetList(pageIndex, pageSize, out totalRecords, "", null);
                    rpData.DataBind();
                    break;

                default:
                    break;
                }

                myDataAppend.Replace("{TotalRecord}", totalRecords.ToString());
                myDataAppend.Replace("{PageIndex}", pageIndex.ToString());
                myDataAppend.Replace("{PageSize}", pageSize.ToString());
            }
        }
Esempio n. 2
0
        private void Bind()
        {
            GetSearchItem();

            int totalRecords = 0;
            var bll          = new PictureAdStartup();

            rpData.DataSource = bll.GetList(pageIndex, pageSize, out totalRecords, sqlWhere == null ? null : sqlWhere.ToString(), parms == null ? null : parms.ToArray());
            rpData.DataBind();

            myDataAppend += "<div id=\"myDataForPage\" style=\"display:none;\">[{\"PageIndex\":\"" + pageIndex + "\",\"PageSize\":\"" + pageSize + "\",\"TotalRecord\":\"" + totalRecords + "\",\"QueryStr\":\"" + queryStr + "\"}]</div>";
        }