コード例 #1
0
        public ActionResult Edit(int num, int m)
        {
            if (!CheckMemberlogin)
            {
                return RedirectToAction("login", "admin");
            }
            else
            {
                conf.num = num;
                conf.isRead = 1;
                confd.Update_Read(conf);

                leftModel();
                var model = new ContactFixViewModel()
                {
                    contact = confd.Get().ToList().Where(a => a.num == num).OrderByDescending(a => a.wdate)
                };
                return View(model);

            }
        }
コード例 #2
0
        // GET: adminContactFix
        public ActionResult Read(int page = 1)
        {
            if (!CheckMemberlogin)
            {
                return RedirectToAction("login", "admin");
            }
            else
            {
                leftModel();
                var currentpage = page < 1 ? 1 : page;
                var pagesize = 10;
                var cat = confd.Get().ToList().Where(a => a.isdel == 0).OrderByDescending(a => a.wdate);
                var model = new ContactFixViewModel()
                {
                    contact_pagelist = cat.ToPagedList(currentpage, pagesize)

                };

                return View(model);
            }
        }