Exemple #1
0
        public List <TypeVm> GetAllEventTypes()
        {
            var eventTypes = new List <TypeVm>();

            DataTable dt = EventDb.GetAllEventTypes();

            foreach (DataRow row in dt.Rows)
            {
                var type = new TypeVm();

                type.Id   = (int)row["Id"];
                type.Name = (string)row["Name"];

                eventTypes.Add(type);
            }

            return(eventTypes);
        }