public async Task AddVehicleAsync(Vehicle vehicle)
        {
            try
            {
                Debug.WriteLine("Inserting vehicle...");
                await vehicles.InsertAsync(vehicle);
                Debug.WriteLine("Adding vehicle to offline database...");
                Items.Add(vehicle);
                Debug.WriteLine("Syncing offline database...");
                await SyncAsync();
            }
            catch
            {

            }
        }
 public async Task InsertVehicleAsync(Vehicle v)
 {
     Debug.WriteLine("Inserting vehicle " + v.Name);
     await vehicles.InsertAsync(v);
     Items.Add(v);
     await SyncAsync();
 }
Exemplo n.º 3
0
 public static async Task UpdateVehicleAsync(Vehicle v)
 {
     await App.MobileService.GetTable<Vehicle>().UpdateAsync(v);
 }
Exemplo n.º 4
0
 public static async Task RemoveVehicleAsync(Vehicle v)
 {
     await App.MobileService.GetTable<Vehicle>().DeleteAsync(v);
 }
Exemplo n.º 5
0
 public static async Task AddVehicleAsync(Vehicle v)
 {
   
     await App.MobileService.GetTable<Vehicle>().InsertAsync(v);
 }
        public VehicleViewModel(Vehicle v)
        {

        }