public void Add(Room X) { List.Add(X); }
public Room GetRoom(int ID) { try { Room X = new Room(); string sSQL = "Select * FROM tblRoom WHERE ID = " + ID; DataTable DT = GetDataTable(sSQL); if(DT.Rows.Count > 0) { DataRow r = DT.Rows[0]; X.mvarID = Convert.ToInt32((object)r[0]); X.mvarDescription = Convert.ToString((object)r[1]); X.mvarCreatedDate = Convert.ToDateTime((object)r[2]); X.mvarUniqueIdentifier = r[3].ToString(); X.mvarVideoStorageServerID = Convert.ToInt32((object)r[4]); } else X = null; DT.Dispose(); return X; } catch(Exception Err) { throw new ApplicationException(Err.Message); } }