/** 对合买对象进行赋值 */
 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));
 }
  @Override
  public void errorCode_0000() {
    /** Add by pengcx 20130516 start */
    BeiJingSingleGameActivity.isBettingReturn = true;
    /** Add by pengcx 20130516 end */

    /** Add by pengcx 20130605 start */
    Intent intent = new Intent(this, BettingSuccessActivity.class);
    intent.putExtra("page", BettingSuccessActivity.BETTING);
    intent.putExtra("lotno", betAndGift.getLotno());
    intent.putExtra("amount", betAndGift.getAmount());
    startActivity(intent);
    /** Add by pengcx 20130605 end */
  }
 /** 投注提示框中的信息 */
 public void getTouzhuAlert() {
   if (type.equals("zc")) {
     zhushu.setText(betAndGift.getZhushu() + "注     ");
     jine.setText(
         iProgressQishu * (Integer.valueOf(betAndGift.getAmount()) / 100) * iProgressBeishu + "元");
   } else {
     zhushu.setText(ZixuanActivity.addView.getAllZhu() + "注     ");
     jine.setText(iProgressQishu * ZixuanActivity.addView.getAllAmt() * iProgressBeishu + "元");
   }
   //		return "注数:"
   //				+ ZixuanActivity.addView.getAllZhu() + "注     "
   //				+ "金额:" +
   //				+ iProgressQishu * ZixuanActivity.addView.getAllAmt() * iProgressBeishu
   //				+ "元";
 }
Example #4
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);
 }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   requestWindowFeature(Window.FEATURE_NO_TITLE);
   setContentView(R.layout.order_hemai);
   context = this;
   ApplicationAddview app = (ApplicationAddview) getApplicationContext();
   betAndGift = app.getPojo();
   addview = app.getAddview();
   if (Constants.type.equals("zc")) {
     allAtm = Integer.valueOf(betAndGift.getAmount()) / 100;
     //			mAmount = Integer.valueOf(betAndGift.getAmount());
     mZhushu = Integer.valueOf(betAndGift.getZhushu());
   } else {
     allAtm = iProgressQishu * addview.getAllAmt() * iProgressBeishu;
   }
   init();
   initRadioGroup();
 }