first commit
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
|
||||
namespace Landmark.OLA.Models.Individuals.Enums
|
||||
{
|
||||
|
||||
public class SuffixType
|
||||
{
|
||||
public string CD { get; set; }
|
||||
public string Name { get; set; }
|
||||
public Suffix SuffixEnum { get; set; }
|
||||
public SuffixType(string cd, string name, Suffix suffix)
|
||||
{
|
||||
SuffixEnum = suffix;
|
||||
CD = cd;
|
||||
Name = name;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SuffixMap
|
||||
{
|
||||
public SuffixMap() {}
|
||||
|
||||
public static readonly SuffixType II = new("2", "II", Suffix.II);
|
||||
public static readonly SuffixType III = new("3", "III", Suffix.III);
|
||||
public static readonly SuffixType IV = new("4", "IV", Suffix.IV);
|
||||
public static readonly SuffixType V = new("5", "V", Suffix.V);
|
||||
public static readonly SuffixType Jr = new("J", "Jr.", Suffix.Jr);
|
||||
public static readonly SuffixType Sr = new("S", "Sr.", Suffix.Sr);
|
||||
|
||||
public static readonly SuffixType[] map = [II, III, IV, V, Jr, Sr];
|
||||
|
||||
public static SuffixType GetSuffixType(Suffix? suffix)
|
||||
{
|
||||
SuffixType match = null;
|
||||
foreach (SuffixType suff in map)
|
||||
{
|
||||
if (suff.SuffixEnum == suffix)
|
||||
{
|
||||
match = suff;
|
||||
}
|
||||
}
|
||||
|
||||
return match;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user