Ejemplo n.º 1
0
        public IEnumerable<NomenclatureItem> SearchNomenclature(string ticketID, NomenclatureType type, NomenclatureLanguage language, int? startIndex, int? offset)
        {
            List<NomenclatureItem> list = new List<NomenclatureItem>();

            switch (type)
            {
                case NomenclatureType.IrregularityTypes:
                    {
                        var irregularityTypes =
                            this.unitOfWork.DbContext.Set<IrregularityType>()
                            .OrderBy(e => e.IrregularityTypeId)
                            .ToList();

                        foreach (var irregularityType in irregularityTypes)
                        {
                            list.Add(new NomenclatureItem { Type = NomenclatureType.IrregularityTypes, Value = irregularityType.Alias, Text = irregularityType.Name, Description = irregularityType.Description });
                        }
                    } break;

                case NomenclatureType.AuthorityIssuedAttachedDocument:
                    {
                        var nom = new Rio.Objects.Enums.AuthorityIssuedAttachedDocumentNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.ASCertificateTypePilots:
                    {
                        var nom = new Rio.Objects.Enums.ASCertificateTypeNomenclature();
                        foreach (var item in nom.PilotValues)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.ASCertificateTypeFlightDispatchers:
                    {
                        var nom = new Rio.Objects.Enums.ASCertificateTypeNomenclature();
                        foreach (var item in nom.FlightDispatchersValues)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.ASCertificateTypeNotPilots:
                    {
                        var nom = new Rio.Objects.Enums.ASCertificateTypeNomenclature();
                        foreach (var item in nom.NotPilotsValues)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.ASCertificateTypeTrafficControllers:
                    {
                        var nom = new Rio.Objects.Enums.ASCertificateTypeNomenclature();
                        foreach (var item in nom.TrafficControllersValues)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.ASCertificateTypeForeigners:
                    {
                        var nom = new Rio.Objects.Enums.ASCertificateTypeNomenclature();
                        foreach (var item in nom.ForeignersValues)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.ASCertificateTypeCabinCrew:
                    {
                        var nom = new Rio.Objects.Enums.ASCertificateTypeNomenclature();
                        foreach (var item in nom.CabinCrewValues)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.ASCertificateTypeChangeCompetent:
                    {
                        var nom = new Rio.Objects.Enums.ASCertificateTypeNomenclature();
                        foreach (var item in nom.ChangeCompetentValues)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.AviationAdministration:
                    {
                        var nom = new Rio.Objects.Enums.AviationAdministrationNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.AeromedicalFitnessClass:
                    {
                        var nom = new Rio.Objects.Enums.AeromedicalFitnessClassNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.AeromedicalCenter:
                    {
                        var nom = new Rio.Objects.Enums.AeromedicalCenterNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.ASCourseExam:
                    {
                        var nom = new Rio.Objects.Enums.ASCourseExamNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.ATO:
                    {
                        var nom = new Rio.Objects.Enums.ATONomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.ASLLData:
                    {
                        var nom = new Rio.Objects.Enums.ASLLDataNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.LEC:
                    {
                        var nom = new Rio.Objects.Enums.LECNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.AircraftClass:
                case NomenclatureType.AircraftClassQualificationClass:
                    {
                        var nom = new Rio.Objects.Enums.AircraftClassQualificationClassNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.AircraftType:
                case NomenclatureType.AircraftTypeQualificationClass:
                    {
                        var nom = new Rio.Objects.Enums.AircraftTypeQualificationClassNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.FlightSimulatorType:
                    {
                        var nom = new Rio.Objects.Enums.DummyNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.FlightSkillTestExaminer:
                    {
                        var nom = new Rio.Objects.Enums.FlightSkillTestExaminerNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.AircraftMaintenanceCategoryLicense:
                    {
                        var nom = new Rio.Objects.Enums.AircraftMaintenanceCategoryLicenseNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.OVDBodyLocationIndicator:
                    {
                        var nom = new Rio.Objects.Enums.OVDBodyLocationIndicatorNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.SectorWorkplaceAviationGroundStaff:
                    {
                        var nom = new Rio.Objects.Enums.SectorWorkplaceAviationGroundStaffNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.OVDQualificationClassWithoutPermission:
                    {
                        var nom = new Rio.Objects.Enums.OVDQualificationClassWithoutPermissionNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.CoordinationActivitiesInteractionAirTrafficManagementPermission:
                    {
                        var nom = new Rio.Objects.Enums.CoordinationActivitiesInteractionAirTrafficManagementPermissionNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.AircraftOperationType:
                    {
                        var nom = new Rio.Objects.Enums.AircraftOperationTypeNomenclature();
                        foreach (var item in nom.Values.OrderBy(e => e.Text))
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.CategoryAircraft:
                    {
                        var nom = new Rio.Objects.Enums.CategoryAircraftNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.EngineType:
                    {
                        var nom = new Rio.Objects.Enums.DummyNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.PropellerType:
                    {
                        var nom = new Rio.Objects.Enums.DummyNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.CategoryELVS:
                    {
                        var nom = new Rio.Objects.Enums.CategoryELVSNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.TypeOfObject:
                    {
                        var nom = new Rio.Objects.Enums.TypeOfObjectNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.PersonRepresentingTradingCompanyRole:
                    {
                        var nom = new Rio.Objects.Enums.PersonRepresentingTradingCompanyRoleNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.ProvidingServiceKind:
                    {
                        var nom = new Rio.Objects.Enums.ProvidingServiceKindNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.ProvidingServicePart:
                    {
                        var nom = new Rio.Objects.Enums.ProvidingServicePartNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text, ParentValue = item.ParentValue });
                        }
                    } break;

                case NomenclatureType.ProvidingServiceSubpart:
                    {
                        var nom = new Rio.Objects.Enums.ProvidingServiceSubpartNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text, ParentValue = item.ParentValue });
                        }
                    } break;

                case NomenclatureType.FacilityKindATM:
                    {
                        var nom = new Rio.Objects.Enums.FacilityKindNomenclature();
                        foreach (var item in nom.FitnessAutomatedATMValues)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.FacilityKindAid:
                    {
                        var nom = new Rio.Objects.Enums.FacilityKindNomenclature();
                        foreach (var item in nom.NavigationalAidsValues)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.FacilityLocation:
                    {
                        var nom = new Rio.Objects.Enums.FacilityLocationNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.GroupTypeChecking:
                    {
                        var nom = new Rio.Objects.Enums.GroupTypeCheckingNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.TypeChecking:
                    {
                        var nom = new Rio.Objects.Enums.TypeCheckingNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text, ParentValue = item.ParentValue });
                        }
                    } break;

                case NomenclatureType.AviationTrainingCenter:
                    {
                        var nom = new Rio.Objects.Enums.AviationTrainingCenterNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.Course:
                    {
                        var nom = new Rio.Objects.Enums.CourseNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.FSTDType:
                    {
                        var nom = new Rio.Objects.Enums.FSTDTypeNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.PermissibleActivity:
                    {
                        var nom = new Rio.Objects.Enums.PermissibleActivityNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.Permission:
                    {
                        var nom = new Rio.Objects.Enums.PermissionNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.DirectionFunction:
                    {
                        var nom = new Rio.Objects.Enums.DirectionFunctionNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.AircraftModel:
                    {
                        var nom = new Rio.Objects.Enums.DummyNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.TrainingModuleInitial:
                    {
                        var nom = new Rio.Objects.Enums.TrainingModuleNomenclature();
                        foreach (var item in nom.InitialValues)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.TrainingModulePeriodical:
                    {
                        var nom = new Rio.Objects.Enums.TrainingModuleNomenclature();
                        foreach (var item in nom.PeriodicalValues)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.AircraftTypeInstructor:
                    {
                        var nom = new Rio.Objects.Enums.AircraftClassQualificationClassNomenclature();
                        foreach (var item in nom.InstructorValues)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.ASCertificateTypeInstructor:
                    {
                        var nom = new Rio.Objects.Enums.ASCertificateTypeNomenclature();
                        foreach (var item in nom.InstructorValues)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.RightsTypeInstructor:
                    {
                        var nom = new Rio.Objects.Enums.DummyNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.RightsTypeExaminer:
                    {
                        var nom = new Rio.Objects.Enums.RightsTypeNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.AdditionalQualification:
                    {
                        var nom = new Rio.Objects.Enums.DummyNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.LicenseRestriction:
                    {
                        var nom = new Rio.Objects.Enums.DummyNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.IssueAttestation:
                    {
                        var nom = new Rio.Objects.Enums.DummyNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.IndividualRecoveryProgram:
                    {
                        var nom = new Rio.Objects.Enums.DummyNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.TrainingAsCourseExam:
                    {
                        var nom = new Rio.Objects.Enums.ASCourseExamNomenclature();
                        foreach (var item in nom.TrainingValues)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                case NomenclatureType.ConfirmTransofrmationASCertificateType:
                    {
                        var nom = new Rio.Objects.Enums.ASCertificateTypeNomenclature();
                        foreach (var item in nom.R5246Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                default:
                    {
                        var nom = new Rio.Objects.Enums.DummyNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Type = NomenclatureType.Dummy, Value = item.Value, Text = item.Text });
                        }
                    } break;
            }

            return list;
        }
Ejemplo n.º 2
0
        public IEnumerable<NomenclatureItem> SearchNomenclature(string ticketID, NomenclatureType type, NomenclatureLanguage language, int? startIndex, int? offset)
        {
            List<NomenclatureItem> list = new List<NomenclatureItem>();

            switch (type)
            {
                case NomenclatureType.IrregularityTypes:
                    {
                        for (int i = 1; i <= 5; i++)
                        {
                            list.Add(new NomenclatureItem { Type = NomenclatureType.IrregularityTypes, Value = "Нередовност " + i, Text = "Нередовност " + i, Description = "Описание " + i });
                        }
                    } break;

                case NomenclatureType.OperationalProgramAop:
                    {
                        var nom = new Rio.Objects.Enums.OperationalProgramNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Value = item.Value, Text = item.Text });
                        }
                    } break;

                default:
                    {
                        var nom = new Rio.Objects.Enums.DummyNomenclature();
                        foreach (var item in nom.Values)
                        {
                            list.Add(new NomenclatureItem { Type = NomenclatureType.Dummy, Value = item.Value, Text = item.Text });
                        }
                    } break;
            }

            return list;
        }