Esempio n. 1
0
 public ActionResult CompetitionItem(LanguageType languagetype, FilterModel<BrokerType> filter, StateFilter state = StateFilter.All)
 {
     var dateTime = DateTime.UtcNow.Date;
     if (filter.date == DateTime.MinValue) {
         filter.FixDates(dateTime, dateTime);
     }
     filter.FixDates(new DateTime(2014, 01, 01), dateTime.AddDays(14));
     return View(new StaticPageBaseModel<WithFilterModel<BrokerType, List<RawCompetitionTransport>>>(this) {
         ControllerModel = new WithFilterModel<BrokerType, List<RawCompetitionTransport>>(new FilterModel<BrokerType>("CompetitionItem", "SystemState", CurrentLanguage, FilterSettings.ToDate, filter, new RouteValueDictionary(new { languagetype, state }))) {
             Data = _provider.GetCompetitionItems(filter.id, languagetype, filter.date, state)
         }
     });
 }
Esempio n. 2
0
 public ActionResult Index(FilterModel<int> filter)
 {
     var dateTime = DateTime.UtcNow.Date;
     if (filter.date == DateTime.MinValue) {
         filter.FixDates(dateTime, dateTime);
     }
     filter.FixDates(new DateTime(2014, 01, 01), dateTime.AddDays(14));
     var fixUserTimeToSystem = FixUserTimeToSystem(filter.date);
     return View(new StaticPageBaseModel<WithFilterModel<List<SystemStateSummaryStatus>>>(this) {
         ControllerModel = new WithFilterModel<List<SystemStateSummaryStatus>>(new FilterModel<int>("Index", "SystemState", CurrentLanguage, _filterSettings, filter)) {
             Data = filter.all ? _provider.SummarySystemState() : _provider.SummarySystemState(fixUserTimeToSystem, fixUserTimeToSystem.AddDays(1))
         }
     });
 }
Esempio n. 3
0
 public ActionResult Item(FilterModel<int> filter)
 {
     LogAction(ProjectBActions.PageHistoryCompetitionUniqueIDConcrete, filter.id);
     filter.FixDates(_minDateTime, MaxDateTime);
     var itemData = FrontCompetitionProvider
         .GetCompetitionItemsHistory(CurrentLanguage, null, new[] { BrokerType.Default }, filter.from, filter.date, null, new [] { filter.id });
     var staticPageBaseModel = new StaticPageBaseModel<CompetitionRegularModel<CompetitionItemBetTransport>>(this) {
             ControllerModel = new CompetitionRegularModel<CompetitionItemBetTransport>(new PageDisplaySettings {
                 DisplayColumn = DisplayColumnType.TraditionalOdds | DisplayColumnType.Result
             }) {
             Competitions = itemData,
                 Filter = new FilterModel<int>("Item", "History", CurrentLanguage, FilterSettings.FromDate | FilterSettings.ToDate, filter)
             }
     };
     return new ActionResultCached(
         itemData.Any(),
         staticPageBaseModel.GetLastModifiedFunc(() => TryGetNotModifiedResultForItems(itemData, staticPageBaseModel.StaticPageTransport.LastModifyDateUtc)),
         () => {
             itemData.Each(FixToUserTime);
             return View(staticPageBaseModel);
         });
 }
Esempio n. 4
0
 public ActionResult Index(FilterModel<SportType> filter)
 {
     LogAction(ProjectBActions.PageHistoryIndexConcrete, (short)filter.id);
     filter.FixDates(_minDateTime, MaxDateTime);
     var fromDate = FixUserTimeToSystem(filter.date);
     var itemData = FrontCompetitionProvider.GetCompetitionItemsHistory(CurrentLanguage, null, new[] {BrokerType.Default}, fromDate, fromDate.AddDays(1), filter.id);
     var model = new StaticPageBaseModel<CompetitionRegularModel<CompetitionItemBetTransport>>(this) {
         ControllerModel = new CompetitionRegularModel<CompetitionItemBetTransport>(new PageDisplaySettings {
                 DisplayColumn = DisplayColumnType.TraditionalOdds | DisplayColumnType.Result
             }) {
             Competitions = itemData,
             Filter = new FilterModel<SportType>("Index", "History" , CurrentLanguage, FilterSettings.ToDate, filter)
         }
     };
     return new ActionResultCached(
         true,
         model.GetLastModifiedFunc(() => TryGetNotModifiedResultForItems(itemData, model.StaticPageTransport.LastModifyDateUtc)),
         () => {
             itemData.Each(FixToUserTime);
             return View(model);
         });
 }
Esempio n. 5
0
 public ActionResult Index(FilterModel<SportType> filter)
 {
     LogAction(ProjectBActions.PageCompetitionIndexConcrete, (short)filter.id);
     var dateDef = DateTime.UtcNow.Date;
     var maxDateDef = dateDef.AddDays(14);
     filter.FixDates(dateDef, maxDateDef);
     var itemData = FrontCompetitionProvider.GetCompetitionItemsFuturedNew(CurrentLanguage, filter.all ? null : (DateTime?)FixUserTimeToSystem(filter.from), null, null, filter.id);
     var model = new StaticPageBaseModel<CompetitionRegularModel<CompetitionItemBetTransport>>(this) {
         ControllerModel = new CompetitionRegularModel<CompetitionItemBetTransport>(new PageDisplaySettings {
             LimitToDisplayInGroup = 4,
             DisplayColumn = DisplayColumnType.TraditionalOdds
         }) {
             Competitions = itemData,
             Filter = new FilterModel<SportType>("Index", "Competition", CurrentLanguage, FilterSettings.BtnAll | FilterSettings.FromDate, filter)
         }
     };
     return new ActionResultCached(
         true,
         model.GetLastModifiedFunc(() => TryGetNotModifiedResultForItems(itemData, model.StaticPageTransport.LastModifyDateUtc)),
         () => {
             itemData.Each(FixToUserTime);
             return View(model);
         });
 }