示例#1
0
        public bool ActualizarKilometrajeMantto(CheckList checkList)
        {
            VehiclesApiController vehiclesController = new VehiclesApiController();

            Vehicle vehicle = (Vehicle)vehiclesController.GetVehicleByPlate(checkList.Placa);

            vehicle.KUMantto = checkList.Kilometraje;
            vehicle.FUMantto = checkList.Fecha;

            Debug.Print(JsonConvert.SerializeObject(vehicle));

            vehiclesController.PutVehicle(vehicle.IdVehiculo, vehicle);

            return(true);
        }
示例#2
0
        public bool Actualizar_KilometrajoVehiculo(CheckList checkList)
        {
            VehiclesApiController vehiclesController = new VehiclesApiController();

            Vehicle vehicle = db.Vehicles.FirstOrDefault(x => x.Placa == checkList.Placa);

            Debug.Print("\n\n" + JsonConvert.SerializeObject(vehicle) + "\n\n");

            vehicle.Kilometraje = checkList.Kilometraje;

            if (checkList.BanderaMantto == 2 && checkList.Mantto == "1")
            {
                vehicle.FUMantto = checkList.Fecha;
                vehicle.KUMantto = checkList.Kilometraje;
            }

            vehiclesController.PutVehicle(vehicle.IdVehiculo, vehicle);

            return(true);
        }