Exemple #1
0
        /// <summary>
        /// 发送新的群发消息
        /// </summary>
        public void AddNewMassMsg(AntSdkMassMsgCtt msg)
        {
            MassMsgViewModel controlVm = new MassMsgViewModel(msg, GlobalVariable.SendMsgState.Sending);

            MassMsgControlList.Add(controlVm);
            controlVm.IsSelected = true;
        }
Exemple #2
0
        /// <summary>
        /// 收到群发消息回执时刷新界面
        /// </summary>
        public void RefreshMassMsg(AntSdkChatMsg.ChatBase massMsgReceipt)
        {
            MassMsgViewModel controlVm = MassMsgControlList.FirstOrDefault(c => c.MessageId == massMsgReceipt.messageId);

            if (controlVm == null)
            {
                return;
            }
            controlVm.HandleMassMsgReceipt(massMsgReceipt);
        }
Exemple #3
0
        public MassMsgListViewModel()
        {
            BaseBLL <AntSdkMassMsgCtt, T_MassMsgDAL> massMsgBll = new BaseBLL <AntSdkMassMsgCtt, T_MassMsgDAL>();
            IList <AntSdkMassMsgCtt> massMsgList = massMsgBll.GetList();

            if (massMsgList == null || massMsgList.Count == 0)
            {
                return;
            }
            foreach (AntSdkMassMsgCtt msg in massMsgList)
            {
                GlobalVariable.SendMsgState state = GlobalVariable.SendMsgState.Success;
                if (string.IsNullOrEmpty(msg.chatIndex))
                {
                    state = GlobalVariable.SendMsgState.Failure;
                }
                MassMsgViewModel controlVm = new MassMsgViewModel(msg, state);
                MassMsgControlList.Add(controlVm);
            }
            MassMsgControlList.Last().IsSelected = true;
        }