Esempio n. 1
0
        private void JPush_Insert(ReturnDalInfo info, string alarmContent, string isPush, string errInfo)
        {
            Tb_WechatMessage_Mod w = new Tb_WechatMessage_Mod();

            w.ListId       = Guid.NewGuid().ToString("N");
            w.WechatId     = info.UserToken;
            w.MessageType  = 1;
            w.ProtocolType = Convert.ToInt32(Info.ProtocolType);
            w.Message      = alarmContent;
            w.IsSuccess    = isPush;
            w.PushType     = "4";
            w.SourceId     = Info.Reason;
            w.Reserved1    = errInfo;
            w.Reserved2    = info.Identitycard;
            w.Reserved4    = GetName(info.AppcardType);
            Tb_WechatMessage_Dal.Insert(w);
        }
        private void Insert(string content, bool IsSend, string SendResult)
        {
            Tb_WechatMessage_Mod log = new Tb_WechatMessage_Mod();

            log.ListId       = Guid.NewGuid().ToString("N");
            log.WechatId     = Info.Phone;
            log.MessageType  = 1;
            log.ProtocolType = Convert.ToInt32(Info.SubCmd);
            log.SourceId     = Info.Reason;
            log.Message      = content;
            log.Reserved2    = Info.UserId;
            log.PushType     = "2";
            log.IsSuccess    = IsSend ? "1" : "2";
            if (SendResult.Length >= 100)
            {
                SendResult = SendResult.Substring(0, 100);
            }
            log.Reserved1 = log.IsSuccess == "1" ? "" : SendResult;
            Tb_WechatMessage_Dal.Insert(log);
        }