Example #1
0
        public void CreateModel(string modelName, string headName)
        {
            switch (modelName.Trim().ToLowerInvariant())
            {
            case "sport":
            {
                Sport sport = Sport.CreateInstance(headName);
                if (!journals.Contains(sport))
                {
                    journals.Add(sport);
                }
                break;
            }

            case "political":
            {
                Political political = Political.CreateInstance(headName);
                if (!journals.Contains(political))
                {
                    journals.Add(political);
                }
                break;
            }

            case "economical":
            {
                Economy economy = Economy.CreateInstance(headName);
                if (!journals.Contains(economy))
                {
                    journals.Add(economy);
                }
                break;
            }

            default:
                break;
            }
        }