Пример #1
0
        //
        // GET: /Home/

        public ActionResult Index()
        {
            ADBLL ad = new ADBLL();
            BaseUserInfoBLL user =new BaseUserInfoBLL();
            ViewBag.adList = ad.getTopAD(5);
            ViewBag.userList = user.getUserList();
            return View();
        }
Пример #2
0
        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");

        }
Пример #3
0
 public ActionResult ADEdit(AD ad)
 {
     ADBLL adBLL = new ADBLL();
     if (adBLL.EditAD(ad))
     {
         return RedirectToAction("AD");
     }
     else
     {
         return Content("修改失败");
     }
 }
Пример #4
0
        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("创建失败");
            }
        }
Пример #5
0
        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));
        }