private void GetLocationSelectTagHelper(BranchRegisterViewModel model)
 {
     ViewBag.Countries =
         _countryBusiness.GetCountries()
         .Select(c => new SelectListItem {
         Text = c.Name, Value = c.Id.ToString()
     })
         .ToList();
     ViewBag.Provinces = _provinceBusiness.GetProvincesByCountry(Guid.Parse(model.IdCountry))
                         .Select(c => new SelectListItem {
         Text = c.Name, Value = c.Id.ToString()
     })
                         .ToList();
     ViewBag.Districts = _districtBusiness.GetDistrictByProvince(Guid.Parse(model.IdProvince))
                         .Select(c => new SelectListItem {
         Text = c.Name, Value = c.Id.ToString()
     })
                         .ToList();
     ViewBag.Parishes = _parishBusiness.GetParishByDistrict(Guid.Parse(model.IdDistrict))
                        .Select(c => new SelectListItem {
         Text = c.Name, Value = c.Id.ToString()
     })
                        .ToList();
     ViewBag.Sectors = _sectorBusiness.GetSectorByDistrict(Guid.Parse(model.IdDistrict))
                       .Select(c => new SelectListItem {
         Text = c.Name, Value = c.Id.ToString()
     })
                       .ToList();
 }
Esempio n. 2
0
 public List <Country> GetAllCountries()
 {
     return(countryBusiness.GetCountries());
 }