Esempio n. 1
0
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select r.*,c.id as cid,c.rContent,c.rContent2,c.detailUrl,c.picUrl,c.mediaUrl,c.remark from wx_requestRule r left join wx_requestRuleContent  c on r.id=c.rId ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where  " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 2
0
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select Id,Name,Code,IsOutOfTeam,LinkMan,LinkTel,LinkAddress,Remarks FROM " + databaseprefix + "Motorcade");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 3
0
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select a.*,'' as status_s,'' as url,(select reqkeywords from wx_requestRule where modelfunctionName='刮刮卡' and modelFunctionId=a.id) as kw  from wx_ggkActionInfo a ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where  " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 4
0
    /// <summary>
    /// 获得查询分页数据
    /// </summary>
    public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
    {
        StringBuilder strSql = new StringBuilder();

        strSql.Append("select * FROM  view_sell");
        if (strWhere.Trim() != "")
        {
            strSql.Append(" where " + strWhere);
        }
        recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
        return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
    }
Esempio n. 5
0
        /*
         *      /// <summary>
         *      /// 分页获取数据列表
         *      /// </summary>
         *      public DataSet GetList(int PageSize,int PageIndex,string strWhere)
         *      {
         *              SqlParameter[] parameters = {
         *                              new SqlParameter("@tblName", SqlDbType.VarChar, 255),
         *                              new SqlParameter("@fldName", SqlDbType.VarChar, 255),
         *                              new SqlParameter("@PageSize", SqlDbType.Int),
         *                              new SqlParameter("@PageIndex", SqlDbType.Int),
         *                              new SqlParameter("@IsReCount", SqlDbType.Bit),
         *                              new SqlParameter("@OrderType", SqlDbType.Bit),
         *                              new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
         *                              };
         *              parameters[0].Value = "dt_historydata";
         *              parameters[1].Value = "id";
         *              parameters[2].Value = PageSize;
         *              parameters[3].Value = PageIndex;
         *              parameters[4].Value = 0;
         *              parameters[5].Value = 0;
         *              parameters[6].Value = strWhere;
         *              return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
         *      }*/

        #endregion  BasicMethod
        #region  ExtensionMethod
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select h.*,i.user_id FROM dt_historydata h left join dt_item i on i.id=h.item_id");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 6
0
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select *,(select count(0) from " + databaseprefix + "article_tags_relation where tag_id=" + databaseprefix + "article_tags.id) as count FROM " + databaseprefix + "article_tags");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 7
0
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        /// <param name="pageSize">分页数量</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="strWhere">条件</param>
        /// <param name="filedOrder">排序</param>
        /// <param name="recordCount">返回数据总数</param>
        /// <returns>DataTable</returns>
        public DataSet ArticleList(string channel_name, int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select * from " + databaseprefix + DTKeys.TABLE_CHANNEL_ARTICLE + channel_name);
            if ("" != strWhere.Trim())
            {
                strSql.Append(" where " + strWhere);
            }
            recordCount = ReadDataBase.ExecuteScalar <int>(PagingHelper.CreateCountingSql(strSql.ToString()));
            return(ReadDataBase.QueryFillDataSet(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 8
0
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select *,(select count(0) from " + databaseprefix + "article_tags_relation where tag_id=" + databaseprefix + "article_tags.id) as count FROM " + databaseprefix + "article_tags");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            recordCount = ReadDataBase.ExecuteScalar <int>(PagingHelper.CreateCountingSql(strSql.ToString()));
            return(ReadDataBase.QueryFillDataSet(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 9
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select * from sf_businessapp_settlement");
            if (!string.IsNullOrEmpty(strWhere.Trim()))
            {
                strSql.Append(" WHERE " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 10
0
        /*
         * /// <summary>
         * /// 分页获取数据列表
         * /// </summary>
         * public DataSet GetList(int PageSize,int PageIndex,string strWhere)
         * {
         *  SqlParameter[] parameters = {
         *          new SqlParameter("@tblName", SqlDbType.VarChar, 255),
         *          new SqlParameter("@fldName", SqlDbType.VarChar, 255),
         *          new SqlParameter("@PageSize", SqlDbType.Int),
         *          new SqlParameter("@PageIndex", SqlDbType.Int),
         *          new SqlParameter("@IsReCount", SqlDbType.Bit),
         *          new SqlParameter("@OrderType", SqlDbType.Bit),
         *          new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
         *          };
         *  parameters[0].Value = "wx_crm_users";
         *  parameters[1].Value = "id";
         *  parameters[2].Value = PageSize;
         *  parameters[3].Value = PageIndex;
         *  parameters[4].Value = 0;
         *  parameters[5].Value = 0;
         *  parameters[6].Value = strWhere;
         *  return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
         * }*/

        #endregion  BasicMethod
        #region  ExtensionMethod

        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select u.*,g.[name] as gName,t.tag from wx_crm_users u left join wx_crm_group g on u.groupid=g.id left join wx_crm_users_tag t on u.openid=t.openid ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 11
0
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public List <Model.orders> GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select * FROM " + databaseprefix + "orders");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            recordCount = ReadDataBase.ExecuteScalar <int>(PagingHelper.CreateCountingSql(strSql.ToString()));
            return(GetModelList(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 12
0
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        /// <param name="pageSize">分页数量</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="strWhere">条件</param>
        /// <param name="filedOrder">排序</param>
        /// <param name="recordCount">返回数据总数</param>
        /// <returns>DataTable</returns>
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select * from [" + databaseprefix + "plugin_qqonline]");
            if ("" != strWhere.Trim())
            {
                strSql.Append(" where " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 13
0
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select id,actId,uName,uTel,openid,jxName,jxIndex,jpName,createDate,hasLingQu,sn ");
            strSql.Append(" FROM wx_zjdAwardUser ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 14
0
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("SELECT A.id,A.role_id,A.role_type,A.user_name,A.real_name,A.telephone,A.email,A.is_lock,A.add_time,B.dept_name ");
            strSql.Append("FROM dbo.gm_dt_sysuser A LEFT JOIN dbo.gm_dt_dept B ON A.dept_id=B.id ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 15
0
        /// <summary>
        /// 获得数据列表,取最新版本数据
        /// </summary>
        public DataSet GetListVersion(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select * ");
            strSql.Append(" FROM tabExperienceWork as a  where  version=(select max(b.version)  from tabExperienceWork  as b  where a.RandomNo =  b.RandomNo) ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" and " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 16
0
        /*
         * /// <summary>
         * /// 分页获取数据列表
         * /// </summary>
         * public DataSet GetList(int PageSize,int PageIndex,string strWhere)
         * {
         *  SqlParameter[] parameters = {
         *          new SqlParameter("@tblName", SqlDbType.VarChar, 255),
         *          new SqlParameter("@fldName", SqlDbType.VarChar, 255),
         *          new SqlParameter("@PageSize", SqlDbType.Int),
         *          new SqlParameter("@PageIndex", SqlDbType.Int),
         *          new SqlParameter("@IsReCount", SqlDbType.Bit),
         *          new SqlParameter("@OrderType", SqlDbType.Bit),
         *          new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
         *          };
         *  parameters[0].Value = "wx_diancai_blacklist";
         *  parameters[1].Value = "id";
         *  parameters[2].Value = PageSize;
         *  parameters[3].Value = PageIndex;
         *  parameters[4].Value = 0;
         *  parameters[5].Value = 0;
         *  parameters[6].Value = strWhere;
         *  return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
         * }*/

        #endregion  BasicMethod
        #region  ExtensionMethod
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select id,openid,blackName,blackDate,createDate,shopid ");
            strSql.Append(" FROM wx_diancai_blacklist ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 17
0
        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="pageSize">每页数据条数</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="strWhere">查询条件</param>
        /// <param name="filedOrder">排序语句</param>
        /// <param name="recordCount">记录总数</param>
        /// <returns></returns>
        public DataTable GetListByView(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select   c.*,d.dName,r.RName as OneRName,tr.RName as TwoRName,td.dName as BankNameDic   FROM [T_Customer] c left join [T_Dictionary] d on c.CLevel=d.ID left join T_Regional r on c.OneRegional=r.ID left join T_Regional tr on c.TwoRegional=tr.ID  left join T_Dictionary td on c.BankName=td.ID");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where 1=1 " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));

            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)).Tables[0]);
        }
Esempio n. 18
0
        /*
         * /// <summary>
         * /// 分页获取数据列表
         * /// </summary>
         * public DataSet GetList(int PageSize,int PageIndex,string strWhere)
         * {
         *  SqlParameter[] parameters = {
         *          new SqlParameter("@tblName", SqlDbType.VarChar, 255),
         *          new SqlParameter("@fldName", SqlDbType.VarChar, 255),
         *          new SqlParameter("@PageSize", SqlDbType.Int),
         *          new SqlParameter("@PageIndex", SqlDbType.Int),
         *          new SqlParameter("@IsReCount", SqlDbType.Bit),
         *          new SqlParameter("@OrderType", SqlDbType.Bit),
         *          new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
         *          };
         *  parameters[0].Value = "wx_qp_film";
         *  parameters[1].Value = "id";
         *  parameters[2].Value = PageSize;
         *  parameters[3].Value = PageIndex;
         *  parameters[4].Value = 0;
         *  parameters[5].Value = 0;
         *  parameters[6].Value = strWhere;
         *  return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
         * }*/

        #endregion  BasicMethod
        #region  ExtensionMethod

        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetList(int category_id, int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append(" select id, bId, fName, fBegin, fEnd, fStatus, createDate, sort_id from wx_qp_film p");
            strSql.Append(" where " + strWhere);
            if (category_id > 0)
            {
                strSql.Append(" and bId=" + category_id);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
        /*
         * /// <summary>
         * /// 分页获取数据列表
         * /// </summary>
         * public DataSet GetList(int PageSize,int PageIndex,string strWhere)
         * {
         *      SqlParameter[] parameters = {
         *                      new SqlParameter("@tblName", SqlDbType.VarChar, 255),
         *                      new SqlParameter("@fldName", SqlDbType.VarChar, 255),
         *                      new SqlParameter("@PageSize", SqlDbType.Int),
         *                      new SqlParameter("@PageIndex", SqlDbType.Int),
         *                      new SqlParameter("@IsReCount", SqlDbType.Bit),
         *                      new SqlParameter("@OrderType", SqlDbType.Bit),
         *                      new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
         *                      };
         *      parameters[0].Value = "wx_diancai_dianyuan";
         *      parameters[1].Value = "id";
         *      parameters[2].Value = PageSize;
         *      parameters[3].Value = PageIndex;
         *      parameters[4].Value = 0;
         *      parameters[5].Value = 0;
         *      parameters[6].Value = strWhere;
         *      return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
         * }*/

        #endregion  BasicMethod
        #region  ExtensionMethod
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select id,shopid,createDate,bianhao,dianyuanName,dianyuanTel,userName,pwd,userStatus,fendian,beginTime,endTime,remark ");
            strSql.Append(" FROM wx_diancai_dianyuan ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 20
0
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select g.Id as Id, g.Name as Name, s.Name as StoreModeName, h.Name as HandlingModeName, u.Name as UnitName,c.Name as CustomerName FROM Goods as g, StoreMode as s, HandlingMode as h, Unit as u, Customer as c ");
            strSql.Append("where g.StoreModeId = s.Id and g.HandlingModeId = h.Id and g.UnitId = u.Id and g.CustomerId = c.Id ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 21
0
        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="pageSize">每页数据条数</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="strWhere">查询条件</param>
        /// <param name="filedOrder">排序语句</param>
        /// <param name="recordCount">记录总数</param>
        /// <returns></returns>
        public DataTable GetTableByPage(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select m.ID,m.BNum,(select dName from T_Dictionary where dType='D02' and dNum=m.WareHouse) AS WareHouse,m.CustomerName,m.CustomerID,m.CardNumber,m.Mobile,m.Tel,(select dName from T_Dictionary where dType='D03' and dNum=m.BankName) as BankName,m.BankAccount,m.AccountName,m.ProductName,m.ProjectId,m.ProductStandard,m.ProductStandardId,m.Unit,m.GrossWeight,m.Tare,m.NetWeight,m.Price,m.Amount,m.AddPerson,convert(varchar(8),m.AddTime,11) as AddTime,m.LoanMan,m.LoanDate,m.LoanMark,m.LoanType from [T_Bill] as m");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where 1=1 " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));

            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)).Tables[0]);
        }
Esempio n. 22
0
        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="pageSize">每页数据条数</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="strWhere">查询条件</param>
        /// <param name="filedOrder">排序语句</param>
        /// <param name="recordCount">记录总数</param>
        /// <returns></returns>
        public List <Model.T_SytemSet> GetListByPage(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select   m.*  FROM [T_SytemSet] m");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where 1=1 " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));

            return(Model.T_SytemSet.FillList(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)).Tables[0]));
        }
Esempio n. 23
0
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select A.Id AS Id, A.Status, A.StoreInOrderId, A.StoredOutTime, A.TotalMoney, A.UnitPrice, A.InvoiceMoney, A.Admin, A.Count, A.BeginChargingTime, A.EndChargingTime, A.UnitPriceDetails, A.Remark AS Remark, C.Name AS CustomerName, B.AccountNumber FROM StoreOutOrder A, StoreInOrder B, Customer C ");
            strSql.Append("where A.StoreInOrderId = B.Id and A.CustomerId = C.Id ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 24
0
    public DataSet GetList_t(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
    {
        StringBuilder strSql = new StringBuilder();

        strSql.Append(@"select b.*,a.huiyuan_name as ysp_name from dbo.tbl_tikuan as b
inner join tbl_huiyuan as a on a.huiyuan_id =b.huiyuan_id");
        if (strWhere.Trim() != "")
        {
            strSql.Append(" where " + strWhere);
        }
        recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
        return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
    }
Esempio n. 25
0
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetList(int wid, int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append(" select (select top 1  title from dt_payment p where o.payment_id =p.pTypeId and p.wid=" + wid + ") as paymentName , (select  top 1 title from dt_express e where e.id=o.express_id and e.wid=" + wid + ") as expressName,'' as statusName, o.* from dt_orders o ");
            strSql.Append(" where o.wid=" + wid);
            if (strWhere.Trim() != "")
            {
                strSql.Append("  and  " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 26
0
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append(@"select b.BarCodeCreateRecordID,b.RetrospectCode,b.BoxSum,b.GoodCount,b.Operator,b.State,b.CreateTime,b.Remark,b.DownLoad,m.user_name
FROM BarCodeCreateRecord b with(nolock) join dt_manager m with(nolock) on b.Operator=m.id");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 27
0
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            //strSql.Append("select * FROM gm_dt_job_order_base");
            strSql.Append("SELECT * FROM gm_dt_job_order_base AS a LEFT OUTER JOIN gm_dt_job_order_service_type AS b ON a.job_order_type = b.service_id");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 28
0
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select A.GoodsId, A.Id AS Id, A.StoringTime, A.Admin, B.Name AS GoodsName, C.Name AS CustomerName, C.Id AS CustomerId FROM StoreWaitingGoods A, Goods B, Customer C ");
            strSql.Append("where A.GoodsId = B.Id and b.CustomerId = c.Id ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 29
0
        /*
         * /// <summary>
         * /// 分页获取数据列表
         * /// </summary>
         * public DataSet GetList(int PageSize,int PageIndex,string strWhere)
         * {
         *  SqlParameter[] parameters = {
         *          new SqlParameter("@tblName", SqlDbType.VarChar, 255),
         *          new SqlParameter("@fldName", SqlDbType.VarChar, 255),
         *          new SqlParameter("@PageSize", SqlDbType.Int),
         *          new SqlParameter("@PageIndex", SqlDbType.Int),
         *          new SqlParameter("@IsReCount", SqlDbType.Bit),
         *          new SqlParameter("@OrderType", SqlDbType.Bit),
         *          new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
         *          };
         *  parameters[0].Value = "wx_hb_imggroup";
         *  parameters[1].Value = "id";
         *  parameters[2].Value = PageSize;
         *  parameters[3].Value = PageIndex;
         *  parameters[4].Value = 0;
         *  parameters[5].Value = 0;
         *  parameters[6].Value = strWhere;
         *  return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
         * }*/

        #endregion  BasicMethod
        #region  ExtensionMethod
        /// <summary>
        /// 获得查询分页数据
        /// </summary>
        public DataSet GetList(int category_id, int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append(" select * from wx_hb_imggroup p");
            strSql.Append(" where " + strWhere);
            if (category_id > 0)
            {
                strSql.Append(" and hid =" + category_id);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }
Esempio n. 30
0
        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select A.Id AS Id, A.Status, A.BeginChargingTime, A.Admin, A.ChargingCount, A.AccountNumber, A.InspectionNumber, A.SuttleWeight, A.Remark AS Remark,B.Name AS CustomerName FROM StoreInOrder A, Customer B ");
            strSql.Append("where A.CustomerId = B.Id ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(strWhere);
            }
            recordCount = Convert.ToInt32(DbHelperSQL.GetSingle(PagingHelper.CreateCountingSql(strSql.ToString())));
            return(DbHelperSQL.Query(PagingHelper.CreatePagingSql(recordCount, pageSize, pageIndex, strSql.ToString(), filedOrder)));
        }