public static int SendSMS(string strToMobile, string strType, string strContent, string strValidateCode, ref string retResult) { int result = 0; ISMS iSMS = SMSProvider.Create(); if (iSMS != null) { iSMS.Mobile = strToMobile; iSMS.SMSContent = strContent; retResult = iSMS.SendMsg(); if (iSMS.IsSuccess) { SMSInfo entity = new SMSInfo { SMSMob = iSMS.Mobile, SMSText = iSMS.SMSContent, SMSType = strType, ValidateCode = strValidateCode, ReturnMsg = retResult, Status = 1, AutoTimeStamp = DateTime.Now }; result = BLL.SMS.Add(entity); } } return(result); }
public static ISMS Create() { return(SMSProvider.Create(ConfigProvider.Configs.SMSClass)); }