public static string deleteProductType(ProductType pt) { try { ProductTypeHandler.deleteProductType(pt.ID); } catch (Exception ex) { Console.WriteLine(ex.ToString()); return("Database update on server failure, please try again!"); } return(""); }
public String deleteAttempt(String targetId) { String errMsg = validateInputId(targetId); if (errMsg == null) { List <ProductTypes> listProductTypes = productTypeHdlr.getProductType(); errMsg = validateProductTypeId(targetId, listProductTypes); if (errMsg == null) { productTypeHdlr.deleteProductType(targetId); return(errMsg); } ; } return(errMsg); }
public static void deleteProductType(int id) { ProductTypeHandler.deleteProductType(id); }