示例#1
0
        static void Main(string[] args)
        {
            OneSixtybyTwo o160 = new OneSixtybyTwo("username", "pass");

            o160.Login();
            o160.SendSms("10 digit phone", "Test Message");

            Way2Sms oway2 = new Way2Sms("username", "pass");

            oway2.Login();
            oway2.SendSms("10 digit phone", "Test Message");

            Console.WriteLine("Press any key to exit");
            Console.ReadLine();
        }
 public bool loginSMS()
 {
     try
     {
         wts = new Way2Sms(username, password);
         if (wts.Login())
         {
             return(true);
         }
         return(false);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
示例#3
0
        public int SendSMS()
        {
            int Result = 0;

            try
            {
                SoftmindWebservicesEntities Entities = new SoftmindWebservicesEntities();
                var     MessageResult = Entities.GetTodayMessage();
                Way2Sms oway2         = new Way2Sms("8866671361", "9825146475");
                oway2.Login();
                foreach (GetTodayMessage_Result Msg in MessageResult)
                {
                    String ContactNo   = Msg.MobileNo;
                    string Description = Msg.Description;
                    oway2.SendSms(ContactNo, Description);
                }
            }
            catch (Exception ex)
            {
            }
            return(Result);
        }