Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 public static void AddMaintenanceClass(long transportID, DateTime dateFrom, DateTime dateUntil, long typeCostID, decimal cost)
 {
     MaintenanceLogic.AddMaintenance(transportID, dateFrom, dateUntil, typeCostID, cost);
 }