// GET: About public ActionResult Index() { LinqTable optHelper = new LinqTable(); ViewBag.SelectList = optHelper.option(); return(View()); }
public ActionResult Search() { LinqTable optHelper = new LinqTable(); var result = optHelper.BlogHelper(); result = result.Where(x => x.Categore == "成品展覽"); int totalLen = Convert.ToInt16(result.Count()); JQueryDataTableResponse <ArticleViewModel> jqDataTableRs = JQueryDataTableHelper <ArticleViewModel> .GetResponse(1, totalLen, totalLen, result.ToList()); return(Json(jqDataTableRs)); }
public ActionResult Search(string Lang) { var blog = BloggerService.GetAll(); var articles = ArticleService.GetAll(); LinqTable optHelper = new LinqTable(); var result = optHelper.ArtHelper(); result = result.Where(x => x.Categore == "服務頁"); if (!String.IsNullOrEmpty(Lang)) { result = result.Where(i => i.Id == int.Parse(Lang)).ToList(); } int totalLen = Convert.ToInt16(result.Count()); JQueryDataTableResponse <ArticleViewModel> jqDataTableRs = JQueryDataTableHelper <ArticleViewModel> .GetResponse(1, totalLen, totalLen, result.ToList()); return(Json(jqDataTableRs)); }