Esempio n. 1
0
        public List <GujiDetailsModel> Find(GujiFilterModel filterModel, out int totalCount)
        {
            GujiFilter filter = new GujiFilter();

            ObjectMapperHelper.Map(filter, filterModel, this._mapper);
            List <Guji>             gujiList  = this._coreManager.GujiManager.Find(filter, out totalCount);
            List <GujiDetailsModel> modelList = gujiList
                                                .Select(d =>
            {
                GujiDetailsModel model = this._mapper.Map <GujiDetailsModel>(d);
                return(model);
            }).ToList();

            return(modelList);
        }
Esempio n. 2
0
        public ActionResult Search(string argsJson)
        {
            ControllerResultModel model = new ControllerResultModel();

            try
            {
                GujiFilterModel         filterModel = JsonConvert.DeserializeObject <GujiFilterModel>(argsJson);
                int                     totalCount;
                List <GujiDetailsModel> gujiList = ZhongyiWebsiteHelper.GujiService.Find(filterModel, out totalCount);
                model.Add("gujiList", gujiList);
                model.Add("gujiCount", totalCount);
            }
            catch (Exception ex)
            {
                model.result  = false;
                model.message = ex.Message;
            }
            return(Json(model));
        }