Example #1
0
        private string buildTableHTML(string pageNumber, string pageSize, string userId)
        {
            logger.Info("Build table html with pageNumber:" + pageNumber);
            logger.Info("Build table html with pageSize:" + pageSize);
            logger.Info("Build table html with userID:" + userId);
            TrunkinformationPagination trunkInfoPoco = new TrunkinformationPagination();

            try
            {
                trunkInfoPoco.Limit  = int.Parse(pageSize);
                trunkInfoPoco.Offset = (int.Parse(pageNumber) - 1) * trunkInfoPoco.Limit;
                trunkInfoPoco.Userid = long.Parse(userId);
            }
            catch (Exception ex)
            {
                logger.Error("Parameter invalid:" + ex.Message);
                return("参数错误:" + ex.Message);
            }
            IList <Trunkinformation> trunkInfoPocoList = this.trunkInfoDao.DescendOrderPaginationFindByUserid(trunkInfoPoco);

            logger.Info("Got items of Trunkinformation:" + trunkInfoPocoList.Count.ToString());
            string htmlData = this.tableGenerator.getTableHTML(this.getTableHeader(), this.getTableData(trunkInfoPocoList), this.getOperate());

            logger.Info("Table HTML data build done:" + htmlData);
            return(htmlData);
        }
        public IList <Trunkinformation> PaginationFindBySrccountycode(TrunkinformationPagination obj)
        {
            String stmtId = "TrunkinformationPagination.FindBySrccountycode";
            IList <Trunkinformation> result = this.sqlMapper.QueryForList <Trunkinformation>(stmtId, obj);

            return(result);
        }
        public IList <Trunkinformation> PaginationFindByRoutetypeid(TrunkinformationPagination obj)
        {
            String stmtId = "TrunkinformationPagination.FindByRoutetypeid";
            IList <Trunkinformation> result = this.sqlMapper.QueryForList <Trunkinformation>(stmtId, obj);

            return(result);
        }
        public IList <Trunkinformation> DescendOrderPaginationFindAll(TrunkinformationPagination obj)
        {
            String stmtId = "Trunkinformation.DescendOrderFindAllPagination";
            IList <Trunkinformation> result = this.sqlMapper.QueryForList <Trunkinformation>(stmtId, obj);

            return(result);
        }
        public IList <Trunkinformation> PaginationFindByNegotiateprice(TrunkinformationPagination obj)
        {
            String stmtId = "TrunkinformationPagination.FindByNegotiateprice";
            IList <Trunkinformation> result = this.sqlMapper.QueryForList <Trunkinformation>(stmtId, obj);

            return(result);
        }