示例#1
0
        public IActionResult OnGet(int?Id)
        {
            if (Id.HasValue)
            {
                Customer = customer.GetCustomerById(Id.Value);
                if (Customer == null)
                {
                    return(RedirectToPage("./NotFound"));
                }
            }
            else
            {
                Customer = new Customer();
            }
            var membership = memberShip.GetMemberShips().ToList().Select(p => new { Id = p.Id, Display = p.GetMemberShipType() });

            MemberShips = new SelectList(membership, "Id", "Display");
            return(Page());
        }
示例#2
0
 public void OnGet()
 {
     Memberships = membershipData.GetMemberShips();
 }