public String detailProduct() throws Exception { // link to admin_edit.jsp initServlet(); try { clothesProduct = clothesProductService.getClothesProductById(productId); resultPage = "detailProduct"; } catch (Exception e) { e.printStackTrace(); } return resultPage; }
public String deleteProduct() throws Exception { // delete product information try { initServlet(); ClothesProduct product = clothesProductService.getClothesProductById(productId); clothesProductService.deleteClothesProduct(product); message = "商品: [ " + product.getProductName() + " ] 已經刪除。"; if (clothesProduct != null) clothesProduct = null; clothesProducts = clothesProductService.getAllClothesProduct(); } catch (Exception e) { message = "無法刪除,此商品正在被選取中。"; e.printStackTrace(); } return "productdelete"; }
public String jumpproductedit() { clothesProduct = clothesProductService.getClothesProductById(productId); clothesChecks = clothesCheckService.getAllClothesCheck(); return "changeproductedit"; }
public String jumpproductdelete() { clothesProduct = clothesProductService.getClothesProductById(productId); return "changeproductdelete"; }