public TyreViewModel(IPageService pageService, string authToken)
        {
            restServices     = new RestServices();
            this.pageService = pageService;
            Task.Run(async() =>
            {
                VehicleList   = await restServices.GetVehicleList((Application.Current as App).UserAuthToken);
                VehicleNoList = VehicleList.Select(l => l.VehicleNo).ToList();
            });

            SameTyre          = new Tyre();
            DifferentTypeTyre = new DifferentTypeTyre
            {
                FrontTyre = new Tyre(),
                RearTyre  = new Tyre()
            };
            TyreStatusList = new List <string>()
            {
                CommonConstants.NewTyreType,
                CommonConstants.OldTyreType
            };

            SubmitCommand = new Command <string>(async(type) => await Submit(type));
        }
Пример #2
0
 public async Task GetVehicleList()
 {
     VehicleList = await restServices.GetVehicleList((Application.Current as App).UserAuthToken);
 }