コード例 #1
0
        public ActionResult TradeTickets_Read([DataSourceRequest] DataSourceRequest request)
        {
            DataSourceResult result = new DataSourceResult();
            Query            query  = request.ToQuery();

            List <TradeTicketModel> tradeTickets = mapper.Map <List <TradeTicketModel> >(TradeTicketService.GetCollection(query));

            result.Data  = tradeTickets;
            result.Total = tradeTickets.Count;

            return(new GuerillaLogisticsApiJsonResult(result));
        }
コード例 #2
0
        public ActionResult PlaySheets_Read([DataSourceRequest] DataSourceRequest request)
        {
            DataSourceResult result = new DataSourceResult();
            Query            query  = request.ToQuery();

            query.Includes.Add(WeeklyIncomePlaySheet.PropertyNames.ComboCountsInclude);
            query.Includes.Add(WeeklyIncomePlaySheet.PropertyNames.ActionPlansInclude);
            query.Includes.Add(WeeklyIncomePlaySheet.PropertyNames.ActionPlans.PairsInclude);
            query.Includes.Add(WeeklyIncomePlaySheet.PropertyNames.ActionPlans.Pairs.BullPutSpreadInclude);
            query.Includes.Add(WeeklyIncomePlaySheet.PropertyNames.ActionPlans.Pairs.BullPutSpread.SecurityInclude);
            query.Includes.Add(WeeklyIncomePlaySheet.PropertyNames.ActionPlans.Pairs.BullPutSpread.SellPutInclude);
            query.Includes.Add(WeeklyIncomePlaySheet.PropertyNames.ActionPlans.Pairs.BullPutSpread.BuyPutInclude);
            query.Includes.Add(WeeklyIncomePlaySheet.PropertyNames.ActionPlans.Pairs.BearCallSpreadInclude);
            query.Includes.Add(WeeklyIncomePlaySheet.PropertyNames.ActionPlans.Pairs.BearCallSpread.SecurityInclude);
            query.Includes.Add(WeeklyIncomePlaySheet.PropertyNames.ActionPlans.Pairs.BearCallSpread.SellCallInclude);
            query.Includes.Add(WeeklyIncomePlaySheet.PropertyNames.ActionPlans.Pairs.BearCallSpread.BuyCallInclude);

            result.Data  = mapper.Map <List <SimpleWeeklyIncomePlaySheetDto> >(WeeklyIncomePlaySheetService.GetCollection(query));
            result.Total = WeeklyIncomePlaySheetService.GetCount(query);

            return(new GuerillaLogisticsApiJsonResult(result));
        }
コード例 #3
0
        public ActionResult Securities_Read([DataSourceRequest] DataSourceRequest request)
        {
            DataSourceResult result = new DataSourceResult();
            Query            query  = request.ToQuery();

            query.QuerySingleFilters.Add(new QuerySingleFilter()
            {
                PropertyName  = Security.PropertyNames.PairEligible,
                Parameter     = "true",
                QueryOperator = QueryOperators.Equals,
                IsAndFilter   = true
            });

            List <SecurityDto> securities = mapper.Map <List <SecurityDto> >(SecurityService.GetCollection(query));

            securities.FilterForImportantDates();

            result.Data  = securities;
            result.Total = securities.Count;

            return(new GuerillaLogisticsApiJsonResult(result));
        }