private void BindData()
 {
     string name = base._Site.SiteOptions["Opt_ISP_UserID"].Value.ToString();
     string password = base._Site.SiteOptions["Opt_ISP_UserPassword"].Value.ToString();
     if ((name == "") || (password == ""))
     {
         PF.GoError(1, "查询短信服务器失败,可能是参数设置错误。", base.GetType().BaseType.FullName);
     }
     else
     {
         SMS.Eucp.Gateway.Gateway gateway = new SMS.Eucp.Gateway.Gateway(name, password);
         CallResult balance = gateway.GetBalance();
         CallResult price = gateway.GetPrice();
         if (balance.Code < 0)
         {
             PF.GoError(1, "查询短信服务器失败,查询余额时:" + balance.Description, base.GetType().BaseType.FullName);
         }
         else if (price.Code < 0)
         {
             PF.GoError(1, "查询短信服务器失败,查询单价时:" + price.Description, base.GetType().BaseType.FullName);
         }
         else
         {
             this.Label1.Text = balance.Value.ToString() + " 元";
             this.Label2.Text = price.Value.ToString() + " 元/条";
             this.Label3.Text = "服务商不提供此数据";
             this.Label4.Text = "服务商不提供此数据";
             this.Label5.Text = "服务商不提供此数据";
             this.Label6.Text = "服务商不提供此数据";
         }
     }
 }
Exemple #2
0
    private void BindData()
    {
        string name     = base._Site.SiteOptions["Opt_ISP_UserID"].Value.ToString();
        string password = base._Site.SiteOptions["Opt_ISP_UserPassword"].Value.ToString();

        if ((name == "") || (password == ""))
        {
            PF.GoError(1, "查询短信服务器失败,可能是参数设置错误。", base.GetType().BaseType.FullName);
        }
        else
        {
            SMS.Eucp.Gateway.Gateway gateway = new SMS.Eucp.Gateway.Gateway(name, password);
            CallResult balance = gateway.GetBalance();
            CallResult price   = gateway.GetPrice();
            if (balance.Code < 0)
            {
                PF.GoError(1, "查询短信服务器失败,查询余额时:" + balance.Description, base.GetType().BaseType.FullName);
            }
            else if (price.Code < 0)
            {
                PF.GoError(1, "查询短信服务器失败,查询单价时:" + price.Description, base.GetType().BaseType.FullName);
            }
            else
            {
                this.Label1.Text = balance.Value.ToString() + " 元";
                this.Label2.Text = price.Value.ToString() + " 元/条";
                this.Label3.Text = "服务商不提供此数据";
                this.Label4.Text = "服务商不提供此数据";
                this.Label5.Text = "服务商不提供此数据";
                this.Label6.Text = "服务商不提供此数据";
            }
        }
    }
Exemple #3
0
    private void BindData()
    {
        string Betting_SMS_UserID       = _Site.SiteOptions["Opt_ISP_UserID"].Value.ToString();
        string Betting_SMS_UserPassword = _Site.SiteOptions["Opt_ISP_UserPassword"].Value.ToString();

        if ((Betting_SMS_UserID == "") || (Betting_SMS_UserPassword == ""))
        {
            PF.GoError(ErrorNumber.Unknow, "查询短信服务器失败,可能是参数设置错误。", this.GetType().BaseType.FullName);

            return;
        }

        SMS.Eucp.Gateway.Gateway    segg    = new SMS.Eucp.Gateway.Gateway(Betting_SMS_UserID, Betting_SMS_UserPassword);
        SMS.Eucp.Gateway.CallResult Result1 = segg.GetBalance();
        SMS.Eucp.Gateway.CallResult Result2 = segg.GetPrice();

        if (Result1.Code < 0)
        {
            PF.GoError(ErrorNumber.Unknow, "查询短信服务器失败,查询余额时:" + Result1.Description, this.GetType().BaseType.FullName);

            return;
        }

        if (Result2.Code < 0)
        {
            PF.GoError(ErrorNumber.Unknow, "查询短信服务器失败,查询单价时:" + Result2.Description, this.GetType().BaseType.FullName);

            return;
        }

        Label1.Text = Result1.Value + " 元";
        Label2.Text = Result2.Value + " 元/条";
        Label3.Text = "服务商不提供此数据";
        Label4.Text = "服务商不提供此数据";
        Label5.Text = "服务商不提供此数据";

        Label6.Text = "服务商不提供此数据";
    }