public ActionResult Get()
        {
            CountryBLL countryBLL = new CountryBLL(WebApp.Connector);
            IEnumerable <CountryDTO> countries = countryBLL.ReadAll();

            return(Json(countries));
        }
        private void AddEditProperty_BaseGet(Connector connector)
        {
            CountryBLL      countryBLL      = new CountryBLL(connector);
            PropertyTypeBLL propertyTypeBLL = new PropertyTypeBLL(connector);

            ViewBag.Countries = countryBLL.ReadAll();
            ViewBag.Types     = propertyTypeBLL.ReadAll();
        }
Beispiel #3
0
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            CountryBLL countryBLL = new CountryBLL(WebApp.Connector);
            IEnumerable <CountryDTO> countries = countryBLL.ReadAll();

            routes.MapMvcAttributeRoutes(new LocalizableRouteProvider(countries));
        }
Beispiel #4
0
 public ActionResult SignupStep3()
 {
     if (Session["Signup$PersonalInfo"] is PartnerPersonalInfoDTO)
     {
         PartnerCompanyInfoDTO companyInfo = Session["Signup$CompanyInfo"] as PartnerCompanyInfoDTO;
         CountryBLL            countryBLL  = new CountryBLL(WebApp.Connector);
         ViewBag.Countries = countryBLL.ReadAll();
         return(View(companyInfo));
     }
     else
     {
         return(RedirectToAction("SignupStep2"));
     }
 }
Beispiel #5
0
        public ActionResult SignupStep3(PartnerCompanyInfoDTO companyInfo)
        {
            Connector   connector   = WebApp.Connector;
            RegionBLL   regionBLL   = new RegionBLL(connector);
            ProvinceBLL provinceBLL = new ProvinceBLL(connector);
            DistrictBLL districtBLL = new DistrictBLL(connector);
            CountryDTO  country     = companyInfo.Country;
            RegionDTO   region      = companyInfo.Region;
            ProvinceDTO province    = companyInfo.Province;
            DistrictDTO district    = companyInfo.District;

            if (country != null)
            {
                country.Regions = regionBLL.ReadByCountry(country.Id);
                if (region != null)
                {
                    region.Country = country;
                }
                if (province != null)
                {
                    province.Country = country;
                }
                if (district != null)
                {
                    district.Country = country;
                }
            }
            if (region != null)
            {
                region.Provinces = provinceBLL.ReadByCountryAndRegion(country.Id, region.Code);
            }
            if (province != null)
            {
                province.Districts = districtBLL.ReadByCountryAndRegionAndProvince(country.Id, region.Code, province.Code);
            }
            if (ModelState.IsValid)
            {
                Session["Signup$CompanyInfo"] = companyInfo;
                return(RedirectToAction("SignupStep4"));
            }
            else
            {
                CountryBLL countryBLL = new CountryBLL(WebApp.Connector);
                ViewBag.Countries = countryBLL.ReadAll();
                return(BadRequestWithErrors(companyInfo));
            }
        }
        private void EditCompanyInfo_Base(Connector connector)
        {
            CountryBLL countryBLL = new CountryBLL(connector);

            ViewBag.Countries = countryBLL.ReadAll();
        }