コード例 #1
0
        public async Task <IActionResult> Details(int id)
        {
            var model = await _campaignService.GetCampaignDetailsByAccount(CurrentUser.Id, id);

            if (model == null)
            {
                return(NotFound());
            }
            var campaignAccount = await _campaignService.GetCampaignAccountByAccount(CurrentUser.Id, model.Id);

            if (campaignAccount == null)
            {
                return(NotFound());
            }
            ViewBag.CampaignAccount = campaignAccount;
            ViewBag.FacebookId      = await _accountService.GetProviderIdByAccount(CurrentUser.Id, AccountProviderNames.Facebook);

            ViewBag.Categories = await _sharedService.GetCategories();

            ViewBag.CampaignTypeCharges = await _campaignService.GetCampaignTypeCharges();

            ViewBag.Cities = await _sharedService.GetCities();

            return(View(model));
        }
コード例 #2
0
        private async Task ViewbagData()
        {
            ViewBag.Categories = await _sharedService.GetCategories();

            ViewBag.CampaignTypeCharges = await _campaignService.GetCampaignTypeCharges();

            ViewBag.Cities = await _sharedService.GetCities();
        }
コード例 #3
0
        private async Task ViewbagAddress()
        {
            var cities = await _sharedService.GetCities();

            ViewBag.Cities = cities;
            var city       = cities.FirstOrDefault();
            var districtid = city.Id;

            ViewBag.Districts = await _sharedService.GetDistricts(districtid);
        }