public ActionResult Cbanner() { if (Session["Member"] == null) { return RedirectToAction("login"); } CustomerData c = new CustomerData(); ViewData["banner"] = c.GetBanner().ToList(); return View(); }
// 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(); }
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(); }
// 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(); }
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" }); }
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(); }
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(); }
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(); }
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(); }
// GET: story public ActionResult Index() { CustomerData c = new CustomerData(); ViewData["pidno"] = c.GetPidno().ToList(); return View(); }