コード例 #1
0
  /** 赠送彩票联网 */
  public void giftNet() {
    isMsg = false;
    betAndGift.setBettype("gift");
    betAndGift.setAmount(PublicMethod.toFen(Integer.toString(allAtm)));
    betAndGift.setTo_mobile_code(editPhone.getText().toString().replace(",", ","));
    betAndGift.setAdvice(editLanguage.getText().toString());
    showDialog(0); // 显示网络提示框 2010/7/4
    // 加入是否改变切入点判断 陈晨 8.11
    Thread t =
        new Thread(
            new Runnable() {
              String str = "00";

              @Override
              public void run() {
                str = BetAndGiftInterface.getInstance().betOrGift(betAndGift);
                try {
                  obj = new JSONObject(str);
                  message = obj.getString("message");
                  String error = obj.getString("error_code");
                  handler.handleMsg(error, message);
                } catch (JSONException e) {
                  e.printStackTrace();
                }
                progressdialog.dismiss();
              }
            });
    t.start();
  }
コード例 #2
0
  /** 赠送彩票联网 */
  public void giftNet() {
    isMsg = false;
    betAndGift.setSessionid(sessionId);
    betAndGift.setPhonenum(phonenum);
    betAndGift.setUserno(userno);
    betAndGift.setLotmulti("" + iProgressBeishu); // lotmulti    倍数   投注的倍数
    betAndGift.setBatchnum("" + iProgressQishu); // batchnum    追号期数 默认为1(不追号)
    betAndGift.setAmount("" + ZixuanActivity.addView.getAllAmt() * iProgressBeishu * 100);
    betAndGift.setIsSellWays("1");
    betAndGift.setBet_code(
        ZixuanActivity.addView.getTouzhuCode(iProgressBeishu, betAndGift.getAmt() * 100));
    betAndGift.setBettype("gift");
    lotno = PublicMethod.toLotno(betAndGift.getLotno());
    betAndGift.setBatchcode(PublicMethod.toIssue(betAndGift.getLotno())); // 期号
    betAndGift.setTo_mobile_code(editPhone.getText().toString().replace(",", ","));
    betAndGift.setAdvice(editLanguage.getText().toString());
    showDialog(0); // 显示网络提示框 2010/7/4
    // 加入是否改变切入点判断 陈晨 8.11
    Thread t =
        new Thread(
            new Runnable() {
              String str = "00";

              @Override
              public void run() {
                str = BetAndGiftInterface.getInstance().betOrGift(betAndGift);
                try {
                  obj = new JSONObject(str);
                  message = obj.getString("message");
                  String error = obj.getString("error_code");
                  handler.handleMsg(error, message);
                } catch (JSONException e) {
                  e.printStackTrace();
                }
                progressdialog.dismiss();
              }
            });
    t.start();
  }