Beispiel #1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        WebService.Send sms    = new WebService.Send();
        long[]          rec    = null;
        byte[]          status = null;

        //retval :
        // InvalidUserPass=0,
        // Successfull = 1,
        // NoCredit = 2,
        // DailyLimit = 3,
        // SendLimit = 4,
        // InvalidNumber = 5

        //Status :
        // Sent=0,
        // Failed=1

        int retval = sms.SendSms("demo", "demo", new string[] { "912245....", "9374659..." }, "1000...", "سلام", false, "", ref rec, ref status);

        Response.Write(retval);
        Response.Write("<br>");
        for (int i = 0; i < status.Length; i++)
        {
            Response.Write(status[i]);
        }
    }
    private static void SendSMS(string ToNumber, string smsText)
    {
        WebService.Send sms         = new WebService.Send();
        string          returnValue = sms.SendSimpleSMS2("9354188516", "2641", ToNumber, "50001060008959 ", smsText, true);

        //SMSService.SendSoapClient sms = new SMSService.SendSoapClient();
        //sms.SendSimpleSMS2(MainInfos.SMSUsername, MainInfos.SMSPassword,
        //    ToNumber, MainInfos.SMSNumber, smsText, true);
    }
 protected void Button2_Click(object sender, EventArgs e)
 {
     WebService.Send sms         = new WebService.Send();
     string          returnValue = sms.SendSimpleSMS2("9354188516", "2641", "09902609901", "50001060008959 ", "test2", true);
 }