コード例 #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
ファイル: Edit.cshtml.cs プロジェクト: AndyHak/BeautyShopGit
        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);
 }
コード例 #8
0
 public IActionResult GetCustomers()
 {
     return(Ok(customerData.GetCustomers()));
 }
コード例 #9
0
ファイル: List.cshtml.cs プロジェクト: AndyHak/BeautyShopGit
 public void OnGet()
 {
     Customers = customerData.GetCustomers(SearchTerm);
 }
コード例 #10
0
        public IActionResult GetCustomersAll()
        {
            var data = customerData.GetCustomers();

            return(Ok(data));
        }