@Override
 public void onSuccess(int arg0, Header[] arg1, byte[] arg2) {
   Result rs = XmlUtils.toBean(ResultBean.class, new ByteArrayInputStream(arg2)).getResult();
   if (rs.OK()) {
     AppContext.showToast("报名成功");
     mEventApplyDialog.dismiss();
     mDetail.getEvent().setApplyStatus(Event.APPLYSTATUS_CHECKING);
   } else {
     AppContext.showToast(rs.getErrorMessage());
   }
 }
  /** 显示活动报名对话框 */
  private void showEventApply() {

    if (mDetail.getEvent().getCategory() == 4) {
      UIHelper.openSysBrowser(getActivity(), mDetail.getEvent().getUrl());
      return;
    }

    if (!AppContext.getInstance().isLogin()) {
      UIHelper.showLoginActivity(getActivity());
      return;
    }
    if (mEventApplyDialog == null) {
      mEventApplyDialog = new EventApplyDialog(getActivity());
      mEventApplyDialog.setCanceledOnTouchOutside(true);
      mEventApplyDialog.setCancelable(true);
      mEventApplyDialog.setTitle("活动报名");
      mEventApplyDialog.setCanceledOnTouchOutside(true);
      mEventApplyDialog.setNegativeButton(R.string.cancle, null);
      mEventApplyDialog.setPositiveButton(
          R.string.ok,
          new DialogInterface.OnClickListener() {

            @Override
            public void onClick(DialogInterface d, int which) {
              EventApplyData data = null;
              if ((data = mEventApplyDialog.getApplyData()) != null) {
                data.setEvent(mId);
                data.setUser(AppContext.getInstance().getLoginUid());
                showWaitDialog(R.string.progress_submit);
                VGTimeApi.eventApply(data, mApplyHandler);
              }
            }
          });
    }

    mEventApplyDialog.show();
  }