Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 public ActionResult AjaxPostForward(FormCollection Fm)
 {
     int postId = 0;
     string str = ViewModelBase.ReplaceFace(InjectionFilter.Filter(Fm["content"]));
     int num2 = Globals.SafeInt(Fm["origid"], 0);
     int num3 = Globals.SafeInt(Fm["origuserid"], 0);
     string str2 = Fm["orignickname"];
     int num4 = Globals.SafeInt(Fm["forwardid"], 0);
     if ((num2 == 0) || (num3 == 0))
     {
         return base.Content("No");
     }
     base.PostsModel.CreatedDate = DateTime.Now;
     base.PostsModel.CreatedNickName = base.currentUser.NickName;
     base.PostsModel.CreatedUserID = base.currentUser.UserID;
     base.PostsModel.Description = str;
     base.PostsModel.ForwardedID = new int?(num4);
     base.PostsModel.HasReferUsers = str.Contains("@");
     base.PostsModel.OriginalID = num2;
     base.PostsModel.Type = 0;
     postId = base.PostsBll.AddForwardPost(base.PostsModel);
     base.list = base.PostsBll.GetForPostByPostId(postId, base.IncludeProduct);
     Maticsoft.BLL.SNS.ReferUsers users = new Maticsoft.BLL.SNS.ReferUsers();
     Maticsoft.Model.SNS.ReferUsers model = new Maticsoft.Model.SNS.ReferUsers {
         CreatedDate = DateTime.Now,
         IsRead = false,
         ReferUserID = num3,
         ReferNickName = str2,
         Type = 0,
         TagetID = postId
     };
     users.Add(model);
     return this.PartialView(base.CurrentThemeViewPath + "/UserProfile/LoadPostData.cshtml", base.list);
 }
Ejemplo n.º 3
0
 public ActionResult GetCurrentUser()
 {
     if (base.currentUser == null)
     {
         return base.Content("No");
     }
     Maticsoft.BLL.Members.SiteMessage message = new Maticsoft.BLL.Members.SiteMessage();
     Maticsoft.BLL.SNS.ReferUsers users = new Maticsoft.BLL.SNS.ReferUsers();
     int num = message.GetSystemMsgNotReadCount(base.currentUser.UserID, -1, base.currentUser.UserType);
     int receiveMsgNotReadCount = message.GetReceiveMsgNotReadCount(base.currentUser.UserID, -1);
     int referNotReadCountByType = users.GetReferNotReadCountByType(base.currentUser.UserID, 0);
     string str = string.IsNullOrWhiteSpace(base.currentUser.NickName) ? base.currentUser.UserName : base.currentUser.NickName;
     return base.Content(string.Concat(new object[] { str, "|", base.currentUser.UserID, "|", num, "|", receiveMsgNotReadCount, "|", referNotReadCountByType }));
 }