Пример #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));
        }