コード例 #1
0
 public ActionResult Cbanner()
 {
     if (Session["Member"] == null)
     {
         return RedirectToAction("login");
     }
     CustomerData c = new CustomerData();
     ViewData["banner"] = c.GetBanner().ToList();
     return View();
 }
コード例 #2
0
 // GET: NS
 public ActionResult Index()
 {
     CustomerData c = new CustomerData();
     ViewData["pidno"] = c.GetPidno().ToList();
     ViewData["Banner"] = c.GetBanner().ToList();
     Session["Member"] = "";
     if (Session["Member"] == null)
     {
         return RedirectToAction("login","admin");
     }
     return View();
 }
コード例 #3
0
        public ActionResult Conter(int page = 1)
        {
            if (Session["Member"] == null)
            {
                return RedirectToAction("login");
            }

            int currentPage = page < 1 ? 1 : page;

            //Response.Write(Session["Member"]);
            CustomerData c = new CustomerData();
            ViewData["product"] = c.GetProduct().Where(a => a.isdel == 0).OrderBy(x => x.Pid).ToPagedList(currentPage, pagesize);
            ViewData["banner"] = c.GetBanner().Where(a => a.isdel == 0).OrderBy(x => x.Bid).ToPagedList(currentPage, pagesize);
            ViewData["pidno"] = c.GetPidno().OrderBy(a => a.SortNum).ToList();
            return View();
        }
コード例 #4
0
        // GET: Product
        public ActionResult Index(string cl)
        {
            CustomerData c = new CustomerData();
            ViewData["pidno"] = c.GetPidno().ToList();
            if (cl != "")
            {
                ViewData["product"] = c.GetProduct(cl).ToList();

            }
            else
            {

                ViewData["product"] = c.GetProduct().ToList();

            }

            return View();
        }
コード例 #5
0
        public ActionResult CPidno(string txt_pidnoTitle, string txt_pidnoMemo, string txt_SortNum)
        {
            CustomerData c = new CustomerData();

            //var Nowdate = DateTime.Now.ToString("yyyyMMdd");
            var Num = c.GetPidnoLast();
            PidnoData pd = new PidnoData();
            Pidno p = new Pidno();
            p.PidnoTitle = txt_pidnoTitle;
            p.PidnoMemo = txt_pidnoMemo;
            p.PidnoNum = Num;
            p.SortNum = txt_SortNum;
            pd.Create(p);
            return RedirectToAction("Conter", new { tabid = "3", m = "1" });
        }
コード例 #6
0
 public ActionResult CPidno()
 {
     if (Session["Member"] == null)
     {
         return RedirectToAction("login");
     }
     CustomerData c = new CustomerData();
     ViewData["pidno"] = c.GetPidno().OrderBy(a => a.SortNum).ToList();
     return View();
 }
コード例 #7
0
 public ActionResult Uproduct(string id)
 {
     if (Session["Member"] == null)
     {
         return RedirectToAction("login");
     }
     CustomerData c = new CustomerData();
     ViewData["pidno"] = c.GetPidno().ToList();
     ViewData["product"] = c.GetProduct().Where(a => a.Pid == Convert.ToInt32(id)).ToList();
     return View();
 }
コード例 #8
0
 public ActionResult UPidno(string id)
 {
     if (Session["Member"] == null)
     {
         return RedirectToAction("login");
     }
     ViewData["id"] = id;
     CustomerData c = new CustomerData();
     ViewData["pidnoAll"] = c.GetPidno().OrderBy(x => x.SortNum).ToList();
     ViewData["pidno"] = c.GetPidno().Where(a => a.PidnoNum == id).ToList();
     return View();
 }
コード例 #9
0
        public ActionResult Ubanner(string id)
        {
            if (Session["Member"] == null)
            {
                return RedirectToAction("login");
            }
            CustomerData c = new CustomerData();

            ViewData["banner"] = c.GetBanner().Where(a => a.Bid == Convert.ToInt32(id)).ToList();
            return View();
        }
コード例 #10
0
 // GET: story
 public ActionResult Index()
 {
     CustomerData c = new CustomerData();
     ViewData["pidno"] = c.GetPidno().ToList();
     return View();
 }