示例#1
0
        public List <OCAgentRebate> QueryLowerAgentListByParentId(string parentId)
        {
            Session.Clear();

            string strSql = "select r.CreateTime,isnull(r.GameCode,'')GameCode,isnull(r.GameType,'')GameType,r.Id,isnull(r.Rebate,0)Rebate,isnull(r.SubUserRebate,0)SubUserRebate,u.UserId from C_User_Register u left join P_OCAgent_Rebate r on u.UserId=r.UserId where u.ParentPath like '%" + parentId + "%'";
            var    query  = Session.CreateSQLQuery(strSql).List();
            List <OCAgentRebate> ocList = new List <OCAgentRebate>();

            if (query != null && query.Count > 0)
            {
                foreach (var item in query)
                {
                    var           array  = item as object[];
                    OCAgentRebate entity = new OCAgentRebate();
                    entity.CreateTime    = Convert.ToDateTime(array[0]);
                    entity.GameCode      = Convert.ToString(array[1]);
                    entity.GameType      = Convert.ToString(array[2]);
                    entity.Id            = Convert.ToInt64(array[3]);
                    entity.Rebate        = Convert.ToDecimal(array[4]);
                    entity.SubUserRebate = Convert.ToDecimal(array[6]);
                    entity.UserId        = Convert.ToString(array[6]);
                    ocList.Add(entity);
                }
            }

            return(ocList);
        }
示例#2
0
 public void UpdateOCAgentRebate(OCAgentRebate entity)
 {
     this.Update(entity);
 }
示例#3
0
 public void AddOCAgentRebate(OCAgentRebate entity)
 {
     this.Add(entity);
 }