Example #1
0
        //被点击
        private void MsgTipItem_Click(object sender, EventArgs e)
        {
            MsgTip FormMsgTip = (MsgTip)this.FindForm();

            //处理这些待处理消息
            FormMsgTip.processTipMsg();
        }
 public ActionResult Header()
 {
     WebSiteSet set = new WebSiteSet(ApplicationKeyType.SNS);
     ((dynamic) base.ViewBag).Logo = set.LogoPath;
     ((dynamic) base.ViewBag).WebName = set.WebName;
     ((dynamic) base.ViewBag).Domain = set.WebSite_Domain;
     if (base.currentUser == null)
     {
         return base.View("_Header");
     }
     int num = 0;
     List<MsgTip> model = new List<MsgTip>();
     Maticsoft.BLL.Members.SiteMessage message = new Maticsoft.BLL.Members.SiteMessage();
     Maticsoft.BLL.SNS.ReferUsers users = new Maticsoft.BLL.SNS.ReferUsers();
     num = message.GetSystemMsgNotReadCount(base.currentUser.UserID, -1, base.currentUser.UserType);
     if (num > 0)
     {
         MsgTip item = new MsgTip {
             Count = num,
             _MsgType = 0
         };
         model.Add(item);
     }
     int receiveMsgNotReadCount = 0;
     receiveMsgNotReadCount = message.GetReceiveMsgNotReadCount(base.currentUser.UserID, -1);
     if (receiveMsgNotReadCount > 0)
     {
         MsgTip tip2 = new MsgTip {
             Count = receiveMsgNotReadCount,
             _MsgType = 1
         };
         model.Add(tip2);
     }
     int referNotReadCountByType = 0;
     referNotReadCountByType = users.GetReferNotReadCountByType(base.currentUser.UserID, 0);
     if (referNotReadCountByType > 0)
     {
         MsgTip tip3 = new MsgTip {
             Count = referNotReadCountByType,
             _MsgType = 2
         };
         model.Add(tip3);
     }
     ((dynamic) base.ViewBag).Current = base.currentUser;
     ((dynamic) base.ViewBag).Pointer = Globals.SafeInt(base.Request.QueryString["pointer"], 0);
     return base.View("_UserHeader", model);
 }