예제 #1
0
        public void Add(DriverLicense driverLicense)
        {
            if (_list.Exists(item => item == driverLicense))
                return;

            _list.Add(driverLicense);
        }
예제 #2
0
        public License_AddEdit(DriverLicense license)
        {
            InitializeComponent();

            _license = license;
        }
예제 #3
0
        protected override void loadFromSql()
        {
            DataTable dt = _provider.Select("DriverLicense");

            foreach (DataRow row in dt.Rows)
            {
                DriverLicense driverLicense = new DriverLicense(row);
                Add(driverLicense);
            }
        }
예제 #4
0
        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;
        }