// GET: Admin/Office public ActionResult AddOffice() { OfficeModel model = new OfficeModel(); ViewBag.Countries = _ICommonDateService.GetCountries().Select(x => new SelectListItem { Value = x.CountryId.ToString(), Text = x.Name }); ViewBag.States = _ICommonDateService.GetStates().Select(x => new SelectListItem { Value = x.StateId.ToString(), Text = x.Name }); ViewBag.Districts = _ICommonDateService.GetDistricts().Select(x => new SelectListItem { Value = x.DistrictId.ToString(), Text = x.Name }); ViewBag.Cities = _ICommonDateService.GetCities().Select(x => new SelectListItem { Value = x.CityId.ToString(), Text = x.Name }); model.AddressId = Guid.NewGuid(); //model.OfficeId = Guid.NewGuid(); return(View(model)); }
public ActionResult AddCity() { ViewBag.Countries = _ICommonDataService.GetCountries().Select(x => new SelectListItem { Value = x.CountryId.ToString(), Text = x.Name }); ViewBag.States = _ICommonDataService.GetStates().Select(x => new SelectListItem { Value = x.StateId.ToString(), Text = x.Name }).ToList(); ViewBag.Districts = _ICommonDataService.GetDistricts().Select(x => new SelectListItem { Value = x.DistrictId.ToString(), Text = x.Name }).ToList(); return(PartialView("~/Areas/Admin/Views/City/_AddCity.cshtml")); }
public ActionResult AddOperator() { ViewBag.Countries = _ICommonDataService.GetCountries().Select(x => new SelectListItem { Value = x.CountryId.ToString(), Text = x.Name }); ViewBag.States = _ICommonDataService.GetStates().Select(x => new SelectListItem { Value = x.StateId.ToString(), Text = x.Name }); ViewBag.Districts = _ICommonDataService.GetDistricts().Select(x => new SelectListItem { Value = x.DistrictId.ToString(), Text = x.Name }); ViewBag.Cities = _ICommonDataService.GetCities().Select(x => new SelectListItem { Value = x.CityId.ToString(), Text = x.Name }); ViewBag.Designations = _ICommonDataService.GetDesignations().Select(x => new SelectListItem { Value = x.DesignationId.ToString(), Text = x.Name }); return(PartialView("~/Areas/Admin/Views/Office/_AddOperator.cshtml")); }
// GET: College/College public ActionResult Create() { ViewBag.Countries = _commonDataService.GetCountries().Select(x => new SelectListItem { Value = x.CountryId.ToString(), Text = x.Name.ToString() }); ViewBag.States = _commonDataService.GetStates().Select(x => new SelectListItem { Value = x.StateId.ToString(), Text = x.Name }); ViewBag.Districts = _commonDataService.GetDistricts().Select(x => new SelectListItem { Value = x.DistrictId.ToString(), Text = x.Name }); ViewBag.Cities = _commonDataService.GetCities().Select(x => new SelectListItem { Value = x.CityId.ToString(), Text = x.Name }); return(View(new CollegeModel())); }