示例#1
0
 private void ShowInfo(int ID)
 {
     Maticsoft.Model.Members.SiteMessage model = new Maticsoft.BLL.Members.SiteMessage().GetModel(ID);
     this.lblID.Text = model.ID.ToString();
     this.lblReceiverID.Text = this.GetUser(model.MsgType, model.ReceiverID);
     this.lblContent.Text = model.Content;
 }
示例#2
0
 public DataSet DeleteListEx(string Ids, out int Result, bool IsSendMess = false, int SendUserID = 1)
 {
     List<int> photoUserIds = this.GetPhotoUserIds(Ids);
     DataSet set = this.dal.DeleteListEx(Ids, out Result);
     if ((Result > 0) && IsSendMess)
     {
         SiteMessage message = new SiteMessage();
         foreach (int num in photoUserIds)
         {
             message.AddMessageByUser(SendUserID, num, "图片删除", "您的图片涉嫌非法内容,管理员已删除! 如有疑问,请联系网站管理员");
         }
     }
     return set;
 }
示例#3
0
 private void SendMsg()
 {
     string str = "";
     bool flag = false;
     for (int i = 0; i < this.gridView.Rows.Count; i++)
     {
         CheckBox box = (CheckBox) this.gridView.Rows[i].FindControl(this.gridView.CheckBoxID);
         if ((box != null) && box.Checked)
         {
             flag = true;
             HiddenField field = (HiddenField) this.gridView.Rows[i].FindControl("HiddenField_UserId");
             if (field != null)
             {
                 str = str + field.Value + ",";
             }
         }
     }
     if (flag)
     {
         str = str.Substring(0, str.LastIndexOf(","));
     }
     Maticsoft.Model.Members.SiteMessage model = new Maticsoft.Model.Members.SiteMessage();
     Maticsoft.BLL.Members.SiteMessage message2 = new Maticsoft.BLL.Members.SiteMessage();
     model.Title = "系统管理员通知";
     model.Content = "您好,您的举报信息我们已经收到并处理,非常感谢您对我们工作的支持。";
     model.SenderID = new int?(base.CurrentUser.UserID);
     model.SendTime = new DateTime?(DateTime.Now);
     model.ReaderIsDel = false;
     model.ReceiverIsRead = false;
     model.SenderIsDel = false;
     foreach (string str2 in str.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
     {
         model.ReceiverID = new int?(int.Parse(str2));
         message2.Add(model);
     }
 }
示例#4
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);
 }
示例#5
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 }));
 }
示例#6
0
 public bool DeleteListByNormalPost(string PostIDs, bool IsSendMess = false, int SendUserID = 1)
 {
     List<int> postUserIds = this.GetPostUserIds(PostIDs);
     bool flag = this.dal.DeleteListByNormalPost(PostIDs);
     if (flag && IsSendMess)
     {
         SiteMessage message = new SiteMessage();
         foreach (int num in postUserIds)
         {
             message.AddMessageByUser(SendUserID, num, "动态删除", "您分享的动态涉嫌非法内容,管理员已删除! 如有疑问,请联系网站管理员");
         }
     }
     return flag;
 }