예제 #1
0
 public void MapToOm(School.Entities.ApplicationOrganization.ApplicationUser user)
 {
     user.Id            = this.ID.ToString();
     user.Name          = this.Name;
     user.UserName      = this.UserName;
     user.Description   = this.Description;
     user.SortCode      = this.SortCode;
     user.MobileNumber  = this.MobileNumber;
     user.Sex           = this.Sex;
     user.UserAddress   = this.UserAddress;
     user.Avatar        = this.AvatarPath;
     user.QQ            = this.QQ;
     user.School        = this.School;
     user.SchoolAddress = this.SchoolAddress;
     user.Person        = this.Persons;
 }
예제 #2
0
 /// <summary>
 /// 有参构造函数
 /// </summary>
 /// <param name="user"></param>
 public ApplicationUserVM(School.Entities.ApplicationOrganization.ApplicationUser user)
 {
     this.ID               = Guid.Parse(user.Id);
     this.Name             = user.Name;
     this.UserName         = user.UserName;
     this.Description      = user.Description;
     this.SortCode         = user.SortCode;
     this.MobileNumber     = user.MobileNumber;
     this.Sex              = user.Sex;
     this.QQ               = user.QQ;
     this.UserAddress      = user.UserAddress;
     this.AvatarPath       = user.Avatar;
     this.RegisterTime     = user.RegisterTime;
     this.School           = user.School;
     this.SchoolAddress    = user.SchoolAddress;
     this.Persons          = user.Person;
     this.Birthday         = Convert.ToDateTime(user.Birthday.ToString("yyyy-MM-dd"));
     this.TwoFactorEnabled = user.TwoFactorEnabled;
 }