public static EventItemCollection GetbyUser(string CreatedUser) { EventItemCollection collection = new EventItemCollection(); EventItem obj; using (var reader = SqlHelper.ExecuteReader("tblEventItem_GetAll_byUser", new SqlParameter("@CreatedUser", CreatedUser))) { while (reader.Read()) { obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static EventItemCollection GetAllItemByEventCode(string EventCode) { EventItemCollection collection = new EventItemCollection(); using (var reader = SqlHelper.ExecuteReader("tblEventItem_GetAllByEventCode", new SqlParameter("@EventCode", EventCode))) { while (reader.Read()) { EventItem obj = new EventItem(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static EventItemCollection GetAllItem() { EventItemCollection collection = new EventItemCollection(); using (var reader = SqlHelper.ExecuteReader("tblEventItem_GetAll", null)) { while (reader.Read()) { EventItem obj = new EventItem(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public static EventItemCollection Filter(string EventCode, string ItemType) { EventItemCollection collection = new EventItemCollection(); using (var reader = SqlHelper.ExecuteReader("tblEventItem_Filter", new SqlParameter[] { new SqlParameter("@EventCode", EventCode), new SqlParameter("@ItemType", ItemType) })) { while (reader.Read()) { EventItem obj = new EventItem(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }