예제 #1
0
        /// <summary>
        /// 构造查询条件
        /// </summary>
        /// <param name="clienterBalanceRecordPm">参数实体</param>
        /// <returns></returns>
        public static string BindQueryCriteria(ClienterBalanceRecordPM clienterBalanceRecordPm)
        {
            var stringBuilder = new StringBuilder(" where 1=1 ");

            if (clienterBalanceRecordPm == null)
            {
                return(stringBuilder.ToString());
            }
            //TODO:在此加入查询条件构建代码

            return(stringBuilder.ToString());
        }
예제 #2
0
        /// <summary>
        /// 查询对象
        /// </summary>
        /// <param name="clienterBalanceRecordPm">参数实体</param>
        /// <returns></returns>
        public IList <ClienterBalanceRecord> Query(ClienterBalanceRecordPM clienterBalanceRecordPm)
        {
            string condition = BindQueryCriteria(clienterBalanceRecordPm);
            IList <ClienterBalanceRecord> models = new List <ClienterBalanceRecord>();
            string    querysql = @"
select  Id,ClienterId,Amount,Status,Balance,RecordType,Operator,OperateTime,RelationNo,Remark
from  ClienterBalanceRecord (nolock)" + condition;
            DataTable dt       = DataTableHelper.GetTable(DbHelper.ExecuteDataset(SuperMan_Read, querysql));

            if (DataTableHelper.CheckDt(dt))
            {
                models = DataTableHelper.ConvertDataTableList <ClienterBalanceRecord>(dt);
            }
            return(models);
        }
 /// <summary>
 /// 查询方法
 /// </summary>
 /// <param name="clienterBalanceRecordPm">参数实体</param>
 /// <returns></returns>
 public IList <ClienterBalanceRecord> Query(ClienterBalanceRecordPM clienterBalanceRecordPm)
 {
     return(_clienterBalanceRecordDao.Query(clienterBalanceRecordPm));
 }