public ActionResult Edit(int num, int m) { if (!CheckMemberlogin) { return RedirectToAction("login", "admin"); } else { //iqc.num = num; //iqc.isRead = 1; //iqcd.Update_Read(con); leftModel(); var model = new InquiryContactViewModel() { inquiryContact = iqcd.Get().ToList().Where(a => a.num == num && a.need == 2).OrderByDescending(a => a.wdate), inquiryCart = icd.Get().ToList().Where(a => a.isdel == 0 && a.isSend == 1 && a.need == 2), product = pd.Get().ToList().Where(a => a.isdel == 0) }; return View(model); } }
public ActionResult Read(int page = 1,string find1 = "",string find2 = "") { if (!CheckMemberlogin) { return RedirectToAction("login", "admin"); } else { leftModel(); ViewBag.searchResult = 0; ViewBag.search = 1; ViewBag.gowhere = Url.Action("Read", "adminOutSys"); if (find1 != "") { ViewBag.searchResult = 1; ViewBag.searchText = find1 + "," + find2; } var currentpage = page < 1 ? 1 : page; var pagesize = 10; var cat = iqcd.Get().ToList().Where(a => a.isdel == 0 && a.need == 2 && (a.uName.Contains(find1) || a.uPhone.Contains(find2))); var model = new InquiryContactViewModel() { inquiryContact_pagelist = cat.ToPagedList(currentpage, pagesize) }; return View(model); } }