Example #1
0
        /// <summary>
        /// 获取退票统计合计信息
        /// </summary>
        /// <param name="refundAmount">退回金额合计</param>
        /// <param name="model">查询实体</param>
        public void GetSumRefundStatistic(ref decimal refundAmount, Model.StatisticStructure.MQueryRefundStatistic model)
        {
            refundAmount = 0M;
            if (model == null || model.CompanyId <= 0)
            {
                return;
            }

            dal.GetSumRefundStatistic(ref refundAmount, model, HaveUserIds);
        }
Example #2
0
        /// <summary>
        /// 获取退票统计合计信息
        /// </summary>
        /// <param name="refundAmount">退回金额合计</param>
        /// <param name="model">查询实体</param>
        /// <param name="us">用户信息集合</param>
        public void GetSumRefundStatistic(ref decimal refundAmount, Model.StatisticStructure.MQueryRefundStatistic model, string us)
        {
            refundAmount = 0M;
            var strSql = new StringBuilder();

            strSql.Append(" select sum(RefundAmount) from View_RefundStatistics ");
            string strWhere = GetSqlWhereByQueryModel(model, us);

            if (!string.IsNullOrEmpty(strWhere))
            {
                strSql.AppendFormat(" where {0} ", strWhere);
            }

            DbCommand dc = _db.GetSqlStringCommand(strSql.ToString());

            using (IDataReader dr = DbHelper.ExecuteReader(dc, _db))
            {
                if (dr.Read())
                {
                    refundAmount = dr.IsDBNull(0) ? 0M : dr.GetDecimal(0);
                }
            }
        }
Example #3
0
        /// <summary>
        /// 获取退票统计
        /// </summary>
        /// <param name="PageSize">每页条数</param>
        /// <param name="PageIndex">当前页数</param>
        /// <param name="RecordCount">总记录数</param>
        /// <param name="model">查询实体</param>
        /// <returns></returns>
        public IList <Model.StatisticStructure.MRefundStatistic> GetRefundStatistic(int PageSize, int PageIndex
                                                                                    , ref int RecordCount, Model.StatisticStructure.MQueryRefundStatistic model)
        {
            if (model == null || model.CompanyId <= 0)
            {
                return(null);
            }

            return(dal.GetRefundStatistic(PageSize, PageIndex, ref RecordCount, model, HaveUserIds));
        }