示例#1
0
        public async Task <string> SuppliersCountPagingAsync(DashboardSearchCriteria criteria)
        {
            criteria.AgencyCode = User.UserAgency();
            var result = await _dashboardService.SuppliersCountPagingAsync(criteria);

            return(result);
        }
示例#2
0
        public async Task <TendersSummaryViewModel> TendersSummaryPagingAsync(DashboardSearchCriteria criteria)
        {
            criteria.AgencyCode = User.UserAgency();
            var result = await _dashboardService.TendersSummaryPagingAsync(criteria);

            return(result);
        }
示例#3
0
        public static async Task <string> SuppliersCountPagingAsync(DashboardSearchCriteria criteria)
        {
            //Deserializing the response recieved from web api and storing into the Tender List
            var resultList = JsonConvert.DeserializeObject <string>(await apiRequest.GetAsync("Dashboard/SuppliersCountPagingAsync?" + UrlHelper.ToQueryString(criteria)));

            return(resultList);
        }
示例#4
0
        public async Task <QueryResult <SupplierEnquiryModel> > GetSuppliersEnquiry(DashboardSearchCriteria criteria)
        {
            int branchId = User.UserBranch();
            var enquires = await _dashboardService.GetSuppliersEnquiry(branchId, criteria);

            var result = _mapper.Map <QueryResult <SupplierEnquiryModel> >(enquires);

            return(result);
        }
        public async Task <ElasticResponse <T> > Search(DashboardSearchCriteria criteria)
        {
            SearchDescriptor <T> queryCommand = new SearchDescriptor <T>()
                                                .Query(q => q
                                                       .Bool(bl =>
                                                             bl.Filter(
                                                                 fq =>
            {
                QueryContainer query = null;

                query &= fq.Term(
                    t => t.Field("countryId").Value(criteria.CountryId)
                    );

                if (criteria.StartDateTimeLogged != DateTime.MinValue && criteria.EndDateTimeLogged != DateTime.MinValue)
                {
                    query &= fq.DateRange(
                        descriptor => descriptor
                        .Name("date_filter_start")
                        .Field("startDate")
                        .GreaterThanOrEquals(criteria.StartDateTimeLogged));

                    query &= fq.DateRange(
                        descriptor => descriptor
                        .Name("date_filter_end")
                        .Field("endDate")
                        .LessThanOrEquals(criteria.EndDateTimeLogged));
                }

                return(query);
            }
                                                                 )
                                                             )
                                                       );

            var result = await BasicQuery(queryCommand);

            var response = await _dashboardElasticMappers.MapElasticResults(result);

            if (!result.IsValid)
            {
                throw new InvalidOperationException(result.DebugInformation);
            }

            return(response);
        }
示例#6
0
        public static async Task <DirectInvitationsSummaryViewModel> DirectInvitationsSummaryPagingAsync(DashboardSearchCriteria criteria)
        {
            //Deserializing the response recieved from web api and storing into the Tender List
            var resultList = JsonConvert.DeserializeObject <DirectInvitationsSummaryViewModel>(await apiRequest.GetAsync("Dashboard/DirectInvitationsSummaryPagingAsync?" + UrlHelper.ToQueryString(criteria)));

            return(resultList);
        }
示例#7
0
        public async Task <QueryResult <TenderWaitingTheUnitActionViewModel> > TendersWaitingTheUnitActionAsync(DashboardSearchCriteria criteria)
        {
            var result = await _dashboardService.GetTendersWaitingTheUnitActionAsync(criteria);

            return(result);
        }
示例#8
0
        public async Task <DirectInvitationsSummaryViewModel> DirectInvitationsSummaryPagingAsync(DashboardSearchCriteria criteria)
        {
            criteria.AgencyCode = User.UserAgency();
            var result = await _dashboardService.DirectInvitationsSummaryPagingAsync(criteria);

            return(result);
        }
示例#9
0
        public async Task <DirectInvitationsSummaryViewModel> DirectInvitationsSummaryPagingAsync(DashboardSearchCriteria criteria)
        {
            var resultList = await _dashboardQueries.DirectInvitationsSummaryPagingAsync(criteria);

            return(resultList);
        }
示例#10
0
        public async Task <ActionResult> GetSuppliersEnquiryAsync(DashboardSearchCriteria dashboardSearchCriteriaModel)
        {
            var result = await _ApiClient.GetQueryResultAsync <SupplierEnquiryModel>("Dashboard/GetSuppliersEnquiry", dashboardSearchCriteriaModel.ToDictionary());

            return(Json(new PaginationModel(result.Items, result.TotalCount, result.PageSize, result.PageNumber, null)));
        }
示例#11
0
        public async Task <ActionResult> SuppliersCountPagingAsync(DashboardSearchCriteria dashboardSearchCriteriaModel)
        {
            var result = await _ApiClient.GetAsync <string>("Dashboard/SuppliersCountPagingAsync", dashboardSearchCriteriaModel.ToDictionary());

            return(Json(new PaginationModel(result, Convert.ToInt32(result), 10, 1, null)));
        }
示例#12
0
        public async Task <ActionResult> DirectInvitationsSummaryPagingAsync(DashboardSearchCriteria dashboardSearchCriteriaModel)
        {
            var result = await _ApiClient.GetAsync <DirectInvitationsSummaryViewModel>("Dashboard/DirectInvitationsSummaryPagingAsync", dashboardSearchCriteriaModel.ToDictionary());

            return(Json(new PaginationModel(result, result.DirectInvitations.TotalCount, result.DirectInvitations.PageSize, result.DirectInvitations.PageNumber, null)));
        }
示例#13
0
        public async Task <ActionResult> GetUnderEstablishedTendersAsync(DashboardSearchCriteria dashboardSearchCriteriaModel)
        {
            var result = await _ApiClient.GetAsync <SalesSummaryViewModel>("Dashboard/SalesSummaryPagingAsync", dashboardSearchCriteriaModel.ToDictionary());

            return(Json(new PaginationModel(result.Sales.Items, result.Sales.TotalCount, result.Sales.PageSize, result.Sales.PageNumber, result.Total.ToString() + "," + result.PriceTotal)));
        }
示例#14
0
        public async Task <string> SuppliersCountPagingAsync(DashboardSearchCriteria criteria)
        {
            var result = await _dashboardQueries.SuppliersCountPagingAsync(criteria);

            return(result);
        }
示例#15
0
        public async Task <ActionResult> TendersWaitingTheUnitActionAsync(DashboardSearchCriteria dashboardSearchCriteriaModel)
        {
            var result = await _ApiClient.GetQueryResultAsync <TenderWaitingTheUnitActionViewModel>("Dashboard/TendersWaitingTheUnitActionAsync", dashboardSearchCriteriaModel.ToDictionary());

            return(Json(new PaginationModel(result.Items, result.TotalCount, result.PageSize, result.PageNumber, null)));
        }
示例#16
0
        public static async Task <QueryResult <SupplierEnquiryModel> > GetSuppliersEnquiryAsync(DashboardSearchCriteria criteria)
        {
            var tenPurshaseModel = JsonConvert.DeserializeObject <QueryResult <SupplierEnquiryModel> >(await apiRequest.GetAsync("Dashboard/GetSuppliersEnquiry?" + UrlHelper.ToQueryString(criteria)));

            return(tenPurshaseModel);
        }
示例#17
0
        public async Task <TendersSummaryViewModel> TendersSummaryPagingAsync(DashboardSearchCriteria criteria)
        {
            var resultList = await _dashboardQueries.TendersSummaryPagingAsync(criteria);

            return(resultList);
        }