private Person FilledPerson() { var person = new Person(); CrewmemberCollection crewMembers = new CrewmemberCollection(); var personDetail = new PersonalDetail { CitizenshipCountryId = string.Empty, FirstName = string.Empty, LastName = string.Empty, MiddleName = string.Empty, Title = string.Empty, PreferredName = string.Empty, MaritalStatus = string.Empty, Nickname = string.Empty, Occupation = string.Empty, DocumentNumber = string.Empty, Suffix = string.Empty }; crewMembers.Add(new Crewmember { CrewmemberId = string.Empty, CrewmemberTypeId = "1", SecurityPhotoAddress = string.Empty, ChargeId = string.Empty, EmployeeNo = string.Empty, LastEvent = string.Empty, PersonalDetail = personDetail }); person.AssignCrewmembers(crewMembers); GuestCollection guests = new GuestCollection(); var checkInDetail = new CheckInDetail { ApplicationId = string.Empty, LocationId = "1", LocationTypeId = "1", MachineName = "Machine", Station = "station", UserId = "user" }; var cruiseDetail = new GuestCruiseDetail { BeaconId = string.Empty, CheckInDetail = checkInDetail, LoyaltyLevelTypeId = "1", ReservationId = "1", Stateroom = stateroom, ReservationStatusId = "0000089", StateroomCategoryTypeId = "aaasad" }; var guest = new Guest { GuestId = PersonId, PersonalDetail = personDetail, Age = 0, CruiseDetail = cruiseDetail, SecurityPhotoAddress = string.Empty }; var cruiseDetails = new GuestCruiseDetail { BeaconId = string.Empty, BerthNumber = string.Empty, IdentificationId = string.Empty, LoyaltyLevelTypeId = string.Empty, ReservationId = string.Empty, Stateroom = stateroom }; //// var personDetail = new PersonalDetail { CitizenshipCountryId = string.Empty, FirstName = string.Empty, LastName = string.Empty, MiddleName = string.Empty, Title = string.Empty, PreferredName = string.Empty, MaritalStatus = string.Empty, Nickname = string.Empty, Occupation = string.Empty, PassportNo = string.Empty, Suffix = string.Empty }; var personBase = new PersonBase { IsOnHold = true, ChargeId = ChargeId, CruiseDetail = cruiseDetails, PersonalDetail = personDetail, LastEvent = string.Empty, PersonId = PersonId, SecurityPhotoAddress = string.Empty, Stateroom = stateroom }; PortDebarkAuthorization pda = new PortDebarkAuthorization { PortId = "1", PersonId = "00001", CanDebarkAlone = true, IsActivePort = true, PortOrder = 1 }; DebarkAuthorizedPersonCollection dapCollection = new DebarkAuthorizedPersonCollection(); dapCollection.Add(new DebarkAuthorizedPerson { PersonTypeId = "2", Person = personBase, PersonId = PersonId, PersonType = PersonType.Guest }); pda.AssignDebarkAuthorizedPersons(dapCollection); PortDebarkAuthorizationCollection portDebarkAuthorizations = new PortDebarkAuthorizationCollection(); portDebarkAuthorizations.Add(pda); guest.AssignPortAuthorizations(portDebarkAuthorizations); guests.Add(guest); person.AssignGuests(guests); return person; }
private void SetUpData() { this.targetService = new PhotoService(); this.person = new Person(); CrewmemberCollection crewMembers = new CrewmemberCollection(); var personDetail = new PersonalDetail { CitizenshipCountryId = string.Empty, FirstName = string.Empty, LastName = string.Empty, MiddleName = string.Empty, Title = string.Empty, PreferredName = string.Empty, MaritalStatus = string.Empty, Nickname = string.Empty, Occupation = string.Empty, DocumentNumber = string.Empty, Suffix = string.Empty }; crewMembers.Add(new Crewmember { CrewmemberId = string.Empty, CrewmemberTypeId = "1", SecurityPhotoAddress = string.Empty, ChargeId = string.Empty, EmployeeNo = string.Empty, LastEvent = string.Empty, PersonalDetail = personDetail }); this.person.AssignCrewmembers(crewMembers); GuestCollection guests = new GuestCollection(); var checkInDetail = new CheckInDetail { ApplicationId = string.Empty, LocationId = "1", LocationTypeId = "1", MachineName = "Machine", Station = "station", UserId = "user" }; var cruiseDetail = new GuestCruiseDetail { BeaconId = string.Empty, CheckInDetail = checkInDetail, LoyaltyLevelTypeId = "1", ReservationId = "1", Stateroom = stateroom, ReservationStatusId = "0000089", StateroomCategoryTypeId = "3" }; var guest = new Guest { GuestId = PersonId, PersonalDetail = personDetail, Age = 0, CruiseDetail = cruiseDetail, SecurityPhotoAddress = string.Empty, }; guests.Add(guest); this.person.AssignGuests(guests); PortDebarkAuthorization pda = new PortDebarkAuthorization { PortId = "1", PersonId = "00001", CanDebarkAlone = true, IsActivePort = true, PortOrder = 1 }; DebarkAuthorizedPersonCollection dapCollection = new DebarkAuthorizedPersonCollection(); dapCollection.Add(new DebarkAuthorizedPerson { PersonTypeId = "2", Person = this.FilledPerson(), PersonId = PersonId, PersonType = PersonType.Guest }); pda.AssignDebarkAuthorizedPersons(dapCollection); PortDebarkAuthorizationCollection portDebarkAuthorizations = new PortDebarkAuthorizationCollection(); portDebarkAuthorizations.Add(pda); guest.AssignPortAuthorizations(portDebarkAuthorizations); guests.Add(guest); this.listOfPDA.Add(pda); person.AssignGuests(guests); }