Beispiel #1
0
        /// <summary>
        /// 通知短信网关
        /// Author Lihongtu
        /// </summary>
        /// <param name="PhoneNum"></param>
        /// <param name="Message"></param>
        /// <param name="SPID"></param>
        public static void SendMessageV2(string PhoneNum, string Message, string SPID)
        {
            string ErrMsg = "";
            string Result = "-19999";

            try
            {
                SmsClient sc = new SmsClient();
                sc.sendSingleSms("02120906193", PhoneNum, Message);
                Result = "0";
                ErrMsg = "发送成功";
            }
            catch (Exception e)
            {
                ErrMsg = e.ToString();
            }
            finally
            {
                string IsWriteLog = ConfigurationManager.AppSettings["IsWriteLog"];
                try
                {
                    if (IsWriteLog == "0")
                    {
                        CommonBizRules.WriteDataLog("35000000", "", "", int.Parse(Result), ErrMsg, PhoneNum, "SendMessage");
                    }
                }
                catch { }
            }
        }
Beispiel #2
0
 /// <summary>
 /// v3�汾��SPIDֱ�Ӵ��͸���������
 /// </summary>
 /// <param name="PhoneNum"></param>
 /// <param name="Message"></param>
 /// <param name="SPID"></param>
 public static void SendMessageV3(string PhoneNum, string Message, string SPID)
 {
     string ErrMsg = "";
     string Result = "-19999";
     try
     {
         SmsClient sc = new SmsClient();
         //sc.sendSingleSms("02120906193", PhoneNum, Message);
         sc.sendSingleSms(SPID, "02120906193", PhoneNum, Message);
         Result = "0";
         ErrMsg = "���ͳɹ�";
     }
     catch (Exception e)
     {
         ErrMsg = e.ToString();
     }
     finally
     {
         string IsWriteLog = ConfigurationManager.AppSettings["IsWriteLog"];
         try
         {
             if (IsWriteLog == "0")
             {
                 CommonBizRules.WriteDataLog(SPID, "", "", int.Parse(Result), ErrMsg, PhoneNum, "SendMessage");
             }
         }
         catch { }
     }
 }