예제 #1
0
 /** 对合买对象进行赋值 */
 public void setPojo() {
   RWSharedPreferences pre = new RWSharedPreferences(JoinStartActivity.this, "addInfo");
   sessionId = pre.getStringValue("sessionid");
   phonenum = pre.getStringValue("phonenum");
   userno = pre.getStringValue("userno");
   betAndGift.setBettype("startcase");
   betAndGift.setTotalAmt(betAndGift.getAmount());
   if (betAndGift.getIssuper().equals("0")) {
     betAndGift.setOneAmount("300");
   } else {
     betAndGift.setOneAmount("200");
   }
   betAndGift.setSafeAmt(isNull(PublicMethod.toFen(isNull(safeEdit.getText().toString()))));
   betAndGift.setBuyAmt(isNull(PublicMethod.toFen(isNull(buyEdit.getText().toString()))));
   betAndGift.setMinAmt(PublicMethod.toFen(isNull(minEdit.getText().toString())));
   betAndGift.setCommisionRation(commisionRation);
   betAndGift.setVisibility(visible);
   betAndGift.setBatchcode(PublicMethod.toIssue(betAndGift.getLotno()));
   betAndGift.setDescription(descriptionEdit.getText().toString());
   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));
 }
예제 #2
0
 public int getAmt(int zhuShu) {
   if (betAndGift != null) {
     return zhuShu * betAndGift.getAmt();
   } else {
     return 0;
   }
 }
예제 #3
0
 public void getCodeInfo(AddView addView) {
   for (int i = 0; i < balls.size(); i++) {
     String codeStr = getAddZhuma(i);
     CodeInfo codeInfo = addView.initCodeInfo(betAndGift.getAmt(), 1);
     codeInfo.addAreaCode(codeStr, Color.BLACK);
     codeInfo.setTouZhuCode(balls.get(i).getZhuma(balls, 1));
     addView.addCodeInfo(codeInfo);
   }
   addView.setIsJXcode(ballOne.getZhuma(balls, iProgressBeishu));
 }
예제 #4
0
 /** 初始化投注信息 */
 public void initBet() {
   betAndGift.setIsSellWays("1"); // 多注投
   betAndGift.setSessionid(sessionId);
   betAndGift.setPhonenum(phonenum);
   betAndGift.setUserno(userno);
   betAndGift.setBettype("bet"); // 投注为bet,赠彩为gift
   betAndGift.setLotmulti("" + iProgressBeishu); // lotmulti    倍数   投注的倍数
   betAndGift.setBatchnum("" + iProgressQishu); // batchnum    追号期数 默认为1(不追号)
   betAndGift.setBatchcode(PublicMethod.toIssue(betAndGift.getLotno()));
   betAndGift.setAmount(
       ""
           + addView.getSize()
               * iProgressBeishu
               * betAndGift.getAmt()
               * 100); // amount      金额 单位为分(总金额)
   //		betAndGift.setBet_code(ballOne.getZhuma(balls, iProgressBeishu));
   betAndGift.setBet_code(addView.getTouzhuCode(iProgressBeishu, betAndGift.getAmt() * 100));
   lotno = PublicMethod.toLotno(betAndGift.getLotno());
   betAndGift.setBatchcode(PublicMethod.toIssue(betAndGift.getLotno()));
 }
예제 #5
0
 /** 初始化投注信息 */
 public void initBet() {
   betAndGift.setIsSellWays("1");
   betAndGift.setAmount("" + addviewmiss.getAllAmt() * iProgressBeishu * 100);
   betAndGift.setSessionid(sessionId);
   betAndGift.setPhonenum(phonenum);
   betAndGift.setUserno(userno);
   betAndGift.setDescription("");
   betAndGift.setBettype("bet"); // 投注为bet,赠彩为gift
   betAndGift.setLotmulti("" + iProgressBeishu); // lotmulti    倍数   投注的倍数
   betAndGift.setBatchnum("" + iProgressQishu); // batchnum    追号期数 默认为1(不追号)
   betAndGift.setBet_code(addviewmiss.getTouzhuCode(iProgressBeishu, betAndGift.getAmt() * 100));
 }
예제 #6
0
 /** 直选机选投注提示框中的信息 */
 private String getTouzhuAlertJixuan() {
   int oneAmt = betAndGift.getAmt();
   int iZhushu = getZhushu();
   int beishu = mSeekBarBeishu.getProgress();
   return "注数:"
       + iZhushu
       + "注    "
       + "金额:"
       + (iZhushu * oneAmt * beishu)
       + "元"
       + "(冻结金额:"
       + (oneAmt * (mSeekBarQishu.getProgress() - 1) * iZhushu * beishu)
       + "元)";
 }
예제 #7
0
 /** 初始化投注信息 */
 public void initBet() {
   betAndGift.setIsSellWays("1");
   betAndGift.setAmount("" + addview.getAllAmt() * iProgressBeishu * 100);
   betAndGift.setSessionid(sessionId);
   betAndGift.setPhonenum(phonenum);
   betAndGift.setUserno(userno);
   betAndGift.setBettype("bet"); // 投注为bet,赠彩为gift
   betAndGift.setLotmulti("" + iProgressBeishu); // lotmulti    倍数   投注的倍数
   betAndGift.setBatchnum("" + iProgressQishu); // batchnum    追号期数 默认为1(不追号)
   betAndGift.setBet_code(addview.getTouzhuCode(iProgressBeishu, betAndGift.getAmt() * 100));
   lotno = PublicMethod.toLotno(betAndGift.getLotno());
   if (!type.equals("hight") && !type.equals("zc")) {
     betAndGift.setBatchcode(PublicMethod.toIssue(betAndGift.getLotno())); // 期号
   }
 }
예제 #8
0
 /** 赋值 */
 public void setValue() {
   SpannableStringBuilder builder = new SpannableStringBuilder();
   int beishu = Integer.parseInt(betAndGift.getLotmulti());
   allAtm = Integer.parseInt(betAndGift.getAmount()) / 100;
   zhu = allAtm / beishu / betAndGift.getAmt();
   String zhushuStr =
       "赠送注数:" + zhu + "注\n\n" + "赠送倍数:" + beishu + "倍\n\n" + "赠送金额:" + allAtm + "元";
   builder.append(zhushuStr);
   builder.setSpan(
       new ForegroundColorSpan(Color.RED),
       zhushuStr.length() - (Integer.toString(allAtm).length() + 1),
       zhushuStr.length(),
       Spanned.SPAN_COMPOSING);
   this.zhushu.setText(builder, BufferType.EDITABLE);
   // this.zhushu.setText(zhushuStr);
   this.zhuma.setText(zhumaStr);
 }
예제 #9
0
 /** 初始化投注信息 */
 public void initBet() {
   betAndGift.setIsSellWays("1");
   betAndGift.setAmount("" + addviewmiss.getAllAmt() * iProgressBeishu * 100);
   betAndGift.setSessionid(sessionId);
   betAndGift.setPhonenum(phonenum);
   betAndGift.setUserno(userno);
   betAndGift.setDescription("");
   betAndGift.setBettype("bet"); // 投注为bet,赠彩为gift
   betAndGift.setLotmulti("" + iProgressBeishu); // lotmulti    倍数   投注的倍数
   betAndGift.setBatchnum("" + iProgressQishu); // batchnum    追号期数 默认为1(不追号)
   betAndGift.setBet_code(addviewmiss.getTouzhuCode(iProgressBeishu, betAndGift.getAmt() * 100));
   lotno = PublicMethod.toLotno(betAndGift.getLotno());
   if (PublicMethod.toIssue(betAndGift.getLotno()) != null) {
     betAndGift.setBatchcode(PublicMethod.toIssue(betAndGift.getLotno())); // 期号
   }
   if (state == 2) {
     betAndGift.setSubscribeInfo(getSubstringforset());
   } else {
     betAndGift.setSubscribeInfo("");
   }
 }
예제 #10
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();
  }