예제 #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
  private void isAgencyNet() {
    RWSharedPreferences pre = new RWSharedPreferences(this, "addInfo");
    String userno = pre.getStringValue(ShellRWConstants.USERNO);
    String phonenum = pre.getStringValue(ShellRWConstants.PHONENUM);
    String toPhonenum = userName.getText().toString();
    String amout = userAmt.getText().toString();
    String password = userPassword.getText().toString();

    if (toPhonenum == null || toPhonenum.equals("")) {
      Toast.makeText(context, "您输入的用户名不能为空!", Toast.LENGTH_SHORT).show();
    } else if (amout == null || amout.equals("")) {
      Toast.makeText(context, "您输入的金额不能为空!", Toast.LENGTH_SHORT).show();
    } else if (password == null || password.equals("")) {
      Toast.makeText(context, "您输入的密码不能为空!", Toast.LENGTH_SHORT).show();
    } else if (Integer.parseInt(amout.substring(0, 1)) == 0) {
      Toast.makeText(context, "您输入的金额第一位数不能为零", Toast.LENGTH_SHORT).show();
    } else if (amout.length() > 5) {
      Toast.makeText(context, "您输入的金额不能超过10万元!", Toast.LENGTH_SHORT).show();
    } else if (Integer.parseInt(amout) == 0) {
      Toast.makeText(context, "您输入的金额不能为零!", Toast.LENGTH_SHORT).show();
    } else {
      amout = PublicMethod.toFen(amout);
      agencyNet(userno, phonenum, toPhonenum, amout, password);
    }
  }
예제 #3
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();
  }