Exemplo n.º 1
0
 protected void btnGmCharge_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckManager())
         {
             var count = ConvertHelper.ConvertToInt(txtGmPoint.Text);
             if (count < 0)
             {
                 ShowMessage("数量不能小于0");
                 return;
             }
             if (count > 5000)
             {
                 ShowMessage("一次发送不能超过5000");
                 return;
             }
             string billingId = Guid.NewGuid().ToString();
             var    code      = WebServerHandler.Charge(_account.ZoneId, _account.Account, EnumChargeSourceType.GmCharge, 0, 0, count, billingId);
             if (code == 0)
             {
                 SaveAdminLog(EnumAdminOperationType.GmCharge, string.Format("gm charge,Count:{0},BillingId:{1}", count, billingId));
             }
             ShowMessage("Gm充值:" + code);
         }
     }
     catch (Exception ex)
     {
         LogHelper.Insert(ex);
         ShowMessage(ex.Message);
     }
 }
Exemplo n.º 2
0
 protected void btnSendPoint_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckManager())
         {
             var count = ConvertHelper.ConvertToInt(txtPointCount.Text);
             if (count < 0)
             {
                 ShowMessage("数量不能小于0");
                 return;
             }
             if (count > 5000)
             {
                 ShowMessage("一次发送不能超过5000");
                 return;
             }
             var code = WebServerHandler.Charge(_account.ZoneId, _account.Account, EnumChargeSourceType.AdminSend, 0, 0, count, Guid.NewGuid().ToString());
             if (code == 0)
             {
                 SaveAdminLog(EnumAdminOperationType.SendPoint, string.Format("Point:{0}", count));
             }
             ShowMessage("添加点券:" + code);
         }
     }
     catch (Exception ex)
     {
         LogHelper.Insert(ex);
         ShowMessage(ex.Message);
     }
 }