Collaboration diagram for HouseOver.THARM.CustomerCatalogue.Compares.SalePutUpDateComparer:
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. |
Definition at line 10 of file SalePutUpDate.cs.
HouseOver.THARM.CustomerCatalogue.Compares.SalePutUpDateComparer.SalePutUpDateComparer | ( | CatalogueData | data | ) |
Constructor for the SalePutUpDateComparer class.
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.
data | The data catalogue to work on |
Definition at line 19 of file SalePutUpDate.cs.
00020 { 00021 this.data = data; 00022 }
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.
x | The first customer | |
y | The second customer |
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.
x | The first customer | |
y | The second customer |
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 }