コード例 #1
0
 /**
  * Get information of last-added food
  *
  * @param shopID ID of current shop, get from session attribute
  * @return CusOrdersDetail object that hold detail infor, null for otherwise
  */
 public CusOrdersDetail getLastAddedFood(String shopID) {
   SaleDAO saleDAO = new SaleDAO();
   return saleDAO.getLastAddedFood(shopID);
 }
コード例 #2
0
 /**
  * Add selected food to current orders
  *
  * @param foodID ID of chosen food
  * @param ordersQuantity Quantity of buy
  * @param shopID ID of current shop, get from session attribute
  */
 public void addRequestToOrder(int foodID, int ordersQuantity, String shopID) {
   SaleDAO saleDAO = new SaleDAO();
   saleDAO.addRequestToOrder(foodID, ordersQuantity, shopID);
 }
コード例 #3
0
 /**
  * Delete selected food from current orders (incomplete orders)
  *
  * @param id id of row that hold request
  * @param shopID ID of current shop, get from session attribute
  */
 public void deleteRequestFromOrder(double id, String shopID) {
   SaleDAO saleDAO = new SaleDAO();
   saleDAO.deteleRequestFromOrder(id, shopID);
 }
コード例 #4
0
 /**
  * Get food information and request quantity to add into orders bill. <br>
  * Pre-condition: user add foods from list to order bill
  *
  * @param foodID ID of chosen food
  * @param ordersQuantity Quantity of buy
  * @return CusOrderDetail object
  */
 public CusOrdersDetail getCurrentOrdersDetail(int foodID, int ordersQuantity, String shopID) {
   SaleDAO saleDAO = new SaleDAO();
   return saleDAO.getCurrentOrdersDetail(foodID, ordersQuantity, shopID);
 }
コード例 #5
0
 /**
  * Get detail of current orders
  *
  * @return list of CusOrderDetail object in current orders
  */
 public ArrayList<CusOrdersDetail> getCusOrderDetail(String shopID) {
   SaleDAO saleDAO = new SaleDAO();
   return saleDAO.getCusOrderDetail(shopID);
 }
コード例 #6
0
 /**
  * Get all food information form database.
  *
  * @return ArrayList that contains all Food objects
  */
 public ArrayList<Food> getAllFood() {
   SaleDAO saleDAO = new SaleDAO();
   return saleDAO.getAllFood();
 }
コード例 #7
0
 /**
  * Get all foods information base on it's type (category)
  *
  * @param foodTypeID ID of food type
  * @return ArrayList that contains all Food objects which have matched "foodTypeID"
  */
 public ArrayList<Food> getFoodByFoodType(int foodTypeID) {
   SaleDAO saleDAO = new SaleDAO();
   return saleDAO.getFoodByFoodType(foodTypeID);
 }
コード例 #8
0
 /**
  * Get list of food types (food categories)
  *
  * @return ArrayList that contains all FoodType objects
  */
 public ArrayList<FoodType> getFoodType() {
   SaleDAO saleDAO = new SaleDAO();
   return saleDAO.getFoodType();
 }
コード例 #9
0
 /**
  * Complete current orders
  *
  * @param shopID ID of current shop, get from session attribute
  */
 public void completeOrders(String shopID) {
   SaleDAO saleDAO = new SaleDAO();
   saleDAO.completeOrders(shopID);
 }
コード例 #10
0
 /**
  * Get amount of current orders (incomplete orders)
  *
  * @param shopID ID of current shop, get from session attribute
  * @return
  */
 public double getCurrentOrdersAmount(String shopID) {
   SaleDAO saleDAO = new SaleDAO();
   return saleDAO.getCurrentOrdersAmount(shopID);
 }