public ActionResult AjaxJoinGroup(FormCollection fm) { YSWL.MALL.Model.SNS.GroupUsers model = new Model.SNS.GroupUsers(); YSWL.MALL.BLL.SNS.GroupUsers bll = new YSWL.MALL.BLL.SNS.GroupUsers(); int GroupId = Common.Globals.SafeInt(fm["GroupId"], 0); if (null == CurrentUser) { return(Content("notLogin")); } if (bll.Exists(GroupId, currentUser.UserID)) { return(Content("joined")); } model.GroupID = GroupId; model.JoinTime = DateTime.Now; model.NickName = currentUser.NickName; model.UserID = currentUser.UserID; model.Status = 1; if (bll.AddEx(model)) { return(Content("Yes")); } return(Content("No")); }
public ActionResult AJaxCheckUserIsJoinGroup(FormCollection fm) { YSWL.MALL.Model.SNS.GroupUsers model = new Model.SNS.GroupUsers(); YSWL.MALL.BLL.SNS.GroupUsers bll = new YSWL.MALL.BLL.SNS.GroupUsers(); int GroupId = Common.Globals.SafeInt(fm["GroupId"], 0); if (bll.Exists(GroupId, currentUser.UserID)) { return(Content("joined")); } return(Content("No")); }