public AdminkaCrudRoutinePageConsumer( PageModel pageModel, Referrer referrer, [CallerMemberName] string member = null) : this(pageModel, referrer, AspNetCoreManager.SetAndGetPageRoutineFeature(pageModel, referrer), u => MvcAppManager.SetAndGetUserContext(pageModel, u), (ApplicationSettings)pageModel.HttpContext.RequestServices.GetService(typeof(ApplicationSettings)), (IMemoryCache)pageModel.HttpContext.RequestServices.GetService(typeof(IMemoryCache)), new MemberTag(pageModel.GetType().Namespace, pageModel.GetType().Name, member)) { }
public IActionResult OnGet() { Referrer referrer = null; var pageRoutineFeature = AspNetCoreManager.SetAndGetPageRoutineFeature(this, referrer); var routine = new PageContainerRoutineHandler(this, pageRoutineFeature); var page = routine.Handle((container, closure) => { var sinceDate = HttpContext.Request.Query.GetNDate("Since", "MM.dd.yyyy"); var tillDate = HttpContext.Request.Query.GetNDate("Till", "MM.dd.yyyy"); var filter = HttpContext.Request.Query.GetString("Filter"); if (sinceDate != null && tillDate != null) { SinceDate = sinceDate.Value.ToString("MM/dd/yyyy"); TillDate = tillDate.Value.ToString("MM/dd/yyyy"); RangeValue = SinceDate + " - " + TillDate; } Filter = filter; return(Page()); } ); return(page); }