Example #1
0
 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));
 }
Example #2
0
 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());
 }