예제 #1
0
        public ActionResult edit()
        {
            customer userInformation = (customer)Session["loggedIn"];
            ViewBag.username = userInformation.firstname;
            ViewBag.logLink = "<a href='../customer/logOut'>(log out?)</a>";
            ViewBag.optionLink = "<a href='../customer/orders' class='option-link'>Show my orders</a>";
            ViewBag.editInfoLink = "<a href='../customer/edit/" + userInformation.Id + "' class='option-link'>Edit my information</a>";

            var model = new customer
            {
                firstname = userInformation.firstname,
                lastname = userInformation.lastname,
                address = userInformation.address,
                telephone = userInformation.telephone,
                zipcode = userInformation.zipcode,
                email = userInformation.email
            };

            return View(model);
        }
 partial void Deletecustomer(customer instance);
 partial void Updatecustomer(customer instance);
 partial void Insertcustomer(customer instance);
		private void detach_customers(customer entity)
		{
			this.SendPropertyChanging();
			entity.city = null;
		}
		private void attach_customers(customer entity)
		{
			this.SendPropertyChanging();
			entity.city = this;
		}
예제 #7
0
 public ActionResult anonymousOrder(customer customer)
 {
     Session["anonymous"] = customer;
     return RedirectToAction("confirmOrder");
 }