public override void Initialize(INavigationParameters parameters)
 {
     if (parameters.TryGetValue("ViewLackModel", out ViewLackModel model) &&
         model.IsValidDefaultValues())
     {
         Model = model;
     }
     else
     {
         NavigationService.GoBackAsync();
     }
 }
        public ViewLackPageViewModel(INavigationService navigationService,
                                     IBarcodeReaderService barcodeReaderService,
                                     IStatusBarService statusBarService,
                                     INotificationService notificationService,
                                     IBoardingService boardingService,
                                     ILandingService landingService)
            : base(navigationService, barcodeReaderService, statusBarService)
        {
            _notificationService = notificationService;
            _boardingService     = boardingService;
            _landingService      = landingService;

            Model = new ViewLackModel();
        }
예제 #3
0
        private async void ViewLackCommandHandler()
        {
            if (Model.VehicleViewInfo != null)
            {
                var viewLackModel = new ViewLackModel()
                {
                    LackType = LackTypeEnum.Landing,
                    TrafficScheduleDetailId = Model.VehicleViewInfo.TrafficScheduleDetailId,
                    Vehicle            = Model.VehicleViewInfo.CarNumber,
                    VehicleDescription = Model.VehicleViewInfo.Plate,
                    Date                 = Model.VehicleViewInfo?.TrafficScheduleDateTime.ToString("dd/MM/yyyy HH:mm"),
                    TrafficSchedule      = Model.VehicleViewInfo.TrafficScheduleId.ToString(),
                    Line                 = Model.VehicleViewInfo.LineCode,
                    VehicleLineIsVisible = true,
                    LineIsVisible        = true
                };

                await NavigationService.NavigateAsync("ViewLackPage", new NavigationParameters()
                {
                    { "ViewLackModel", viewLackModel }
                });
            }
        }