예제 #1
0
 public DoctorAccount(DoctorAccountMemento memento)
 {
     Jmbg        = new Jmbg(memento.Jmbg);
     Name        = memento.Name;
     Surname     = memento.Surname;
     Gender      = memento.Gender;
     DateOfBirth = memento.DateOfBirth;
     Phone       = new PhoneNumber(memento.Phone);
     HomeAddress = new Address(memento.HomeAddress);
     City        = new City(memento.City);
     Email       = new Email(memento.Email);
     Password    = new Password(memento.Password);
     Specialties = memento.Specialties.Select(s => new Specialty(s));
     Validate();
 }
예제 #2
0
 public UserAccount(UserAccountMemento memento)
 {
     Jmbg        = new Jmbg(memento.Jmbg);
     Name        = memento.Name;
     Surname     = memento.Surname;
     Gender      = memento.Gender;
     DateOfBirth = memento.DateOfBirth;
     Phone       = new PhoneNumber(memento.Phone);
     HomeAddress = new Address(memento.HomeAddress);
     City        = new City(memento.City);
     Email       = new Email(memento.Email);
     Password    = new Password(memento.Password);
     UserType    = memento.UserType;
     Validate();
 }
 public PatientAccount(PatientAccountMemento memento)
 {
     Jmbg             = new Jmbg(memento.Jmbg);
     Name             = memento.Name;
     Surname          = memento.Surname;
     Gender           = memento.Gender;
     DateOfBirth      = memento.DateOfBirth;
     Phone            = new PhoneNumber(memento.Phone);
     HomeAddress      = new Address(memento.HomeAddress);
     City             = new City(memento.City);
     Email            = new Email(memento.Email);
     Password         = new Password(memento.Password);
     IsActivated      = memento.IsActivated;
     IsBlocked        = memento.IsBlocked;
     ImageName        = memento.ImageName;
     MaliciousActions = memento.MaliciousActions.Select(a => new MaliciousAction(a));
     Validate();
 }