Пример #1
0
        public void Insert(int SupportMsgSid,int SupportMsgFid,int SupportMsgTid,string SupportMsgMemo,string SupportMsgPhoto,bool SupportMsgIsRead,bool SupportMsgIsAsk,DateTime SupportMsgDate,int? CreatedBy,DateTime? CreatedOn,int? ModifiedBy,DateTime? ModifiedOn)
        {
            SysSupportMessage item = new SysSupportMessage();

            item.SupportMsgSid = SupportMsgSid;

            item.SupportMsgFid = SupportMsgFid;

            item.SupportMsgTid = SupportMsgTid;

            item.SupportMsgMemo = SupportMsgMemo;

            item.SupportMsgPhoto = SupportMsgPhoto;

            item.SupportMsgIsRead = SupportMsgIsRead;

            item.SupportMsgIsAsk = SupportMsgIsAsk;

            item.SupportMsgDate = SupportMsgDate;

            item.CreatedBy = CreatedBy;

            item.CreatedOn = CreatedOn;

            item.ModifiedBy = ModifiedBy;

            item.ModifiedOn = ModifiedOn;

            item.Save(UserName);
        }
Пример #2
0
 public static string SendMessage(int sid, string msg, bool ask, string photo)
 {
     try
     {
         SysSupport support = GetSupportByID(sid);
         if (string.IsNullOrEmpty(photo))
             photo = string.Empty;
         else
             photo = photo.Trim( );
         SysSupportMessage message = new SysSupportMessage
         {
             SupportMsgSid = sid,
             SupportMsgFid = AppContextBase.Context.User.Id,
             SupportMsgDate = DateTime.Now,
             SupportMsgTid = 0,
             SupportMsgIsAsk = ask,
             SupportMsgIsRead = false,
             SupportMsgMemo = msg,
             SupportMsgPhoto = photo
         };
         message.Save( );
     }
     catch (Exception ex)
     {
         Logging.Log("WebChatBLL->SendMessage", ex);
         return ex.Message;
     }
     return "SendOk";
 }