public ActionResult DisplayInfo(string t, string p) { IdxInfoSearchModels infoList = new IdxInfoSearchModels(); if (!StringUtils.IsEmpty(t)) { infoList.infoTypeCode = StringUtils.base64Decode(t); } int pageIndex = 0; if (Int32.TryParse(p, out pageIndex)) { infoList.pageIndex = pageIndex; } else { infoList.pageIndex = 0; } MstInfoTypeDAO infoTypeDAO = new MstInfoTypeDAO(this.mapper); IList<MstInfoTypeModels> infoTypeModelsList = infoTypeDAO.GeInfoType(infoList.infoTypeCode, null); if (infoTypeModelsList == null || infoTypeModelsList.Count == 0) { infoList.errorMessage = Resource.MsgErrNoDataFound; return View(infoList); } infoList.infoTypeName = infoTypeModelsList[0].infoTypeName; IdxInfoDAO infoDAO = new IdxInfoDAO(this.mapper); infoList = infoDAO.searchIdxInfo(infoList); return View(infoList); }
public ActionResult Search(IdxInfoSearchModels infoList) { MstInfoTypeModels allType = new MstInfoTypeModels(); infoList.infoTypeList = this.initTypeList(); infoList.infoTypeList.Insert(0, allType); IdxInfoDAO infoDAO = new IdxInfoDAO(this.mapper); infoList = infoDAO.searchIdxInfo(infoList); return View("Index", infoList); }