Beispiel #1
0
 public UserQueryInfoCollection QueryUserList_AdminCPS(DateTime regFrom, DateTime regTo, string keyType, string keyValue, bool?isEnable, bool?isFillMoney, bool?isAgent
                                                       , string commonBlance, string bonusBlance, string freezeBlance, string vipRange, string comeFrom, string agentId, int ocAgentCategory, int pageIndex, int pageSize, string strOrderBy)
 {
     using (var manager = new LoginLocalManager())
     {
         int     totalCount;
         decimal totalFillMoneyBalance;
         decimal totalBonusBalance;
         decimal totalCommissionBalance;
         decimal totalExpertsBalance;
         decimal totalFreezeBalance;
         decimal totalRedBagBalance;
         decimal totalCPSBalance;
         int     totalDouDou;
         var     list = manager.QueryUserList_AdminCPS(regFrom, regTo, keyType, keyValue, isEnable, isFillMoney, isAgent, commonBlance, bonusBlance, freezeBlance, vipRange, comeFrom, agentId, ocAgentCategory, pageIndex, pageSize,
                                                       out totalCount, out totalFillMoneyBalance, out totalBonusBalance, out totalCommissionBalance, out totalExpertsBalance, out totalFreezeBalance, out totalRedBagBalance, out totalDouDou, out totalCPSBalance, strOrderBy);
         var collection = new UserQueryInfoCollection
         {
             TotalCount             = totalCount,
             TotalFillMoneyBalance  = totalFillMoneyBalance,
             TotalBonusBalance      = totalBonusBalance,
             TotalCommissionBalance = totalCommissionBalance,
             TotalExpertsBalance    = totalExpertsBalance,
             TotalFreezeBalance     = totalFreezeBalance,
             TotalRedBagBalance     = totalRedBagBalance,
             TotalDouDou            = totalDouDou,
             TotalCPSBalance        = totalCPSBalance
         };
         collection.LoadList(list);
         return(collection);
     }
 }
        public UserQueryInfoCollection QueryAgentLowerUserList(string agentId, int pageIndex, int pageSize)
        {
            Session.Clear();
            UserQueryInfoCollection collection = new UserQueryInfoCollection();

            collection.TotalCount = 0;
            //string strSql = "select u.UserId,u.DisplayName,isnull(r.RealName,'')RealName,isnull(m.Mobile,'')Mobile,isnull(u.RegisterIp,'')RegisterIp,u.CreateTime,isnull(u.AgentId,'')AgentId,isnull(b.CommissionBalance,0)CommissionBalance,isnull(b.BonusBalance,0)BonusBalance,isnull(b.FreezeBalance,0)FreezeBalance from C_User_Register u left join E_Authentication_RealName r on u.UserId=r.UserId left join E_Authentication_Mobile m on r.UserId=m.UserId left join C_User_Balance b on u.UserId=b.UserId where u.ParentPath like '%" + agentId + "%'";
            string strSql = "select u.UserId,u.DisplayName,isnull(r.RealName,'')RealName,isnull(m.Mobile,'')Mobile,isnull(u.RegisterIp,'')RegisterIp,u.CreateTime,isnull(u.AgentId,'')AgentId,isnull(b.CommissionBalance,0)CommissionBalance,isnull(b.BonusBalance,0)BonusBalance,isnull(b.FreezeBalance,0)FreezeBalance,isnull(b.FillMoneyBalance,0)FillMoneyBalance from C_User_Register u left join E_Authentication_RealName r on u.UserId=r.UserId left join E_Authentication_Mobile m on r.UserId=m.UserId left join C_User_Balance b on u.UserId=b.UserId where u.AgentId=:agentId";
            var    result = Session.CreateSQLQuery(strSql).SetString("agentId", agentId).List();

            if (result != null)
            {
                collection.TotalCount = result.Count;
                foreach (var item in result)
                {
                    var           array = item as object[];
                    UserQueryInfo info  = new UserQueryInfo();
                    info.UserId            = array[0].ToString();
                    info.DisplayName       = array[1].ToString();
                    info.RealName          = array[2].ToString();
                    info.Mobile            = array[3].ToString();
                    info.RegisterIp        = array[4].ToString();
                    info.RegTime           = Convert.ToDateTime(array[5]);
                    info.AgentId           = array[6].ToString();
                    info.CommissionBalance = Convert.ToDecimal(array[7]) + Convert.ToDecimal(array[10]);
                    info.BonusBalance      = Convert.ToDecimal(array[8]);
                    info.FreezeBalance     = Convert.ToDecimal(array[9]);
                    collection.UserList.Add(info);
                }
            }
            collection.UserList = collection.UserList.Skip(pageIndex * pageSize).Take(pageSize).ToList();
            return(collection);
        }
Beispiel #3
0
 public UserQueryInfoCollection QueryAgentUserManagerList(DateTime createFrom, DateTime createTo, string keyType, string keyValue, int pageIndex, int pageSize)
 {
     using (var manager = new AgentManager())
     {
         int totalCount;
         var list       = manager.QueryAgentUserManagerList(createFrom, createTo, keyType, keyValue, pageIndex, pageSize, out totalCount);
         var collection = new UserQueryInfoCollection
         {
             TotalCount = totalCount
         };
         collection.LoadList(list);
         return(collection);
     }
 }