public ExternalTrainee(Trainee trainee)
 {
     ID                = trainee.ID;
     LastName          = trainee.LastName;
     FirstName         = trainee.FirstName;
     DateOfBirth       = trainee.DateOfBirth;
     Gender            = trainee.Gender;
     Phone             = trainee.Phone;
     Address           = trainee.Address;
     CarType           = trainee.CarType;
     GearBoxType       = trainee.GearBoxType;
     DrivingSchoolName = trainee.DrivingSchoolName;
     TeacherName       = trainee.TeacherName;
     NumberOfLessons   = trainee.NumberOfLessons;
 }
Ejemplo n.º 2
0
 public Trainee(string id, Trainee other) : base(id)//needed for clone the trainee from binding
 {
     LastName             = other.LastName;
     FirstName            = other.FirstName;
     SchoolName           = other.SchoolName;
     TeacherName          = other.TeacherName;
     PhoneNumber          = other.PhoneNumber;
     Gender               = other.Gender;
     Address              = new Address(other.Address);
     DateOfBirth          = other.DateOfBirth;
     CurrCarType          = other.CurrCarType;
     NumOfFinishedLessons = other.NumOfFinishedLessons;
     ExistingLicenses     = new List <CarTypeEnum>(other.ExistingLicenses);
     statistics           = other.statistics;
     testList             = other.TestList;
 }
Ejemplo n.º 3
0
 public Trainee(Trainee sourceTrainee)
 {
     ID                = sourceTrainee.ID;
     Address           = sourceTrainee.Address;
     CarType           = sourceTrainee.CarType;
     DateOfBirth       = sourceTrainee.DateOfBirth;
     DrivingSchoolName = sourceTrainee.DrivingSchoolName;
     FirstName         = sourceTrainee.FirstName;
     GearBoxType       = sourceTrainee.GearBoxType;
     Gender            = sourceTrainee.Gender;
     LastName          = sourceTrainee.LastName;
     NumberOfLessons   = sourceTrainee.NumberOfLessons;
     Phone             = sourceTrainee.Phone;
     TeacherName       = sourceTrainee.TeacherName;
     Tests             = new List <TraineeTest>(sourceTrainee.Tests);
 }
Ejemplo n.º 4
0
 public static DO.Trainee CreateDoTrainee(BO.Trainee other)
 {
     DO.Trainee trainee = new DO.Trainee(other.Id);
     trainee.LastName             = other.LastName;
     trainee.FirstName            = other.FirstName;
     trainee.SchoolName           = other.SchoolName;
     trainee.TeacherName          = other.TeacherName;
     trainee.PhoneNumber          = other.PhoneNumber;
     trainee.Gender               = (DO.GenderEnum)other.Gender;
     trainee.Address              = new DO.Address(other.Address.City, other.Address.Street, other.Address.BuildingNumber);
     trainee.DateOfBirth          = other.DateOfBirth;
     trainee.CurrCarType          = (DO.CarTypeEnum)other.CurrCarType;
     trainee.NumOfFinishedLessons = other.NumOfFinishedLessons;
     //trainee.NumOfTests = other.NumOfTests;
     //trainee.IsAlreadyDidTest = other.IsAlreadyDidTest;
     return(trainee);
 }
Ejemplo n.º 5
0
 public Trainee(Trainee other) : base(other.Id)
 {
     LastName             = other.LastName;
     FirstName            = other.FirstName;
     SchoolName           = other.SchoolName;
     TeacherName          = other.TeacherName;
     PhoneNumber          = other.PhoneNumber;
     Gender               = other.Gender;
     Address              = new Address(other.Address);
     DateOfBirth          = other.DateOfBirth;
     LastTest             = new DateTime(other.LastTest.Ticks);
     CurrCarType          = other.CurrCarType;
     CurrGearType         = other.CurrGearType;
     NumOfFinishedLessons = other.NumOfFinishedLessons;
     NumOfTests           = other.NumOfTests;
     IsAlreadyDidTest     = other.IsAlreadyDidTest;
     ExistingLicenses     = new List <CarTypeEnum>(other.ExistingLicenses);
 }
Ejemplo n.º 6
0
 public AskedDateIsNotAvailableException(DateTime alternativeDate, int alternativeTime, Trainee trainee, Address exitAddress, Tester found, string message = "") : base(message)
 {
     AlternativeDate = alternativeDate;
     AlternativeTime = alternativeTime;
     Trainee         = trainee;
     ExitAddress     = exitAddress;
     FoundTester     = found;
 }