Exemple #1
0
        private List <BA03AModel> GetList(SearchViewModel search)
        {
            //var sqlCmd = new CommonHelper().GetSqlCmd("BA03A", search);
            var queryData = _Service.GetMany(x => x.BA03A_ID > 0);

            if (!string.IsNullOrWhiteSpace(search.S_DEP_NO))
            {
                queryData = queryData.Where(x => x.DEP_NO.Contains(search.S_DEP_NO));
            }
            if (!string.IsNullOrWhiteSpace(search.S_DEP_NM))
            {
                queryData = queryData.Where(x => x.DEP_NM.Contains(search.S_DEP_NM));
            }
            return(BA03Business.FromEntity(queryData.ToList()));
        }
Exemple #2
0
        private PartialViewResult ResultHandler(ResultHelper <BA03A> result, SearchViewModel search)
        {
            if (result.Message == "")
            {
                ViewData["Success"] = true;
            }
            else
            {
                ViewData["ErrMsg"] = result.Message;
                var master = BA03Business.FromEntity(result.Data);
                master.ModelState     = ModelState;
                ViewData["ErrorData"] = master;
            }

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