private static List <TaxClass> LoadListFromReader(IDataReader reader) { List <TaxClass> taxClassList = new List <TaxClass>(); try { while (reader.Read()) { TaxClass taxClass = new TaxClass(); taxClass.guid = new Guid(reader["Guid"].ToString()); taxClass.siteGuid = new Guid(reader["SiteGuid"].ToString()); taxClass.title = reader["Title"].ToString(); taxClass.description = reader["Description"].ToString(); taxClass.lastModified = Convert.ToDateTime(reader["LastModified"]); taxClass.created = Convert.ToDateTime(reader["Created"]); taxClassList.Add(taxClass); } } finally { reader.Close(); } return(taxClassList); }
/// <summary> /// Compares 2 instances of TaxClas. /// </summary> public static int CompareByCreated(TaxClass taxClass1, TaxClass taxClass2) { return(taxClass1.Created.CompareTo(taxClass2.Created)); }
/// <summary> /// Compares 2 instances of TaxClas. /// </summary> public static int CompareByLastModified(TaxClass taxClass1, TaxClass taxClass2) { return(taxClass1.LastModified.CompareTo(taxClass2.LastModified)); }
/// <summary> /// Compares 2 instances of TaxClas. /// </summary> public static int CompareByDescription(TaxClass taxClass1, TaxClass taxClass2) { return(taxClass1.Description.CompareTo(taxClass2.Description)); }
/// <summary> /// Compares 2 instances of TaxClas. /// </summary> public static int CompareByTitle(TaxClass taxClass1, TaxClass taxClass2) { return(taxClass1.Title.CompareTo(taxClass2.Title)); }