예제 #1
0
        public IActionResult OnGet()
        {
            Purchase = new Core.Purchase();
            var customers = customerData.GetCustomers().ToList().Select(p => new { Id = p.Id, Display = $"{p.FirstName} {p.LastName}" });

            Customers = new SelectList(customers, "Id", "Display");
            return(Page());
        }
예제 #2
0
        public IActionResult OnGet()
        {
            Visit = new Visit();
            var customers = customerData.GetCustomers().ToList().Select(c => new { Id = c.Id, Display = $"{c.FirstName} {c.LastName}" });

            Customers = new SelectList(customers, "Id", "Display");
            return(Page());
        }
예제 #3
0
        public IActionResult List(string SearchName, string SearchEmail)
        {
            var model = new CustomersListViewModel();

            model.Customers = customerData.GetCustomers(SearchName, SearchEmail);
            return(View(model));
        }
예제 #4
0
        public IActionResult List()
        {
            var model = new MembershipsListViewModel();

            model.Memberships = membershipData.GetMemberships();
            model.Customers   = customerData.GetCustomers();
            return(View(model));
        }
예제 #5
0
        public async Task <IActionResult> GetCustomers(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "customers")] HttpRequest req,
            ILogger log)
        {
            log.LogInformation("Retrieving customers");
            var customers = _data.GetCustomers();

            return(new OkObjectResult(customers));
        }
예제 #6
0
 public void OnGet()
 {
     Memberships = membershipData.GetMemberships();
     Customers   = customerData.GetCustomers();
 }
예제 #7
0
 public void OnGet()
 {
     Customers = customerData.GetCustomers(SearchName, SearchEmail);
 }
 public IActionResult GetCustomers()
 {
     return(Ok(customerData.GetCustomers()));
 }
예제 #9
0
 public void OnGet()
 {
     Customers = customerData.GetCustomers(SearchTerm);
 }
예제 #10
0
        public IActionResult GetCustomersAll()
        {
            var data = customerData.GetCustomers();

            return(Ok(data));
        }