Ejemplo n.º 1
0
        /// <summary>
        /// 存储消息
        /// </summary>
        /// <param name="strSID"></param>
        /// <param name="strSMSContent"></param>
        public static void SaveMessage(string strSID, string strSMSContent)
        {
            int intSID = 0;
            int intOut = 0;

            intSID = Convert.ToInt32(Regex.Match(strSID, @"\d{2,15}").ToString());
            if (intSID > 0)
            {
                intOut = SqlLibrary.Fx_SaveMessage(intSID, strSMSContent);
                if (intOut == 0)
                {
                    Console.WriteLine("[收到:" + intSID + "消息!]\r\n");
                }
                else
                {
                    Console.WriteLine("[接收:" + intSID + "出错!]\r\n");
                }
            }
            else
            {
                Console.WriteLine("[用户传入SID出错!]");
            }
        }