Exemplo n.º 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));
 }
Exemplo n.º 2
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));
 }
Exemplo n.º 3
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());
   betAndGift.setBatchcode(PublicMethod.toIssue(betAndGift.getLotno())); // 期号
 }
 public void initBettingInfo() {
   betAndGift.setSessionid(sessionId);
   betAndGift.setPhonenum(phonenum);
   betAndGift.setUserno(userno);
   betAndGift.setBettype("bet");
   betAndGift.setAmount("" + getBettingAccount() * 100);
   betAndGift.setLotmulti("" + getBettingMutile());
   betAndGift.setBet_code(getBettingCode());
   betAndGift.setIsSellWays("1");
   betAndGift.setBatchnum("1");
   betAndGift.setBatchcode(nowIssueString);
   betAndGift.setLotno(lotnoString);
 }
Exemplo n.º 5
0
 private void initBetPojo(
     String zhuma, String issue, String lotMulti, String lotno, String amount, String oneAmount) {
   initPojo();
   betPojo.setPhonenum(phonenum);
   betPojo.setSessionid(sessionid);
   betPojo.setUserno(userno);
   betPojo.setBet_code(zhuma);
   betPojo.setLotno(lotno);
   betPojo.setBatchnum(issue);
   betPojo.setLotmulti(lotMulti);
   betPojo.setBettype("bet");
   betPojo.setAmount(amount);
   betPojo.setAmt(0);
   betPojo.setIsSellWays("1");
   betPojo.setOneAmount(oneAmount);
 }
Exemplo n.º 6
0
 private void initBetPojo(
     String zhuma, String lotno, String amount, String beishu, String lomit, String oneAmount) {
   initPojo();
   betPojo.setPhonenum(phonenum);
   betPojo.setSessionid(sessionid);
   betPojo.setUserno(userno);
   betPojo.setBet_code(zhuma);
   betPojo.setLotmulti(beishu);
   betPojo.setLotno(lotno);
   betPojo.setBatchnum("1");
   betPojo.setBettype("bet");
   betPojo.setAmount(
       Integer.valueOf(amount) / Integer.valueOf(lomit) * Integer.valueOf(beishu) + "");
   betPojo.setAmt(0);
   betPojo.setOneAmount(oneAmount);
   betPojo.setIsSellWays("1");
 }
  private void addViewAndTouZhu(int redSize, int blueSize) {
    long betNums = caculateBetNums(redSize, blueSize);

    if (betNums > 10000) {
      dialogExcessive(10000);
    } else {
      BetAndGiftPojo betAndGiftPojo = new BetAndGiftPojo();

      String sessionid = shellRW.getStringValue("sessionid");
      String phonenum = shellRW.getStringValue("phonenum");
      String userno = shellRW.getStringValue("userno");
      String lotno = Constants.LOTNO_SSQ;

      betAndGiftPojo.setSessionid(sessionid);
      betAndGiftPojo.setPhonenum(phonenum);
      betAndGiftPojo.setUserno(userno);
      betAndGiftPojo.setBettype("bet");
      betAndGiftPojo.setBet_code("");
      betAndGiftPojo.setLotmulti("1");
      betAndGiftPojo.setBatchnum("1");
      betAndGiftPojo.setSellway("0");
      betAndGiftPojo.setLotno(lotno);
      betAndGiftPojo.setZhushu(String.valueOf(betNums));
      betAndGiftPojo.setAmount("" + betNums * 200);
      betAndGiftPojo.setIsSellWays("1");

      AddViewMiss addViewMiss = new AddViewMiss(this);
      CodeInfoMiss codeInfo = addViewMiss.initCodeInfo(2, 1);
      codeInfo.setTouZhuCode(
          SsqZiZhiXuanCode.simulateZhuma(selectedRedBallList, selectedBlueBallList));
      codeInfo.setZhuShu(Integer.valueOf(String.valueOf(betNums)));
      codeInfo.setAmt(Integer.valueOf(String.valueOf(betNums * 2)));
      codeInfo = setCodeInfoColor(codeInfo, selectedRedBallList, selectedBlueBallList);
      addViewMiss.addCodeInfo(codeInfo);

      ApplicationAddview app = (ApplicationAddview) getApplicationContext();
      app.setPojo(betAndGiftPojo);
      app.setAddviewmiss(addViewMiss);
      Intent intent = new Intent(SimulateSelectNumberActivity.this, OrderDetails.class);
      startActivity(intent);
    }
  }
Exemplo n.º 8
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("");
   }
 }
Exemplo n.º 9
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();
  }