예제 #1
0
        // 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 AddDistrict()
 {
     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
     });
     return(PartialView("~/Areas/Admin/Views/District/_AddDistrict.cshtml"));
 }
예제 #3
0
        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"));
        }
예제 #4
0
        // 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()));
        }