Exemplo n.º 1
0
        public UserProDTO ToDTO(UserProEntity User)
        {
            MemberService Member  = new MemberService();
            LevelService  Level   = new   LevelService();
            UserProDTO    UserPro = new UserProDTO();

            UserPro.ID            = User.ID;
            UserPro.UserID        = User.UserID;
            UserPro.LastLevel     = User.LastLevel;
            UserPro.EndLevel      = User.EndLevel;
            UserPro.ProMoney      = User.ProMoney;
            UserPro.FlagDate      = User.FlagDate;
            UserPro.Remark        = User.Remark;
            UserPro.CreateTime    = User.CreateTime;
            UserPro.Flag          = User.Flag;
            UserPro.Pro001        = User.Pro001;
            UserPro.UserCode      = "";
            UserPro.TrueName      = "";
            UserPro.EndLevelName  = "";
            UserPro.LastLevelName = "";
            if (Member.ToUser(int.Parse(User.UserID.ToString())).MemberList != null)
            {
                UserPro.UserCode = Member.ToUser(int.Parse(User.UserID.ToString())).MemberList.First().UserCode;
                UserPro.TrueName = Member.ToUser(int.Parse(User.UserID.ToString())).MemberList.First().TrueName;
            }
            if (Level.GetLevelName(UserPro.LastLevel) != null)
            {
                UserPro.LastLevelName = Level.GetLevelName(UserPro.LastLevel).LevelName;
            }
            if (Level.GetLevelName(UserPro.EndLevel) != null)
            {
                UserPro.EndLevelName = Level.GetLevelName(UserPro.EndLevel).LevelName;
            }
            return(UserPro);
        }
Exemplo n.º 2
0
        public MemberListDTO ToDTO(UserEntity User)
        {
            LevelService  Level      = new LevelService();
            MemberListDTO MemberList = new MemberListDTO();

            MemberList.ID            = User.ID;
            MemberList.Emoney        = User.Emoney;
            MemberList.UserCode      = User.UserCode;
            MemberList.LevelID       = User.LevelID;
            MemberList.RecommendID   = User.RecommendID;
            MemberList.RecommendCode = User.RecommendCode;
            MemberList.ParentID      = User.ParentID;
            MemberList.IsOpend       = User.IsOpend;
            MemberList.TrueName      = User.TrueName;
            MemberList.PhoneNum      = User.PhoneNum;
            MemberList.CreateTime    = User.CreateTime;
            MemberList.IsLock        = User.IsLock;
            MemberList.OpenTime      = User.OpenTime;
            MemberList.LevelName     = "";
            if (Level.GetLevelName(MemberList.LevelID) != null)
            {
                MemberList.LevelName = Level.GetLevelName(MemberList.LevelID).LevelName;
            }

            MemberList.BankAccount     = User.BankAccount;
            MemberList.BankAccountUser = User.BankAccountUser;
            MemberList.BankName        = User.BankName;
            MemberList.BankBranch      = User.BankBranch;
            MemberList.BankInProvince  = User.BankInProvince;
            MemberList.Location        = User.Location;
            MemberList.RegMoney        = User.RegMoney;
            MemberList.ParentCode      = User.ParentCode;
            MemberList.IdenCode        = User.IdenCode;
            MemberList.Password        = User.Password;
            MemberList.ThreePassword   = User.ThreePassword;
            MemberList.SecondPassword  = User.SecondPassword;
            return(MemberList);
        }