public ActionResult bbsImages() { bizBBSMain b = new bizBBSMain(); List<BBSMain> list = b.List(); foreach (var item in list) { BBSMain model = b.Get(item.BBSMainID); model.Attach(); if (model.UpImages != null) model.UpImages = model.UpImages.Replace("/userfiles/", "http://img1.woxx8.com/userfiles/"); model.Detach(); b.Update(model); } return View("UserQMSet"); }
public ActionResult Detail(int id, int page) { int count; int userID = UserID; bizBBSMain bm = new bizBBSMain(); bizBBSDE bde = new bizBBSDE(); bizNewsType bnt = new bizNewsType(); bizNews bn = new bizNews(); bizNewsContent bnn = new bizNewsContent(); News model = bn.Get(id); NewsContent modelContent = bnn.Get(id, page); NewsType modelType = bnt.Get(model.NewsTypeID); BBSMain modelMain = bm.Get(model.BBSMainID); List<BBSDERelationQuery> list = bde.ListByNew(model.BBSMainID,modelMain.AddUser, 0, 20, out count); int pagecount = bnn.ListByNewsID(id).Count; modelMain.Attach(); modelMain.HitNum = modelMain.HitNum + 1; modelMain.Detach(); bm.Update(modelMain); ViewData["Bar"] = MenuBar.Start() .AddMenu("������Ѷ", "/") .AddMenu(modelType.TypeName, "/news/list/" + modelType.NewsTypeID + "_1.html") .AddMenu("����","") .GetMenuHtml(); if (userID == 0) ViewData["Users"] = null; else ViewData["Users"] = (new bizUsers()).Get(userID); ViewData["HotList"] = BBSCache.Instance().ListNewByHot(); ViewData["Count"] = count; ViewData["List"] = list; ViewData["Content"] = modelContent; ViewData["HitCount"] = modelMain.HitNum; ViewData["PageList"] = Page.GetPageList("/news/detail/" + model.NewsID + "_$page$.html", pagecount, 1, page); return View(model); }
public ActionResult Move(int id, FormCollection f) { bizBBSMain b = new bizBBSMain(); BBSMain model = b.Get(id); if (model == null) { TempData["Msg"] = "û�и���"; return RedirectToAction("Move", new { id = id }); } if (!UserCommon.CheckBBSAdminRight(AdminType)) { TempData["Msg"] = "��û�иù��ܵ�Ȩ��"; return RedirectToAction("Move", new { id = id }); } model.Attach(); model.TypeDeID = int.Parse(f["typeDeID"]); model.Detach(); b.Update(model); TempData["Msg"] = "ת�Ƴɹ�"; return RedirectToAction("Move", new { id = id }); }
public ActionResult RemoveFromBall(int id) { string backUrl = Request.QueryString["BackUrl"].ToString(); if (UserCommon.CheckBBSAdminRight(AdminType)) { bizBBSMain bmain = new bizBBSMain(); BBSMain model = bmain.Get(id); bizBBSMainOfBall b = new bizBBSMainOfBall(); model.Attach(); model.BallType = 0; model.Detach(); bmain.Update(model); b.Delete(id); } return Redirect(backUrl); }