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)); }
public void Purge() { Thread.Sleep(1500); SendPurgeMessage("WeeklyIncomeComboCount"); foreach (WeeklyIncomeComboCount x in WeeklyIncomeComboCountService.GetCollection()) { WeeklyIncomeComboCountService.Delete(x); } SendPurgeMessage("OptionStrike"); foreach (OptionStrike x in OptionStrikeService.GetCollection()) { OptionStrikeService.Delete(x); } SendPurgeMessage("OptionDate"); foreach (OptionDate x in OptionDateService.GetCollection()) { OptionDateService.Delete(x); } SendPurgeMessage("OptionChain"); foreach (OptionChain x in OptionChainService.GetCollection()) { OptionChainService.Delete(x); } SendPurgeMessage("BullPutSpread"); foreach (BullPutSpread x in BullPutSpreadService.GetCollection()) { BullPutSpreadService.Delete(x); } SendPurgeMessage("BearCallSpread"); foreach (BearCallSpread x in BearCallSpreadService.GetCollection()) { BearCallSpreadService.Delete(x); } SendPurgeMessage("PairCondor"); foreach (PairCondor x in PairCondorService.GetCollection()) { PairCondorService.Delete(x); } SendPurgeMessage("WeeklyIncomeActionPlan"); foreach (WeeklyIncomeActionPlan x in WeeklyIncomeActionPlanService.GetCollection()) { WeeklyIncomeActionPlanService.Delete(x); } SendPurgeMessage("Call"); foreach (Call x in CallService.GetCollection()) { CallService.Delete(x); } SendPurgeMessage("Put"); foreach (Put x in PutService.GetCollection()) { PutService.Delete(x); } SendPurgeMessage("WeeklyIncomePlaySheet"); foreach (WeeklyIncomePlaySheet x in WeeklyIncomePlaySheetService.GetCollection()) { WeeklyIncomePlaySheetService.Delete(x); } OnRedirectRaised("WeeklyIncome", "Index", 0, this.JobId); }