Beispiel #1
0
        private List <BA01AModel> GetList(SearchViewModel search)
        {
            var queryData = _Service.GetMany(x => x.BA01A_ID > 0);

            if (!string.IsNullOrWhiteSpace(search.S_ACC_NO))
            {
                queryData = queryData.Where(x => x.ACC_NO.Contains(search.S_ACC_NO));
            }
            if (!string.IsNullOrWhiteSpace(search.S_ACC_NM))
            {
                queryData = queryData.Where(x => x.ACC_NM.Contains(search.S_ACC_NM));
            }
            return(BA01Business.FromEntity(queryData.ToList()));
        }
Beispiel #2
0
        private PartialViewResult ResultHandler(ResultHelper <BA01A> result, SearchViewModel search)
        {
            if (result.Message == "")
            {
                ViewData["Success"] = true;
            }
            else
            {
                ViewData["ErrMsg"] = result.Message;
                var master = BA01Business.FromEntity(result.Data);
                master.ModelState     = ModelState;
                ViewData["ErrorData"] = master;
            }

            return(PartialView("_Grid", GetList(search)));;
        }