Exemplo n.º 1
0
        async public Task <IActionResult> Offers(int?FilterTypeId)
        {
            SetPageContent("offers");

            var user = await _userEngine.CurrentUser(_userManager.GetUserId(User));

            var filterType = FilterTypeId != null ? (OfferFilterTypes)FilterTypeId : OfferFilterTypes.All;
            var model      = new OffersViewModel()
            {
                Offers       = _projectEngine.GetUserOffers(user.Id, filterType),
                FilterTypeId = (int)filterType,
                FilterTypes  = _projectEngine.GetOfferFilterTypes()
            };

            return(View(model));
        }