public static List<Event> GetEvents(SocietyType society)
 {
     DataTable eventsDataTable = SocietyRepository.GetEvents((int)society);
     List<Event> events = new List<Event>();
     foreach (DataRow row in eventsDataTable.Rows)
     {
         events.Add(new Event { ID = (int)row["EventID"], Name = row["EventName"].ToString(), MaxTeamSize = (int)row["MaxTeamSize"] });
     }
     return events;
 }
Example #2
0
        public static List <Event> GetEvents(SocietyType society)
        {
            DataTable    eventsDataTable = SocietyRepository.GetEvents((int)society);
            List <Event> events          = new List <Event>();

            foreach (DataRow row in eventsDataTable.Rows)
            {
                events.Add(new Event {
                    ID = (int)row["EventID"], Name = row["EventName"].ToString(), MaxTeamSize = (int)row["MaxTeamSize"]
                });
            }
            return(events);
        }
Example #3
0
 public static void SocietyType_Delete(SocietyType societyType)
 {
     db.ExecuteNonQuery("spSocietyTypeDelete", societyType.Id);
 }
Example #4
0
 public static void SocietyType_Update(SocietyType societyType)
 {
     db.ExecuteNonQuery("spSocietyTypeUpdate", societyType.Id, societyType.Code,
                        societyType.Description, HttpContext.Current.Session["UserId"]);
 }
Example #5
0
 public static int?SocietyType_Insert(SocietyType societyType)
 {
     return(Convert.ToInt32(db.ExecuteScalar("spSocietyTypeInsert", societyType.Code,
                                             societyType.Description, HttpContext.Current.Session["UserId"])));
 }