/// <summary>
 /// 通過查詢條件獲取PromoShareConditionType列表
 /// </summary>
 /// <param name="query">查詢條件</param>
 /// <param name="totalCount">數據總條數</param>
 /// <returns>PromoShareConditionType列表</returns>
 public List<PromoShareConditionTypeQuery> GetList(PromoShareConditionTypeQuery query, out int totalCount)
 {
     try
     {
         return _psctDao.GetList(query,out totalCount);
     }
     catch (Exception ex)
     {
         throw new Exception("PromoShareConditionTypeMgr-->GetList-->" + ex.Message, ex);
     }
 }
 /// <summary>
 /// 通過查詢條件獲取PromoShareConditionType列表
 /// </summary>
 /// <param name="query">查詢條件</param>
 /// <param name="totalCount">數據總條數</param>
 /// <returns>PromoShareConditionType列表</returns>
 public List<PromoShareConditionTypeQuery> GetList(PromoShareConditionTypeQuery query, out int totalCount)
 {
     List<PromoShareConditionTypeQuery> list = new List<PromoShareConditionTypeQuery>();
     StringBuilder sbSql = new StringBuilder();
     StringBuilder sbSqlCondition = new StringBuilder();
     totalCount = 0;
     sbSql.Append("SELECT condition_type_id,condition_type_desc,condition_type_name,condition_type_status ");
     sbSqlCondition.Append(" FROM promo_share_condition_type WHERE 1=1 ");
     if (query.condition_type_id != 0)
     {
         sbSqlCondition.AppendFormat(" and condition_type_id in({0}) ", query.condition_type_id);
     }
     if (!string.IsNullOrEmpty(query.condition_type_desc))
     {
         sbSqlCondition.AppendFormat(" and condition_type_desc like '%{0}%' ", query.condition_type_desc);
     }
     if (!string.IsNullOrEmpty(query.condition_type_name))
     {
         sbSqlCondition.AppendFormat(" and condition_type_name like '%{0}%' ", query.condition_type_name);
     }
     try
     {
         if (query.IsPage)
         {
             DataTable dt = _access.getDataTable("select count(*) as totalCount " + sbSqlCondition.ToString());
             if (dt != null && dt.Rows.Count > 0)
             {
                 totalCount = Convert.ToInt32(dt.Rows[0]["totalCount"]);
             }
         }
         sbSqlCondition.AppendFormat(" limit {0},{1} ", query.Start, query.Limit);
         list = _access.getDataTableForObj<PromoShareConditionTypeQuery>(sbSql.Append(sbSqlCondition).ToString());
     }
     catch (Exception ex)
     {
         throw new Exception("PromoShareConditionTypeDao-->GetList-->" + ex.Message + sbSql.Append(sbSqlCondition).ToString(), ex);
     }
     return list;
 }