Example #1
0
        void CreateRow(
            Worksheet sheet,
            int row,
            int cabinNo,
            string cabinTypeName,
            string lastName,
            string firstName,
            DateOfBirth dob,
            Gender gender,
            string nationality,
            string group,
            string reference,
            bool isCreated,
            string[] changes
            )
        {
            SetCell(sheet, row, 0, cabinNo.ToString(), null, isCreated, changes);
            SetCell(sheet, row, 1, cabinTypeName, null, isCreated, changes);
            SetCell(sheet, row, 2, lastName, nameof(BookingPax.LastName), isCreated, changes);
            SetCell(sheet, row, 3, firstName, nameof(BookingPax.FirstName), isCreated, changes);
            SetCell(sheet, row, 4, dob.Format(DobFormat), nameof(BookingPax.Dob), isCreated, changes);
            SetCell(sheet, row, 5, gender.ToString().ToUpperInvariant(), nameof(BookingPax.Gender), isCreated, changes);
            SetCell(sheet, row, 6, nationality.ToUpperInvariant(), nameof(BookingPax.Nationality), isCreated, changes);
            SetCell(sheet, row, 7, group, nameof(BookingPax.Group), isCreated, changes);
            SetCell(sheet, row, 8, reference, null, isCreated, changes);

            if (_updatedSince.HasValue && (isCreated || changes.Any(c => IsExportedField(c) || IsAddedPax(c))))
            {
                bool isNew = isCreated || changes.Any(IsAddedPax);
                SetCell(sheet, row, 9, isNew ? "Ny" : "Ă„ndrad", null, true, null);
            }
        }