Exemplo n.º 1
0
 private void PayForm_Load(object sender, EventArgs e)
 {
     try
     {
         timer1.Interval     = 1000;
         timerQuery.Interval = 5000;
         string outmsg = "";
         payInfoList = new List <CommonData.PayPrarmsData>();
         ReturnData.DoGetPayPrarms(out payInfoList, out outmsg);
         if (payInfoList.Count == 2)
         {
             for (int i = 0; i < payInfoList.Count; i++)
             {
                 if (string.Compare(payInfoList[i].ConfigCode, "RenewalWay1") == 0)
                 {
                     rbRenewal1.Text    = payInfoList[i].RenewalTime + "个月";
                     rbRenewal1.Checked = true;
                 }
                 if (string.Compare(payInfoList[i].ConfigCode, "RenewalWay2") == 0)
                 {
                     rbRenewal2.Text = payInfoList[i].RenewalTime + "个月";
                 }
             }
         }
         payData = new CommonData.PayData
         {
             Account     = Global.userMsgData.Account,
             IsPreCreate = false,
             IsPay       = false
         };
         TimeTick               = 120;
         timer1.Enabled         = false;
         timerQuery.Enabled     = false;
         lbTimeTick.Text        = "0";
         btnCreatQRCode.Enabled = true;
         btnCancelOrder.Enabled = false;
         lbAccount.Text         = Global.userMsgData.Account;
         lbFailrueDateTime.Text = Global.userMsgData.FailureDateTime.ToLongDateString();
         //FormClosing += PayForm_FormClosing;
     }
     catch (Exception ex)
     {
         Log.Error("[" + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "][" + System.Reflection.MethodBase.GetCurrentMethod().Name + "] err" + ex);
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 2
0
 private void SetPayPrarmForm_Load(object sender, EventArgs e)
 {
     try
     {
         string retmsg = "";
         payinfolist = new List <CommonData.PayPrarmsData>();
         int ret = ReturnData.DoGetPayPrarms(out payinfolist, out retmsg);
         if (ret == 0)
         {
             tbPrice1.Text = payinfolist[0].Price;
             tbTime1.Text  = payinfolist[0].RenewalTime;
             tbPrice2.Text = payinfolist[1].Price;
             tbTime2.Text  = payinfolist[1].RenewalTime;
         }
     }
     catch (Exception ex)
     {
         Log.Error("[" + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "][" + System.Reflection.MethodBase.GetCurrentMethod().Name + "] err" + ex);
         MessageBox.Show(ex.Message);
     }
 }