public ActionResult Register() { UserContextModel objUser = new UserContextModel(); this.loadViewBag(); CountryModel objCountry = new CountryModel(); var lst = objCountry.GetCountrys(); List <SelectListItem> lstData = (from tbl in lst select new SelectListItem { Text = tbl.CountryName, Value = tbl.CountryId.ToString() }).ToList(); lstData.Insert(0, new SelectListItem() { Text = "---Select Country---", Value = "0" }); ViewBag.CountryId = lstData; List <SelectListItem> lstPanchayat = (from tbl in objUser.GetPanchayatList() select new SelectListItem { Value = tbl.UserId.ToString(), Text = tbl.FirstName + " " + tbl.LName + " " + tbl.City + " " + tbl.Address + " " + tbl.State + " " + tbl.PanchayatCode }).ToList(); ViewBag.AgentId = lstPanchayat; return(View("Register")); }
public ActionResult Index() { this.LoadIsAdmin(); CountryModel objCountry = new CountryModel(); var lst = objCountry.GetCountrys(); List <SelectListItem> lstData = (from tbl in lst select new SelectListItem { Text = tbl.CountryName, Value = tbl.CountryId.ToString() }).ToList(); lstData.Insert(0, new SelectListItem() { Text = SettingsManager.Instance.Branding == "SINDHI" ? "---Select Country---" : "---देश निवडा---", Value = "0" }); ViewBag.CountryId = lstData; lstData = new List <SelectListItem>(); lstData.Add(new SelectListItem() { Text = SettingsManager.Instance.Branding == "SINDHI" ? "---Select State---" : "---राज्य निवडा---", Value = "0" }); ViewBag.StateId = lstData; var countries = objCity.GetCities(); int pageindex = 0; var filter = countries.OrderBy(p => p.CityId).Skip(pageindex * PageSize).Take(PageSize); Session["users"] = countries; Session["pageindex"] = 0; return(View("Index", filter)); }
public ActionResult BasicDetails() { OrasModel oras = new OrasModel(); CastContextModel objC = new CastContextModel(); ReligionModel objReligion = new ReligionModel(); CountryModel objCountry = new CountryModel(); StateModel objState = new StateModel(); BloodGroupModel objB = new BloodGroupModel(); BasicResponse response = new BasicResponse() { CastData = objC.GetCasts(), OrasData = oras.GetOrass(), BloodGroup = objB.GetBloodGroups(), CountryData = objCountry.GetCountrys(), HeightData = oras.GetHeights(), ReligionData = objReligion.GetReligions(), StateList = objState.GetStates(), }; return(Json(response, JsonRequestBehavior.AllowGet)); }
public ActionResult Index() { this.LoadIsAdmin(); CountryModel objCountry = new CountryModel(); var lst = objCountry.GetCountrys(); List <SelectListItem> lstData = (from tbl in lst select new SelectListItem { Text = tbl.CountryName, Value = tbl.CountryId.ToString() }).ToList(); lstData.Insert(0, new SelectListItem() { Text = "---Select---", Value = "0" }); ViewBag.CountryId = lstData; var countries = objState.GetStates(); int pageindex = 0; var filter = countries.OrderBy(p => p.StateId).Skip(pageindex * PageSize).Take(PageSize); Session["users"] = countries; Session["pageindex"] = 0; return(View("Index", filter)); }