public void Add(DriverLicense driverLicense) { if (_list.Exists(item => item == driverLicense)) return; _list.Add(driverLicense); }
public License_AddEdit(DriverLicense license) { InitializeComponent(); _license = license; }
protected override void loadFromSql() { DataTable dt = _provider.Select("DriverLicense"); foreach (DataRow row in dt.Rows) { DriverLicense driverLicense = new DriverLicense(row); Add(driverLicense); } }
private int Compare(DriverLicense license1, DriverLicense license2) { if (license1.DateEnd == license2.DateEnd) return DateTime.Compare(license1.DateBegin, license2.DateBegin) * -1; return DateTime.Compare(license1.DateEnd, license2.DateEnd) * -1; }