Exemplo n.º 1
0
        public int dtmessage(int receiveId, string content)
        {
            int sendid = Convert.ToInt32(Session["userid"]);

            //int sendid = 1;
            starweibo.Model.chatInfo onechat = new starweibo.Model.chatInfo();
            starweibo.BLL.chatInfo   bllchat = new starweibo.BLL.chatInfo();
            onechat.senderId   = sendid;
            onechat.receiverId = receiveId;
            onechat.msgContent = content;
            onechat.msgState   = "noread";
            return(bllchat.Add(onechat));
        }
Exemplo n.º 2
0
        //发送公告
        public void SendSysMsg(string msgContent)
        {
            starweibo.BLL.chatInfo   SysMsg = new starweibo.BLL.chatInfo();
            starweibo.Model.chatInfo molMsg = new starweibo.Model.chatInfo();

            List <starweibo.Model.userInfo> SSM = new List <starweibo.Model.userInfo>();

            starweibo.BLL.userInfo bllSSM = new starweibo.BLL.userInfo();
            SSM = bllSSM.GetModelList("1=1");
            foreach (starweibo.Model.userInfo onessm in SSM)
            {
                if (onessm.id != 44)
                {
                    molMsg.receiverId = onessm.id;
                    molMsg.msgContent = msgContent;
                    molMsg.senderId   = 44;
                    molMsg.msgState   = "noread";
                    SysMsg.Add(molMsg);
                }
            }
        }