public Group GetGroup(int GroupID) { try { Group X = new Group(); string sSQL = "SELECT * FROM tblGroup WHERE Id = " + GroupID; 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(r[1]); X.mvarIsPublicAccess = Convert.ToBoolean(r[2]); } else X = null; DT.Dispose(); return X; } catch(Exception Err) { throw new ApplicationException(Err.Message); } }
public void Add(Group X) { List.Add(X); }