예제 #1
0
 public void Persist(Factory repositoryFactory)
 {
     Models.Resident resident = new Models.Resident
     {
         FirstName   = this.FirstName,
         LastName    = this.LastName,
         LotNumber   = this.LotNumber,
         PhoneNumber = this.PhoneNumber,
         Email       = this.Email
     };
     repositoryFactory.GetResidentRepository().Save(resident);
 }
예제 #2
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));
 }
예제 #3
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());
 }