/*
   * (non-Javadoc)
   *
   * @see android.support.v4.app.Fragment#onStart()
   */
  @Override
  public void onStart() {
    super.onStart();

    started = true;

    layoutCustomer();

    ((AutoCompleteTextView) getView().findViewById(R.id.autoCompleteTextViewCustomerId))
        .setAdapter(
            new ArrayAdapter<String>(
                getActivity(), android.R.layout.simple_list_item_1, DAO.GetAllCustomerIDs()));
  }
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    if (savedInstanceState == null) {
      return;
    }

    if (savedInstanceState.containsKey("customer.id")) {
      customer = DAO.FindCustomerById(savedInstanceState.getString("customer.id"));
    }

    layoutCustomer();
  }
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    if (savedInstanceState == null) {
      return;
    }

    if (savedInstanceState.containsKey("hideControls")) {
      setHideControls(savedInstanceState.getBoolean("hideControls"));
    }

    if (savedInstanceState.containsKey("customer.id")) {
      setCustomer(DAO.FindCustomerById(savedInstanceState.getString("customer.id")));
    } else {
      setCustomer(null);
    }
  }