Exemple #1
0
        public ActionResult FComment(int id,FormCollection f)
        {
            if (FactionID != id)
                return RedirectToAction("FAdminAlert", new { id = id });

            bizFComment bfc = new bizFComment();
            FComment model = new FComment();
            model.FactionID = id;
            model.AddUser = UserID;
            model.UserName = UserName;
            model.AddTime = DateTime.Now;
            model.CommentObject = 1;
            model.Content = f["content"].Trim();
            model.Status = 1;
            bfc.Add(model);
            return RedirectToAction("FComment", new { id = id });
        }
Exemple #2
0
 public ActionResult FCommentDelete(int id)
 {
     if ((new bizFactionDe()).GetByIsAdmin(id) != FactionDeID && UserCommon.CheckBBSAdminRight(AdminType) == false)
         return RedirectToAction("FAdminAlert", new { id = id });
     int commentID = int.Parse(Request.QueryString["commentID"].ToString());
     bizFComment bfc = new bizFComment();
     FComment model = bfc.Get(commentID);
     if(model.FactionID!=id)
         return RedirectToAction("FAdminAlert", new { id = id });
     bfc.Delete(commentID);
     return RedirectToAction("FComment", new { id = id });
 }
Exemple #3
0
        public ActionResult FComment(int id)
        {
            if (FactionID != id && UserCommon.CheckBBSAdminRight(AdminType) == false)
                return RedirectToAction("FAdminAlert", new { id = id });

            bizUsers bu = new bizUsers();
            bizFaction bf = new bizFaction();
            bizFComment bfc = new bizFComment();

            int pageSize = 15;
            int page = Request.QueryString["page"] == null ? 1 : int.Parse(Request.QueryString["page"].ToString());
            int count;
            List<FComment> list = bfc.List(id,page - 1, pageSize, out count);
            ViewData["PageList"] = Page.GetPageList("/factions/FComment/"+id+".html", count, pageSize, page, false);

            ViewData["ID"] = id;
            ViewData["FactionDeID"] = FactionDeID;
            return View(list);
        }