Exemplo n.º 1
0
        /// <summary>
        /// 取酒短信
        /// </summary>
        /// <param name="mobile"></param>
        /// <param name="descr"></param>
        /// <param name="vercode"></param>
        /// <returns></returns>
        public static bool MobileMesSendByTemp4(string mobile, string nowdate, string stoname, string descr, string otelphone, string vercode)
        {
            bool   Flag    = false;
            string SendKey = "mob_" + mobile;

            Flag = NetEaseNoteInterface.SendTemplateByNetEase("temp4", new string[1] {
                mobile
            }, new string[5] {
                nowdate, stoname, descr, otelphone, vercode
            });
            if (Flag)
            {
                WebCache.Insert(SendKey, vercode, 5);
            }
            return(Flag);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 发送手机短信
        /// </summary>
        /// <param name="mobile"></param>
        /// <param name="vercode">返回验证码</param>
        /// <returns></returns>
        public static bool MobileMesSendByTemp1(string mobile, string descr, ref string vercode)
        {
            bool   Flag    = false;
            string SendKey = "mob_" + mobile;
            Random rd      = new Random();

            vercode = rd.Next(100001, 999999).ToString();
            Flag    = NetEaseNoteInterface.SendTemplateByNetEase("temp1", new string[1] {
                mobile
            }, new string[2] {
                descr, vercode
            });
            if (Flag)
            {
                WebCache.Insert(SendKey, vercode, 5);
                //MemCached.AddOrReplaceCache<string>(SendKey, vercode, DateTime.Now.AddMinutes(5));
            }
            return(Flag);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 存酒短信
        /// </summary>
        /// <param name="mobile"></param>
        /// <param name="descr"></param>
        /// <param name="vercode"></param>
        /// <returns></returns>
        public static bool MobileMesSendByTemp3(string mobile, string savetime, string stoname, string descr, string endtime, ref string vercode)
        {
            bool   Flag    = false;
            string SendKey = "mob_" + mobile;

            if (vercode.Length == 0)
            {
                Random rd = new Random();
                vercode = rd.Next(100001, 999999).ToString();
            }
            Flag = NetEaseNoteInterface.SendTemplateByNetEase("temp3", new string[1] {
                mobile
            }, new string[5] {
                savetime, stoname, descr, endtime, vercode
            });
            if (Flag)
            {
                WebCache.Insert(SendKey, vercode, 5);
            }
            return(Flag);
        }