예제 #1
0
  public OrderEntryService() {
    Customer customer = dao.addCustomer("David Hurng");
    Customer customer2 = dao.addCustomer("Michelle Cady");
    Product product = dao.addProduct("apples", 12);
    Product product2 = dao.addProduct("bananas", 6.25);

    Cart cart = dao.addOrder(customer, product);
  }
예제 #2
0
 public void updatePrice(int id, double price) {
   dao.updatePrice(id, price);
 }
예제 #3
0
 public Product searchProductID(int id) {
   return dao.searchProductID(id);
 }
예제 #4
0
 public Cart getSpecOrder(int id) {
   return dao.getSpecOrder(id);
 }
예제 #5
0
 public void addToCart(Cart cart, String prodName) {
   dao.addToCart(cart, prodName);
 }
예제 #6
0
 public Cart searchCart(int id) {
   return dao.searchCart(id);
 }
예제 #7
0
 public Cart addOrder(Customer customer, Product product) {
   return dao.addOrder(customer, product);
 }
예제 #8
0
 public Cart getCart(int id) {
   Cart cart = dao.getSpecOrder(id);
   return cart;
 }
예제 #9
0
 public Customer searchCustomer(String name) {
   return dao.searchCustomer(name);
 }
예제 #10
0
 public Customer searchCustomerID(int customerID) {
   return dao.searchCustomerID(customerID);
 }
예제 #11
0
 public Product addProduct(String name, double price) {
   return dao.addProduct(name, price);
 }
예제 #12
0
 public Customer addCustomer(String name) {
   return dao.addCustomer(name);
 }
예제 #13
0
 public void updateOrder(Cart cart) {
   dao.updateCart(cart);
 }
예제 #14
0
 public void submitOrder(Cart cart) {
   dao.submitOrder(cart);
 }
예제 #15
0
 public void updateTotal(Cart cart) {
   dao.updateTotal(cart);
 }
예제 #16
0
 public Product searchProduct(String name) {
   return dao.searchProduct(name);
 }
예제 #17
0
 public void deleteCart(int id) {
   dao.deleteCart(id);
 }
예제 #18
0
 public List<Cart> getCart() {
   List<Cart> orders = dao.getOrders();
   return orders;
 }