public static ExportSpeciesFactFactorValue CreateValueMissingFactorValue(bool isChecked)
        {
            var model = new ExportSpeciesFactFactorValue();

            model.IsChecked = isChecked;
            model.Id        = -1;
            model.Name      = Resources.DyntaxaResource.SharedMissingValue;
            return(model);
        }
        public static ExportSpeciesFactFactorValue Create(FactorFieldEnumValue factorFieldEnumValue, bool isChecked)
        {
            var model = new ExportSpeciesFactFactorValue();

            model.IsChecked = isChecked;
            model.Id        = factorFieldEnumValue.KeyInt.Value;
            model.Name      = factorFieldEnumValue.OriginalLabel;
            return(model);
        }
        /// <summary>
        /// Init swedish occurence and swedish history factor enum value lists.
        /// </summary>
        private void InitSpeciesFacts(IUserContext userContext)
        {
            Dictionary <ArtDatabanken.Data.FactorId, IList <ArtDatabanken.Data.FactorFieldEnumValue> > factorEnumValues;

            factorEnumValues = SpeciesFactHelper.GetFactorsValueLists(userContext, new[] { ArtDatabanken.Data.FactorId.SwedishOccurrence, ArtDatabanken.Data.FactorId.SwedishHistory });
            FilterSwedishOccurrenceValues = new List <ExportSpeciesFactFactorValue>();
            //SwedishOccurrenceValues.Add(ExportSpeciesFactFactorValue.CreateValueMissingFactorValue(true));
            foreach (ArtDatabanken.Data.FactorFieldEnumValue enumValue in factorEnumValues[ArtDatabanken.Data.FactorId.SwedishOccurrence])
            {
                FilterSwedishOccurrenceValues.Add(ExportSpeciesFactFactorValue.Create(enumValue, true));
            }

            FilterSwedishHistoryValues = new List <ExportSpeciesFactFactorValue>();
            //SwedishHistoryValues.Add(ExportSpeciesFactFactorValue.CreateValueMissingFactorValue(true));
            foreach (ArtDatabanken.Data.FactorFieldEnumValue enumValue in factorEnumValues[ArtDatabanken.Data.FactorId.SwedishHistory])
            {
                FilterSwedishHistoryValues.Add(ExportSpeciesFactFactorValue.Create(enumValue, true));
            }
        }