Beispiel #1
0
        public List <OCAagentDetailInfo> QueryAgentDetail(string agentId, string gameCode, DateTime starTime, DateTime endTime, int pageIndex, int pageSize, out int totalCount, out decimal totalBuyMoney
                                                          , out decimal totalBounsMoney, out decimal totalRedBagAwardsMoney, out decimal totalBonusAwardsMoney, out decimal totalFillMoney, out decimal totalWithdrawalsMoney)
        {
            Session.Clear();
            starTime = starTime.Date;
            endTime  = endTime.AddDays(1).Date;
            // 通过数据库存储过程进行查询
            var query = CreateOutputQuery(Session.GetNamedQuery("P_Agent_QueryAgentDetail"))
                        .AddInParameter("agentId", agentId)
                        .AddInParameter("gameCode", gameCode)
                        .AddInParameter("starTime", starTime)
                        .AddInParameter("endTime", endTime)
                        .AddInParameter("pageIndex", pageIndex)
                        .AddInParameter("pageSize", pageSize);
            var ds = query.GetDataSet();

            totalFillMoney = ds.Tables[0].Rows[0]["TotalFillMoney"].ToString() == string.Empty ? 0M : (decimal)ds.Tables[0].Rows[0]["TotalFillMoney"];
            totalBuyMoney  = ds.Tables[1].Rows[0]["TotalBuyMoney"].ToString() == string.Empty ? 0M : (decimal)ds.Tables[1].Rows[0]["TotalBuyMoney"];

            totalBounsMoney        = ds.Tables[1].Rows[0]["TotalBounsMoney"].ToString() == string.Empty ? 0M : (decimal)ds.Tables[1].Rows[0]["TotalBounsMoney"];
            totalRedBagAwardsMoney = ds.Tables[1].Rows[0]["TotalRedBagAwardsMoney"].ToString() == string.Empty ? 0M : (decimal)ds.Tables[1].Rows[0]["TotalRedBagAwardsMoney"];
            totalBonusAwardsMoney  = ds.Tables[1].Rows[0]["TotalBonusAwardsMoney"].ToString() == string.Empty ? 0M : (decimal)ds.Tables[1].Rows[0]["TotalBonusAwardsMoney"];

            totalCount            = ds.Tables[2].Rows[0]["TotalCount"].ToString() == string.Empty ? 0 : (int)ds.Tables[2].Rows[0]["TotalCount"];
            totalWithdrawalsMoney = ds.Tables[4].Rows[0]["TotalWithdrawalsMoney"].ToString() == string.Empty ? 0M : (decimal)ds.Tables[4].Rows[0]["TotalWithdrawalsMoney"];
            return(ORMHelper.DataTableToInfoList <OCAagentDetailInfo>(ds.Tables[3]).ToList());
        }