Example #1
0
 public MemberViewModel(User user) {
     this.Id = user.Id;
     this.RegisterName = user.RegisterName;
     this.RealName = user.RealName;
     this.NickName = user.NickName;
     this.ContentGroupId = user.ContentGroupId;
     this.AuthorityCategory = user.AuthorityCategory;
     this.Gender = user.Gender;
     this.PersonalDescription = user.PersonalDescription;
 }
 public string getAuthorityCategory(EnumUserCategory category) { 
     string result = "";
     switch(category){
         case EnumUserCategory.Visitor:
             result = "游客";
             break;
         case EnumUserCategory.Membership:
             result = "会员";
             break;
         case EnumUserCategory.Administrator:
             result = "管理员";
             break;
         case EnumUserCategory.Superman:
             result = "超级管理员";
             break;
     }
     return result;
 }