Esempio n. 1
0
 public StartRentViewModel(ToyCar car, INavigation navigation)
 {
     Navigation  = navigation;
     ToyCarEntry = car;
     Minutes     = 10;
     Price       = 30;
 }
Esempio n. 2
0
        public ToyCarPage(ToyCar selectedCar)
        {
            InitializeComponent();

            tcvm           = new ToyCarViewModel(selectedCar, Navigation);
            BindingContext = tcvm;
        }
        public StartRentPage(ToyCar car)
        {
            InitializeComponent();
            srvm = new StartRentViewModel(car, Navigation);

            BindingContext = srvm;
        }
 public int SaveItem(ToyCar car)
 {
     if (car.CarId != 0)
     {
         database.Update(car);
         return(car.CarId);
     }
     else
     {
         return(database.Insert(car));
     }
 }
Esempio n. 5
0
 public void Reset()
 {
     toyCar = new ToyCar();
 }
 public ToyCarViewModel(ToyCar selectedCar, INavigation navigation)
 {
     ToyCarEntire = selectedCar;
     Navigation   = navigation;
 }