Exemplo n.º 1
0
 /// <summary>
 /// Set species fact information about this taxon regarding previously red listed facts.
 /// </summary>
 /// <param name="speciesFact">Species fact with red list information.</param>
 /// <param name="currentPeriod">Actual red list period.</param>
 public void SetSpeciesFact(ISpeciesFact speciesFact, IPeriod currentPeriod)
 {
     if (speciesFact.Factor.Id == (int)FactorId.RedlistCategory && speciesFact.Period.Id != currentPeriod.Id)
     {
         if (speciesFact.IsOldRedlistCategorySpecified())
         {
             if (PreviousRedListCriteria.IsNull())
             {
                 PreviousRedListCriteria = new Dictionary <string, string>();
             }
             var redListCategory = speciesFact.Field1.EnumValue.OriginalLabel.Substring(0, speciesFact.Field1.EnumValue.OriginalLabel.Length - 4) +
                                   "(" + speciesFact.MainField.StringValue + ")";
             PreviousRedListCriteria.Add(speciesFact.Period.Name, redListCategory);
         }
     }
 }