Пример #1
0
    public OrderDetailsViewModel(INavigation navigation, Order order)
    {

      //order.ClosedDate = DateTime.Today;
      Order = order;
      price = order.Price.ToString();
      discount = (double)order.Discount;

      this.Title = "Order Details";
      
      dataManager = DependencyService.Get<IDataManager>();
      this.navigation = navigation;
    }
Пример #2
0
      public async Task DeleteOrderAsync(Order item)
      {
        try
        {
          await orderTable.DeleteAsync(item);
          //await SyncOrders(); ;
        }
        catch (MobileServiceInvalidOperationException ex)
        {
          Debug.WriteLine(@"ERROR {0}", ex.Message);
        }
        catch (Exception ex2)
        {
          Debug.WriteLine(@"ERROR {0}", ex2.Message);
        }

      }
Пример #3
0
      public async Task SaveOrderAsync(Order item)
      { 
        if (item.Id == null)
          await orderTable.InsertAsync(item);
        else 
          await orderTable.UpdateAsync(item);

        //await SyncOrders();
      }