Esempio n. 1
0
  @SuppressWarnings("unused")
  private void openGridViewActivity(String orderRecordPath) {
    if (orderRecordPath == null) {
      openGridViewActivity();
      return;
    }

    CBOrder order = CBOrderFactory.loadOrder(orderRecordPath, CBResource.menuEngine.getMenuSet());

    openGridViewActivity(order);
  }
Esempio n. 2
0
  private void showOrderPrepareDialog() {
    OrderPrepareDialog dialog = new OrderPrepareDialog(this);

    ArrayList<String> locationList = CBSettings.getOrderLocationList();
    if (locationList == null) {
      locationList = new ArrayList<String>();
      for (int i = 0; i < 15; ++i) locationList.add("testing location " + i);
    }

    dialog.setCallback(
        new OrderPrepareDialog.Callback() {

          public void onSubmit() {
            openGridViewActivity();
          }

          public void onSelectedItemChanged(String item) {
            CBOrder order = CBResource.menuEngine.getOrder();
            if (order != null) {
              order.setLocation(item);
            }
          }

          public void onCancel() {}
        });

    dialog.setContentList(locationList);

    CBOrder order = CBOrderFactory.newOrder();
    CBResource.menuEngine.setOrder(order);

    order.setLocation(locationList.get(0));

    dialog.setSelectedItem(0);
    dialog.show();
  }
Esempio n. 3
0
 public void loadOrders(Date date) {
   mOrdersSet = CBOrderFactory.loadOrdersByDate(date, CBResource.menuEngine.getMenuSet());
 }