Пример #1
0
 public ActionResult BasicInfo()
 {
     if (Session["countryId"] != null)
     {
         var service = new CountryInfoService();
         var model   = service.GetCountryInfoValues((int)Session["countryId"]);
         Session["countryId"]   = model.Country.Id;
         Session["countryCode"] = model.Country.Code;
         return(View("Details", model));
     }
     else
     {
         return(RedirectToAction("Index"));
     }
 }
Пример #2
0
        public ActionResult Index(int?countryId = null, string countryName = null)
        {
            var service = new CountryInfoService();

            try
            {
                var model = service.GetCountryInfoValues(countryId, countryName);
                Session["countryId"]   = model.Country.Id;
                Session["countryCode"] = model.Country.Code;
                return(View("DetailsCrimeRate", model));
            }
            catch
            {
                return(View("~/Views/Home/NoCountryInfo.cshtml"));
            }
        }