예제 #1
0
        public ContentResult AgrSearch(ClientVisitSearchCriteriaModel model)
        {
            try
            {
                var _clientBL = new ClientBusinessLogic();

                var m = new ClientVisitSearchCriteriaModel(model.GetClientSearchCriteria(), CurrentUser);

                var searchCriteria = m.GetClientSearchCriteria();

                var items = _clientBL.ClientVisit_Find(
                    m.GetClientSearchCriteria(),
                    new List <SortCriteria <ClientVisitSortField> >(),
                    new PageRequest()
                {
                    PageNumber = model.PageNumber, PageSize = model.PageSize
                });

                return(Content(JsonConvert.SerializeObject(new { items, totalCount = items.TotalCount, pageCount = items.PageCount, pageNumber = items.PageNumber }), "application/json"));
            }
            catch (Exception ex)
            {
                return(Content(ex.Message, "application/json"));
            }
        }
예제 #2
0
        public ContentResult UsRegSearch(ClientVisitSearchCriteriaModel model)
        {
            try
            {
                var _clientBL      = new ClientBusinessLogic();
                var m              = new ClientVisitSearchCriteriaModel(model.GetClientSearchCriteria(), CurrentUser);
                var searchCriteria = m.GetClientSearchCriteria();

                var usRegClients = new List <ClientUsRegInfo>();
                if (searchCriteria.RegionId == 50 && !searchCriteria.DontSearchInUsReg)
                {
                    usRegClients = _clientBL.FindClientInUsReg(searchCriteria);
                }
                return(Content(JsonConvert.SerializeObject(new { usRegClients }), "application/json"));
            }
            catch (Exception ex)
            {
                return(Content(ex.Message, "application/json"));
            }
        }