// GET: User public ActionResult Index() { Models.Country c = new Models.Country(); Session["Nationality"] = null; ViewBag.allcountry = c.GetallCountry(); return(View()); }
public ActionResult Request() { Session["Request"] = null; Models.Country c = new Models.Country(); ViewBag.allcountry = c.GetallCountry(); Models.Entry e = new Models.Entry(); ViewBag.allentry = e.GetallEntry(); Models.Process_Time pt = new Models.Process_Time(); ViewBag.allprocess = pt.GetallProcess_Time(); if (Session["Nationality"] != null) { Models.Request r = new Models.Request(); r.Country_ID = Convert.ToInt32(Session["Nationality"]); return(View(r)); } return(View()); }
public ActionResult Client(Client c) { if (ModelState.IsValid) { Session["Client"] = c; c.add(); Session["RClient"] = c.Client_ID; return(RedirectToAction("Application")); } Models.Country country = new Models.Country(); ViewBag.allcountry = country.GetallCountry(); Models.Gender g = new Models.Gender(); ViewBag.allgender = g.Getallgender(); Models.Resident r = new Models.Resident(); ViewBag.allresident = r.getallresident(); return(View(c)); }
public ActionResult Client() { Session["Client"] = null; if (Session["Request"] == null) { return(RedirectToAction("Request")); } Models.Country country = new Models.Country(); ViewBag.allcountry = country.GetallCountry(); Models.Gender g = new Models.Gender(); ViewBag.allgender = g.Getallgender(); Models.Resident r = new Models.Resident(); ViewBag.allresident = r.getallresident(); if (Session["Nationality"] != null) { Client c = new Client(); c.Country_ID = Convert.ToInt32(Session["Nationality"]); return(View(c)); } return(View()); }
public ActionResult Request(Models.Request r) { clients = 0; if (ModelState.IsValid) { Session["Request"] = r; clients = r.Travelers; r.Addby = "Client"; r.addrequest(); Session["RRequest"] = r.R_ID; return(RedirectToAction("Client")); } else { Models.Country c = new Models.Country(); ViewBag.allcountry = c.GetallCountry(); Models.Entry e = new Models.Entry(); ViewBag.allentry = e.GetallEntry(); Models.Process_Time pt = new Models.Process_Time(); ViewBag.allprocess = pt.GetallProcess_Time(); return(View(r)); } }