Example #1
0
        public ViewResult Preview()
        {
            Insurance.Services.DTO.QueryCriteriaDTO criteria = SessionHelper.Current.Criteria as Insurance.Services.DTO.QueryCriteriaDTO;
            int selectedTemplateId = SessionHelper.Current.SelectedTemplateId;

            var recepients      = _insuranceServices.GetContracts(criteria);
            var previewMessages = _smsServices.ConstructSMSMessages(recepients, selectedTemplateId);

            return(View(previewMessages));
        }
Example #2
0
        public ViewResult BulkSmsResult()
        {
            Insurance.Services.DTO.QueryCriteriaDTO criteria = SessionHelper.Current.Criteria as Insurance.Services.DTO.QueryCriteriaDTO;
            int selectedTemplateId = SessionHelper.Current.SelectedTemplateId;
            var recepients         = _insuranceServices.GetContracts(criteria);
            var previewMessages    = _smsServices.ConstructSMSMessages(recepients, selectedTemplateId);
            var sessionId          = _smsServices.SendBulkSMS(previewMessages, GetDefaultSmsGateWayCookie().Value);

            ViewBag.SessionId = sessionId;
            return(View());
        }