public PartialViewResult GetPartialAddress()
        {
            Session["customerpage"] = "Address";
            CustomerProfileModel model = profiles.FindByUserId(User.Identity.GetUserId());

            if (model == null)
            {
                model        = new CustomerProfileModel();
                model.UserId = User.Identity.GetUserId();
                profiles.Add(model);
            }
            return(PartialView("_CustomerAddress", model));
        }
示例#2
0
        public ActionResult Shipping()
        {
            CustomerProfileModel profile = customerProfiles.FindByUserId(User.Identity.GetUserId());

            if (profile == null)
            {
                // Create a new profile if none exists
                profile        = new CustomerProfileModel();
                profile.UserId = User.Identity.GetUserId();
                customerProfiles.Add(profile);
            }
            return(View(profile));
        }