Exemplo n.º 1
0
        public DataTable ToDataTable(Status status)
        {
            switch (status)
            {
            case Status.Buy:
                return(ToDataTableBuy());

            case Status.Actual:
                return(ToDataTableActual());

            case Status.Repair:
                return(RepairList.getInstance().ToDataTable());

            case Status.Sale:
                return(CarSaleList.getInstance().ToDataTable());

            case Status.Invoice:
                return(InvoiceList.getInstance().ToDataTable());

            case Status.Policy:
                return(PolicyList.getInstance().ToDataTable());

            case Status.DTP:
                return(DTPList.getInstance().ToDataTable());

            case Status.Violation:
                return(ViolationList.getInstance().ToDataTable());

            case Status.DiagCard:
                return(DiagCardList.getInstance().ToDataTable());

            case Status.TempMove:
                return(TempMoveList.getInstance().ToDataTable());

            case Status.ShipPart:
                return(ShipPartList.getInstance().ToDataTable());

            case Status.Account:
                return(AccountList.GetInstance().ToDataTable());

            case Status.AccountViolation:
                return(ViolationList.getInstance().ToDataTableAccount());

            case Status.FuelCard:
                return(FuelCardList.getInstance().ToDataTable());

            case Status.Driver:
                return(DriverList.getInstance().ToDataTable());

            default:
                return(ToDataTable());
            }
        }
Exemplo n.º 2
0
        public Driver GetDriver(Car car, DateTime date)
        {
            var driverCars = from driverCar in list
                             where driverCar.isDriverCar(car, date)
                             orderby driverCar.dateEnd descending, driverCar.Number descending
            select driverCar;

            TempMoveList tempMoveList = TempMoveList.getInstance();

            Driver driver = tempMoveList.getDriver(car, date);

            return((driver == null) ? getDriver(driverCars.ToList()) : driver);
        }