Exemple #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     UploadInfo ui = new UploadInfo();
     ui.form1 = this;
     string strReturn = ui.CouponAuth("3897", "3403", "1325207051877004");
     if (strReturn.Equals("OK"))
     {
         MessageBox.Show("成功!");
     }
     else if (strReturn.Equals("balance_error"))
     {
         MessageBox.Show("余额不足!");
     }
     else if (strReturn.Equals("sms_error"))
     {
         MessageBox.Show("短信发送失败!");
     }
     else
     {
         MessageBox.Show("未知错误!");
     }
 }
Exemple #2
0
        private void sendCode()
        {
            Random rand = new Random();
            String code = rand.Next(0, 10000).ToString("D4");
            checkCode = code;
            UploadInfo ui = new UploadInfo();

            string strReturn = ui.CouponAuth(GlobalVariables.LoginUserId, code, id);

            if (strReturn.Equals("sms_error"))
            {
                this.error.Text ="短信发送失败!请稍后重试。";
                return;
            }
            if (strReturn.Equals("balance_error"))
            {
                MyMsgBox mb = new MyMsgBox();
                mb.ShowMsg("对不起,您的余额不足!\n请及时充值", 2) ;
                this.Close();
            }
        }