public string Chenmo(int bbsMainID, int userID, string userName, byte chenmoType) { BBSMain model = Get(bbsMainID); if (model == null) return "该帖不存在。"; model.Attach(); model.ChenmoType = chenmoType; //if (chenmoType==2) // model.OptionLog += "<br />" + "被 " + userName + " 沉默 " + DateTime.Now; //if (chenmoType == 0) // model.OptionLog += "<br />" + "被 " + userName + " 取消沉默 " + DateTime.Now; model.Detach(); Update(model); bizBBSMainLog bml = new bizBBSMainLog(); if (chenmoType == 2) bml.Add(bbsMainID, userID, "该帖子被管理员沉默"); if (chenmoType == 0) bml.Add(bbsMainID, userID, "该帖子被管理员取消沉默"); return "设置成功。"; }
public ActionResult UseCard(int id, FormCollection f) { int userID = UserID; bizBBSMain b = new bizBBSMain(); string result = b.UseCard(userID, id, f["cardName"].Trim()); if (f["cardName"] == "jilu") { if (result.Trim() != "") return Content(result); bizBBSMainLog muc = new bizBBSMainLog(); List<BBSMainLogDetail> list = muc.List(id); string str = ""; if (list != null && list.Count > 0) { foreach (BBSMainLogDetail item in list) { str = item.Remark + " �û���" + item.UserName + " ʱ�䣺" + item.AddTime + "\r\n" + str; } } else str = "û���˶Ը���ʹ�ù���Ƭ"; return Content(str); } else return Content(result); }
public ActionResult SetTop(int id, FormCollection f) { if (!UserCommon.CheckBBSAdminRight(AdminType)) return Content("����Ȩִ�д˲���"); bizBBSMainLog bml = new bizBBSMainLog(); bizBBSMainOfBall b = new bizBBSMainOfBall(); BBSMainOfBall model = b.Get(id); if (model != null) return Content("�������Ѿ���������"); BBSMainOfBall bModel = new BBSMainOfBall(); bModel.BBSMainID = id; bModel.UserID = UserID; bModel.BallType = 2; bModel.TopType = byte.Parse(f["topType"].ToString()); bModel.AddTime = DateTime.Now; bModel.EndTime = DateTime.Now.AddMonths(1); b.Add(bModel); bml.Add(id, UserID, "�������ö�"); return Content("�ö��ɹ�"); }