public static List <MaintenanceClass> ReadAllMaintenanceClasses()
        {
            List <MaintenanceClass> AllMaintenanceClasses = new List <MaintenanceClass>();
            List <Maintenance>      AllMaintenances       = MaintenanceLogic.ReadAllMaintenances();

            foreach (var m in AllMaintenances)
            {
                MaintenanceClass MC = new MaintenanceClass(m.maintenanceID);
                AllMaintenanceClasses.Add(MC);
            }
            return(AllMaintenanceClasses);
        }
        public MaintenanceClass(long MaintenanceID)
        {
            maintenanceID = MaintenanceID;
            Maintenance _maintenance = MaintenanceLogic.SearchByID(maintenanceID);

            transportID = _maintenance.transportID;
            dateFrom    = _maintenance.dateFrom;
            dateUntil   = _maintenance.dateUntil;
            cost        = (decimal)_maintenance.cost;
            TypeCost TC = TypeCostLogic.SearchByID(_maintenance.typeCostID);

            service = (bool)TC.service;
            repair  = (bool)TC.repair;
        }
 public static void AddMaintenanceClass(long transportID, DateTime dateFrom, DateTime dateUntil, long typeCostID, decimal cost)
 {
     MaintenanceLogic.AddMaintenance(transportID, dateFrom, dateUntil, typeCostID, cost);
 }