예제 #1
0
        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);
        }
예제 #2
0
 /// <summary>
 /// Compares 2 instances of TaxClas.
 /// </summary>
 public static int CompareByCreated(TaxClass taxClass1, TaxClass taxClass2)
 {
     return(taxClass1.Created.CompareTo(taxClass2.Created));
 }
예제 #3
0
 /// <summary>
 /// Compares 2 instances of TaxClas.
 /// </summary>
 public static int CompareByLastModified(TaxClass taxClass1, TaxClass taxClass2)
 {
     return(taxClass1.LastModified.CompareTo(taxClass2.LastModified));
 }
예제 #4
0
 /// <summary>
 /// Compares 2 instances of TaxClas.
 /// </summary>
 public static int CompareByDescription(TaxClass taxClass1, TaxClass taxClass2)
 {
     return(taxClass1.Description.CompareTo(taxClass2.Description));
 }
예제 #5
0
 /// <summary>
 /// Compares 2 instances of TaxClas.
 /// </summary>
 public static int CompareByTitle(TaxClass taxClass1, TaxClass taxClass2)
 {
     return(taxClass1.Title.CompareTo(taxClass2.Title));
 }