Exemplo n.º 1
0
        public JsonResult FindCustomers(QuickSearchRequest request)
        {
            GetGeneralResponse <IEnumerable <CustomerView> > response = _customerService.FindCustomers(request, GetEmployee().ID);

            // فعلا به فرمت قدیم پاس می دهیم
            GetCustomersResponse cresponse = new GetCustomersResponse()
            {
                CustomerViews = response.data,
                success       = true,
                TotalCount    = response.totalCount
            };

            return(Json(cresponse, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        public JsonResult Get(string textToFind, int? rowCountToReturn, bool? matchContains, int localEducationAgencyId)
        {
            Dictionary<SearchFilter, HashSet<Tuple<int, Type>>> searchFilters = GetCurrentUserSearchClaimEducationOrganizationAssociations(UserInformation.Current.AssociatedOrganizations);

            var quickSearchRequest = new QuickSearchRequest
            {
                TextToFind = textToFind,
                RowCountToReturn = rowCountToReturn ?? 6,
                MatchContains = matchContains ?? false,
                SearchFilters = searchFilters,
            };

            QuickSearchModel res = service.Get(quickSearchRequest);

            FinishStudentSearch(res, rowCountToReturn ?? 6);

            LogSimpleSearch(textToFind);

            //return Json(presenter.Initialize(textToFind, rowCountToReturn, matchContains));
            return Json(res);
        }