public ActionResult get(int stid) //retriving r { connectioncontext hj = new connectioncontext(); retriving k = new retriving(); hj.Configuration.ProxyCreationEnabled = false; ViewBag.uid = new SelectList(k.conx, "id", "city"); List <SelectListItem> districtNames = new List <SelectListItem>(); retriving r = new retriving(); List <string> o = r.conx.Where(x => x.countryid.Equals(stid)).Select(d => d.city).ToList(); return(Json(r.conx.Where(x => x.countryid.Equals(stid)).Select(d => d.city).ToList(), JsonRequestBehavior.AllowGet)); //r.conx.Where(x => x.countryid == r.stid) }
public ActionResult Home(string stid, string uid) //retriving r string stid, string uid { retriving h = new retriving(); ViewBag.stid = new SelectList(h.con, "id", "country"); ViewBag.uid = new SelectList(h.conx, "id", "city"); connectioncontext p = new connectioncontext(); string hj = "Donner"; var values = new HomeViewModel { registration = p.employess .Where(x => x.country.Equals(stid) && x.city.Equals(uid) && x.status.Equals(hj)) }; return(View(values)); }
//public ActionResult logout() //{ // //string path = System.IO.Path.Combine( // // Server.MapPath("~/images/profile"), pic); // //// file is uploaded // //file.SaveAs(path); // Session.Remove("na"); // Session.Remove("em"); // Session.Remove("ff"); // Session.Remove("vallllue"); // return RedirectToAction("log"); //} public ActionResult Home() { // Response.Write( Session["vallllue"]); //if (Session["em"] != null) { retriving h = new retriving(); connectioncontext emp = new connectioncontext(); ViewBag.stid = new SelectList(h.con, "id", "country"); ViewBag.uid = new SelectList(h.conx, "id", "city"); HomeViewModel HomeViewModel = new HomeViewModel { Country = h.con, Cities = h.conx, registration = emp.employess.ToList() }; return(View(HomeViewModel)); }