public List <P_OCAgent_Rebate> QueryLowerAgentListByParentId(string parentId)
        {
            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  = DB.CreateSQLQuery(strSql).List <object>();
            List <P_OCAgent_Rebate> ocList = new List <P_OCAgent_Rebate>();

            if (query != null && query.Count > 0)
            {
                foreach (var item in query)
                {
                    var array = item as object[];
                    P_OCAgent_Rebate entity = new P_OCAgent_Rebate();
                    entity.CreateTime    = Convert.ToDateTime(array[0]);
                    entity.GameCode      = Convert.ToString(array[1]);
                    entity.GameType      = Convert.ToString(array[2]);
                    entity.Id            = Convert.ToInt32(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);
        }
 /// <summary>
 /// 修改用户返点
 /// </summary>
 /// <param name="rebate"></param>
 public void UpdateOCAgentRebate(P_OCAgent_Rebate rebate)
 {
     DB.GetDal <P_OCAgent_Rebate>().Update(rebate);
 }
 /// <summary>
 /// 新增用户返点配置
 /// </summary>
 public void AddOCAgentRebate(P_OCAgent_Rebate OCAgentRebate)
 {
     DB.GetDal <P_OCAgent_Rebate>().Add(OCAgentRebate);
 }