예제 #1
0
        protected override void ExtractProperty(object cell, string columnName)
        {
            Property propertyColName = Property.RatingId;
            if (!Enum.TryParse(columnName, true, out propertyColName)) return;

            switch (propertyColName)
            {
                case Property.RatingId:
                {
                    Rating = GroupType.RatingCollection.Find(int.Parse(cell.ToString()));
                }
                break;

                case Property.IsCoach:
                {
                    IsCoach = bool.Parse(cell.ToString());
                }
                break;
            }
        }
예제 #2
0
        private static void InsertGroupType(
			string type, 
			decimal price, 
			decimal militaryPrice, 
			int importance, 
			Rating rating)
        {
            new GroupType()
            {
                Type = type,
                Price = price,
                MilitaryPrice = militaryPrice,
                Importance = importance,
                Rating = rating
            }.Insert();
        }