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; }
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); }
public static void SocietyType_Delete(SocietyType societyType) { db.ExecuteNonQuery("spSocietyTypeDelete", societyType.Id); }
public static void SocietyType_Update(SocietyType societyType) { db.ExecuteNonQuery("spSocietyTypeUpdate", societyType.Id, societyType.Code, societyType.Description, HttpContext.Current.Session["UserId"]); }
public static int?SocietyType_Insert(SocietyType societyType) { return(Convert.ToInt32(db.ExecuteScalar("spSocietyTypeInsert", societyType.Code, societyType.Description, HttpContext.Current.Session["UserId"]))); }