Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 private IList<MstInfoTypeModels> initTypeList()
 {
     MstInfoTypeDAO mstDAO  = new MstInfoTypeDAO(this.mapper);
     return mstDAO.GeInfoType(null, null);
 }