public ActionResult TransportList(FormCollection form) { var svTranport = new TransportService(); String SQLWhere = "IsDelete = 0 AND IsShow = 1"; SelectList_PageSize(); SetPager(form); if (!string.IsNullOrEmpty(form["SearchText"])) { SQLWhere += " AND BannerTitle LIKE N'%" + form["SearchText"].Trim() + "%'"; } else { GetStatusUser(); SetPager(form); var Transport = svTranport.SelectData <OuikumTransport>("*", "IsDelete = 0 AND IsShow = 1", "ListNo ASC", (int)ViewBag.PageIndex, (int)ViewBag.PageSize); ViewBag.Transport = Transport; ViewBag.TotalPage = svTranport.TotalPage; ViewBag.TotalRow = svTranport.TotalRow; } var transport = svTranport.SelectData <OuikumTransport>("*", SQLWhere, "ListNo ASC", (int)ViewBag.PageIndex, (int)ViewBag.PageSize); ViewBag.TotalPage = svTranport.TotalPage; ViewBag.TotalRow = svTranport.TotalRow; ViewBag.Transport = transport; return(PartialView("UC/GridTransport")); }
public ActionResult Index() { TransportService svTransport = new TransportService(); RememberURL(); if (!CheckIsLogin()) { return(Redirect(res.Pageviews.PvMemberSignIn)); } else { GetStatusUser(); SetPager(); var Transport = svTransport.SelectData <OuikumTransport>("*", "IsDelete = 0 AND WebID = 1"); ViewBag.Transport = Transport; ViewBag.TotalPage = svTransport.TotalPage; ViewBag.TotalRow = svTransport.TotalRow; return(View()); } }