// // GET: /Home/ public ActionResult Index() { ADBLL ad = new ADBLL(); BaseUserInfoBLL user =new BaseUserInfoBLL(); ViewBag.adList = ad.getTopAD(5); ViewBag.userList = user.getUserList(); return View(); }
public ActionResult FilterUser(FilterUser u) { FilterBLL filter = new FilterBLL(); ADBLL ad = new ADBLL(); ViewBag.adList = ad.getTopAD(5); ViewBag.userList = filter.getFiltedList(u); return View("Index"); }
public ActionResult ADEdit(AD ad) { ADBLL adBLL = new ADBLL(); if (adBLL.EditAD(ad)) { return RedirectToAction("AD"); } else { return Content("修改失败"); } }
public ActionResult createAD(AD ad) { if (Request.Cookies["userName"] == null) { return RedirectToAction("Index"); } string cookieUserName = Server.HtmlEncode(Request.Cookies["userName"].Value); if (cookieUserName.Length < 1) { return RedirectToAction("Index"); } ADBLL adBLL = new ADBLL(); if (adBLL.createAD(ad)) { return RedirectToAction("AD"); } else { return Content("创建失败"); } }
public ActionResult ADEdit(int id) { if (Request.Cookies["userName"] == null) { return RedirectToAction("Index"); } string cookieUserName = Server.HtmlEncode(Request.Cookies["userName"].Value); if (cookieUserName.Length < 1) { return RedirectToAction("Index"); } ADBLL ad = new ADBLL(); return View(ad.getAD(id)); }