Пример #1
0
        public FirstCardGroup(string personalPhotoDirectoryPath)
        {
            if (string.IsNullOrWhiteSpace(personalPhotoDirectoryPath))
            {
                throw new ArgumentNullException(nameof(personalPhotoDirectoryPath));
            }

            PassportInfoCard          = new PassportInfoCard();
            PassportPersonInfoCard    = new PassportPersonInfoCard(personalPhotoDirectoryPath);
            PassportAccommodationCard = new PassportAccommodationCard();
            PassportFamilyInfoCard    = new PassportFamilyInfoCard();
            CriminalCard = new CriminalCard();
        }
Пример #2
0
        private FirstCardGroup BuildFirstCardGroup()
        {
            var passportInfo = new PassportInfoCard()
            {
                Code         = _recruitInfo.Envelope.PassportInfo.Code.Value,
                IssueBy      = _recruitInfo.Envelope.PassportInfo.IssueInfo.IssueBy,
                IssueDate    = _recruitInfo.Envelope.PassportInfo.IssueInfo.IssueDate,
                DevisionCode = _recruitInfo.Envelope.PassportInfo.IssueInfo.DevisionCode
            };

            var passportPersonInfoCard = new PassportPersonInfoCard(_personalPhotoDirectoryPath)
            {
                PhotoName  = _recruitInfo.Envelope.PassportInfo.PhotoName,
                Surname    = _recruitInfo.Envelope.PassportInfo.PersonInfo.FullName.Surname,
                Name       = _recruitInfo.Envelope.PassportInfo.PersonInfo.FullName.Name,
                Patronymic = _recruitInfo.Envelope.PassportInfo.PersonInfo.FullName.Patronymic,
                BirthDate  = _recruitInfo.Envelope.PassportInfo.PersonInfo.BirthInfo.Date,
                BirthPlace = _recruitInfo.Envelope.PassportInfo.PersonInfo.BirthInfo.Place
            };

            var passportAccommodationCard = new PassportAccommodationCard()
            {
                Locality         = _recruitInfo.Envelope.PassportInfo.LocationInfo.Locality,
                RegisterLocation = _recruitInfo.Envelope.PassportInfo.LocationInfo.RegisterLocation.Value,
                ActuallyLocation = _recruitInfo.Envelope.PassportInfo.LocationInfo.ActuallyLocation.Value,
            };

            var passportFamilyInfoCard = new PassportFamilyInfoCard()
            {
                FamilyStatus = _recruitInfo.Envelope.PassportInfo.FamilyInfo.FamilyStatus.ToFamilyStatusString(),
                IsHaveBaby   = _recruitInfo.Envelope.PassportInfo.FamilyInfo.IsHaveBaby
            };

            var criminalCard = new CriminalCard()
            {
                RegisterStatus = _recruitInfo.CriminalInfo.RegisterStatus.ToRegisterStatusString(),
                CriminalStatus = _recruitInfo.CriminalInfo.CriminalStatus.ToCriminalStatusString()
            };

            return(new FirstCardGroup(passportInfo,
                                      passportPersonInfoCard,
                                      passportAccommodationCard,
                                      passportFamilyInfoCard,
                                      criminalCard));
        }
Пример #3
0
        public FirstCardGroup(PassportInfoCard passportInfoCard,
                              PassportPersonInfoCard passportPersonInfoCard,
                              PassportAccommodationCard passportAccommodationCard,
                              PassportFamilyInfoCard passportFamilyInfoCard,
                              CriminalCard criminalCard)
        {
            if (passportInfoCard == null)
            {
                throw new ArgumentNullException(nameof(passportInfoCard));
            }

            if (passportPersonInfoCard == null)
            {
                throw new ArgumentNullException(nameof(passportPersonInfoCard));
            }

            if (passportAccommodationCard == null)
            {
                throw new ArgumentNullException(nameof(passportPersonInfoCard));
            }

            if (passportFamilyInfoCard == null)
            {
                throw new ArgumentNullException(nameof(passportPersonInfoCard));
            }

            if (criminalCard == null)
            {
                throw new ArgumentNullException(nameof(passportPersonInfoCard));
            }

            PassportInfoCard          = passportInfoCard;
            PassportPersonInfoCard    = passportPersonInfoCard;
            PassportAccommodationCard = passportAccommodationCard;
            PassportFamilyInfoCard    = passportFamilyInfoCard;
            CriminalCard = criminalCard;
        }