Пример #1
0
        public ActionResult Index()
        {
            string        Message         = "";
            List <string> MailReciepients = new List <string> {
                "*****@*****.**", "*****@*****.**", "*****@*****.**"
            };
            List <string> SMSReciepients = new List <string> {
                "08091429800", "07067047227"
            };

            /////////////Send email to persons
            //KeyValuePair<bool,string> EmailResp = util.SendEmailToPersons("*****@*****.**", MailReciepients, "Test", "Testing Send E-Mail to persons", DateTime.Now);
            //Message+=EmailResp.Value;

            ////////////Send SMS to Person
            //string smsrespmsg="";
            //foreach (string person in SMSReciepients)
            //{
            //KeyValuePair<bool,string> SMSresp = util.SendSMSToPerson("PAARSystem",person,"Hello, Testing SMS to Person");
            //smsrespmsg += "#" + SMSresp.Value + "#";
            //}
            //Message += ":::SMS Response=>" + smsrespmsg;

            ///////////Send SMS to Persons
            //KeyValuePair<bool, string> SMSResp = util.SendSMSToPersons("PAARSystem", SMSReciepients, "Testing Multiple persons SMS");
            //Message += ":::SMS Response=>" + SMSResp.Value;

            ////////////Send Notification to Persons
            KeyValuePair <bool, string> NotifResponse = util.SendNotificationToRole("Kunle", "Administrator", "Test", "Testing Notification to Persons");

            Message += NotifResponse.Value;

            return(Content(Message));
        }