Beispiel #1
0
            public void Add(HandSetFeatures newModel)
            {
                HandSetFeatures old;

                if (!models.TryGetValue(newModel.Model, out old))
                {
                    models.Add(newModel.Model, newModel);
                    spaceLess.Add(Miscellany.RemoveSpaces(newModel.Model), newModel);
                }
                else
                {
                    newModel.CopyTo(old);
                }
            }
Beispiel #2
0
            public string GetSpecificModelBrand(string model)
            {
                HandSetFeatures features;

                if (models.TryGetValue(model, out features))
                {
                    return(features.Brand);
                }
                //return models[model].Brand;
                if (spaceLess.TryGetValue(Miscellany.RemoveSpaces(model), out features))
                {
                    return(features.Brand);
                }
                else
                {
                    throw new Exception($"Error....I don't have the {model} model in my database");
                }
            }