コード例 #1
0
 public CustomerMenu(SavvyContext context, DBMapper mapper)
 {
     this.repo   = new SavvyRepo(context, mapper);
     productMenu = new ProductMenu(context, mapper, customer);
     cartMenu    = new CartMenu();
     //orderhistorymenu = new OrderHistoryMenu(context, mapper);
 }
コード例 #2
0
        //Checking locations are returned
        public void ActuallyGetsAllLocations()
        {
            using var test1 = new SavvyContext();
            SavvyRepo repo = new SavvyRepo(test1, new DBMapper());
            List <SavvyDB.Entities.Location> locations = repo.GetLocations();

            Assert.NotNull(locations);
        }
コード例 #3
0
 public ManagerMenu(SavvyRepo repo)
 {
     this.repo          = repo;
     this.locationtask  = new LocationTask(repo);
     this.inventorytask = new InventoryTask(repo);
     this.producttask   = new ProductTask(repo);
     this.ordertask     = new OrderTask(repo);
     this.orderitemtask = new OrderItemTask(repo);
 }
コード例 #4
0
 public OrderHistoryMenu(SavvyContext context, DBMapper mapper)
 {
     this.repo          = new SavvyRepo(context, mapper);
     this.locationtask  = new LocationTask(repo);
     this.inventorytask = new InventoryTask(repo);
     this.producttask   = new ProductTask(repo);
     this.ordertask     = new OrderTask(repo);
     this.orderitemtask = new OrderItemTask(repo);
     this.customertask  = new CustomerTask(repo);
 }
コード例 #5
0
        public CartMenu()
        {
            SavvyContext context = new SavvyContext();
            DBMapper     mapper  = new DBMapper();

            this.repo          = new SavvyRepo(context, mapper);
            this.locationtask  = new LocationTask(repo);
            this.inventorytask = new InventoryTask(repo);
            this.producttask   = new ProductTask(repo);
            this.carttask      = new CartTask(repo);
            this.cartitemtask  = new CartItemTask(repo);
            this.ordertask     = new OrderTask(repo);
            this.orderitemtask = new OrderItemTask(repo);
        }
コード例 #6
0
 public InventoryTask(SavvyRepo repo)
 {
     this.repo = repo;
 }
コード例 #7
0
 public LocationTask(SavvyRepo repo)
 {
     this.repo = repo;
 }
コード例 #8
0
 public OrderTask(SavvyRepo repo)
 {
     this.repo = repo;
 }
コード例 #9
0
 public CartTask(SavvyRepo repo)
 {
     this.repo = repo;
 }
コード例 #10
0
 public ProductTask(SavvyRepo repo)
 {
     this.repo = repo;
 }
コード例 #11
0
 public CustomerTask(SavvyRepo repo)
 {
     this.repo = repo;
 }
コード例 #12
0
 public ManagerTask(SavvyRepo repo)
 {
     this.repo = repo;
 }
コード例 #13
0
 public ProductMenu(SavvyContext context, DBMapper mapper, Customer Customer)
 {
     this.repo     = new SavvyRepo(context, mapper);
     this.Customer = Customer;
 }