コード例 #1
0
  private void doShare() {

    if (!NetUtil.isConnect(getActivity())) {
      ErrorDialogUtil.showErrorDialog(
          getActivity(), CloudStatusCodeProxy.TYPE_MEASURE, LocalCode.CODE_18100, true);
    } else {

      if (isRecentState) {
        recentFragment.doShare();
      } else {
        monthFragment.doShare();
      }
    }
  }
コード例 #2
0
  @Override
  public void doShare(
      Context context, HashMap<String, FetalMovement> params, ITaskCallback callBack) {
    FetalMovement fh = params.get(FetalMovement.class.getName());
    String uid = fh.getMeasureUID();
    FetalMovement tmp = getMeasureFetalMovement(uid);

    if (!NetUtil.isConnect(context)) {
      callBack.onComplete(LocalCode.CODE_18100, null);
    } else {
      if (tmp.getRecordID() == null) {
        callBack.onComplete(LocalCode.CODE_18101, null);
        mModule =
            CloudMeasureModuleCentreRoot.getInstance()
                .obtain(getAccountAttached(), MCloudDevice.FM);
        mModule.getCacheController().getNewItemsFromServer(null, null, new TaskHost() {});
        accurateShare(context, tmp);
      } else {
        accurateShare(context, tmp);
      }
    }
  }