예제 #1
0
        private bool CheckForUniqueness(string newValue, InputType type)
        {
            switch (type)
            {
            case InputType.Name:
            {
                if (RaceModel.DoesNameExist(newValue) == true)
                {
                    return(false);
                }
                break;
            }

            case InputType.Abbreviation:
            {
                if (RaceModel.DoesAbbreviationExist(newValue) == true)
                {
                    return(false);
                }
                break;
            }
            }
            return(true);
        }