コード例 #1
0
        public ActionResult Index()
        {
            // at the moment this is valid only for users which has bought product 2
            if (this.UserData.Products.Any(x => x.ProductId == 2))
            {
                var allPeriods = Doc.GetEuFinsDocumentsPeriods(siteLangId: this.Language.Id).ToList();

                var period = allPeriods.FirstOrDefault()?.Period ?? YearMonth.Now();

                return(this.PeriodInternal(period, period, allPeriods));
            }
            else
            {
                return(RedirectToAction(actionName: nameof(HomeController.Index), controllerName: nameof(HomeController)));
            }
        }