Example #1
0
        /// <summary>
        /// 生命周期新加或者修改后给使用人发送短信
        /// </summary>
        /// <param name="ZCGLID"></param>
        public void SENDZCGLMSG(int ZCGLID)
        {
            SZHL_ZCGL ZC = new SZHL_ZCGLB().GetEntity(d => d.ID == ZCGLID);

            if (ZC != null)
            {
                JH_Auth_User USER = new JH_Auth_UserB().GetEntity(d => d.UserName == ZC.UserName);
                if (USER != null)
                {
                    string phone   = "13980444473";
                    string host    = CommonHelp.GetConfig("HostUrl");
                    string url     = CommonHelp.GetShortUrl(host + "/WX/bgxt/zc_Detail.html?id=" + ZCGLID);
                    string content = ZC.Name + "的生命周期发生变动,请查看" + url;
                    if (phone.Trim().Length > 0)
                    {
                        string message = "尊敬的" + USER.UserRealName.Trim() + "," + content;
                        if (CommonHelp.MarchPhoneNumber(phone))
                        {
                            string MASresult = CommonHelp.SendMAS(phone, message);
                        }
                    }
                }
            }
        }