Beispiel #1
0
 protected void DataListUser_ItemCommand(object source, DataListCommandEventArgs e)
 {
     if (e.CommandName == "delete")
     {
         GroupUsers users = new GroupUsers();
         if (e.CommandArgument != null)
         {
             string[] strArray = e.CommandArgument.ToString().Split(new char[] { ',' });
             int userID = Globals.SafeInt(strArray[0], 0);
             int groupId = Globals.SafeInt(strArray[1], 0);
             if (!users.DeleteEx(groupId, userID))
             {
                 MessageBox.ShowFailTip(this, Site.TooltipDelError);
                 return;
             }
             LogHelp.AddUserLog(base.CurrentUser.UserName, base.CurrentUser.UserType, string.Concat(new object[] { "移除群组(id=", groupId, ")用户(userid=", userID, ")成功" }), this);
             MessageBox.ShowSuccessTip(this, Site.TooltipDelOK);
         }
         this.BindData();
     }
 }
Beispiel #2
0
 protected void btnForbidSpeak_Click(object sender, EventArgs e)
 {
     string selIDlist = this.GetSelIDlist();
     if (selIDlist.Trim().Length != 0)
     {
         Maticsoft.BLL.SNS.GroupUsers users = new Maticsoft.BLL.SNS.GroupUsers();
         if (users.UpdateStatusByTopicReplyIds(selIDlist, 2))
         {
             MessageBox.ShowSuccessTip(this, "操作成功!");
             LogHelp.AddUserLog(base.CurrentUser.UserName, base.CurrentUser.UserType, "批量禁言用户成功!", this);
         }
         else
         {
             MessageBox.ShowFailTip(this, "操作失败!");
             LogHelp.AddUserLog(base.CurrentUser.UserName, base.CurrentUser.UserType, "批量禁言用户失败!", this);
         }
         this.gridView.OnBind();
     }
 }
 public ActionResult AjaxJoinGroup(FormCollection fm)
 {
     Maticsoft.Model.SNS.GroupUsers model = new Maticsoft.Model.SNS.GroupUsers();
     Maticsoft.BLL.SNS.GroupUsers users2 = new Maticsoft.BLL.SNS.GroupUsers();
     int groupID = Globals.SafeInt(fm["GroupId"], 0);
     if (users2.Exists(groupID, base.currentUser.UserID))
     {
         return base.Content("joined");
     }
     model.GroupID = groupID;
     model.JoinTime = DateTime.Now;
     model.NickName = base.currentUser.NickName;
     model.UserID = base.currentUser.UserID;
     model.Status = 1;
     if (users2.AddEx(model))
     {
         return base.Content("Yes");
     }
     return base.Content("No");
 }
 public ActionResult AJaxCheckUserIsJoinGroup(FormCollection fm)
 {
     new Maticsoft.Model.SNS.GroupUsers();
     Maticsoft.BLL.SNS.GroupUsers users = new Maticsoft.BLL.SNS.GroupUsers();
     int groupID = Globals.SafeInt(fm["GroupId"], 0);
     if (users.Exists(groupID, base.currentUser.UserID))
     {
         return base.Content("joined");
     }
     return base.Content("No");
 }