Exemple #1
0
 public BindingList <VehicleOwner> GetOwnerList(Database database)
 {
     if (ownerList == null)
     {
         ownerList = new BindingList <VehicleOwner>(VehicleOwner.LoadList(database, this));
     }
     return(ownerList);
 }
Exemple #2
0
        public void RemoveOwner(VehicleOwner vehicleOwner)
        {
            if (removedItems == null)
            {
                removedItems = new List <VehicleOwner>();
            }

            removedItems.Add(vehicleOwner);
            ownerList.Remove(vehicleOwner);
        }
Exemple #3
0
        public void AddOwner(Contractor contractor)
        {
            Owner = contractor;

            if (ownerList == null)
            {
                ownerList = new BindingList <VehicleOwner>();
            }

            DateTime     dateFrom = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
            VehicleOwner owner    = new VehicleOwner(this, contractor, dateFrom);

            ownerList.Add(owner);
        }