Esempio n. 1
0
        /// <summary>
        /// 生日提醒
        /// </summary>
        public static void AUTOALERTSR()
        {
            try
            {
                List <JH_Auth_QY> QyModel = new JH_Auth_QYB().GetEntities(d => d.ComId != 0).ToList();
                WXHelp            wx      = new WXHelp(QyModel[0]);

                var qdata = new JH_Auth_UserB().GetEntities(d => d.Birthday != null);
                foreach (var item in qdata)
                {
                    if (item.Birthday.Value.ToString("yyyy-MM-dd") == DateTime.Now.ToString("yyyy-MM-dd"))
                    {
                        Article ar0 = new Article();
                        ar0.Title       = "生日提醒";
                        ar0.Description = "";
                        ar0.Url         = "http://www.baidu.com";
                        ar0.PicUrl      = "";
                        List <Article> al = new List <Article>();
                        al.Add(ar0);
                        wx.SendTPMSG("XXFB", al, item.UserName);
                    }
                }
            }
            catch (Exception)
            {
            }
        }