HouseOver.THARM.CustomerCatalogue.Compares.SalePutUpDateComparer Class Reference

A class which compares the dates of the Profile instances of two Customer instances. More...

Collaboration diagram for HouseOver.THARM.CustomerCatalogue.Compares.SalePutUpDateComparer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SalePutUpDateComparer (CatalogueData data)
 Constructor for the SalePutUpDateComparer class.
int Compare (Customer x, Customer y)
 Compare the date of the oldest Profile in Customer x with the oldest Profile in Customer y.
 SalePutUpDateComparer (CatalogueData data)
 Constructor for the SalePutUpDateComparer class.
int Compare (Customer x, Customer y)
 Compare the date of the oldest Profile in Customer x with the oldest Profile in Customer y.

Private Attributes

CatalogueData data
 The data catalogue to work on.

Detailed Description

A class which compares the dates of the Profile instances of two Customer instances.

Definition at line 10 of file SalePutUpDate.cs.


Constructor & Destructor Documentation

HouseOver.THARM.CustomerCatalogue.Compares.SalePutUpDateComparer.SalePutUpDateComparer ( CatalogueData  data  ) 

Constructor for the SalePutUpDateComparer class.

Parameters:
data The data catalogue to work on

Definition at line 19 of file SalePutUpDate.cs.

00020         {
00021             this.data = data;
00022         }

HouseOver.THARM.CustomerCatalogue.Compares.SalePutUpDateComparer.SalePutUpDateComparer ( CatalogueData  data  ) 

Constructor for the SalePutUpDateComparer class.

Parameters:
data The data catalogue to work on

Definition at line 19 of file SalePutUpDate.cs.

00020         {
00021             this.data = data;
00022         }


Member Function Documentation

int HouseOver.THARM.CustomerCatalogue.Compares.SalePutUpDateComparer.Compare ( Customer  x,
Customer  y 
)

Compare the date of the oldest Profile in Customer x with the oldest Profile in Customer y.

Parameters:
x The first customer
y The second customer
Returns:
The result of the comparison of the oldest dated from the two Profiles

Definition at line 30 of file SalePutUpDate.cs.

00031         {
00032             DateTime c1 = DateTime.Now;
00033             DateTime c2 = DateTime.Now;
00034 
00035             foreach (Sale s in data.GetSales(x))
00036             {
00037                 if (s.PutUpForSale < c1) c1 = s.PutUpForSale;
00038             }
00039 
00040             foreach (Sale s in data.GetSales(y))
00041             {
00042                 if (s.PutUpForSale < c2) c2 = s.PutUpForSale;
00043             }
00044 
00045             return c1.CompareTo(c2);
00046         }

int HouseOver.THARM.CustomerCatalogue.Compares.SalePutUpDateComparer.Compare ( Customer  x,
Customer  y 
)

Compare the date of the oldest Profile in Customer x with the oldest Profile in Customer y.

Parameters:
x The first customer
y The second customer
Returns:
The result of the comparison of the oldest dated from the two Profiles

Definition at line 30 of file SalePutUpDate.cs.

00031         {
00032             DateTime c1 = DateTime.Now;
00033             DateTime c2 = DateTime.Now;
00034 
00035             foreach (Sale s in data.GetSales(x))
00036             {
00037                 if (s.PutUpForSale < c1) c1 = s.PutUpForSale;
00038             }
00039 
00040             foreach (Sale s in data.GetSales(y))
00041             {
00042                 if (s.PutUpForSale < c2) c2 = s.PutUpForSale;
00043             }
00044 
00045             return c1.CompareTo(c2);
00046         }


Member Data Documentation

CatalogueData HouseOver::THARM::CustomerCatalogue::Compares.SalePutUpDateComparer::data [private]

The data catalogue to work on.

Definition at line 13 of file SalePutUpDate.cs.


The documentation for this class was generated from the following files:
Generated on Wed Jan 10 03:43:18 2007 for THARM by  doxygen 1.5.1-p1