Cookbook edit
This commit is contained in:
@@ -53,7 +53,6 @@ public class Cookbook {
|
||||
return true;
|
||||
}
|
||||
|
||||
/* funkcja przestarzała (deprecated) - do usunięcia w bliskiej przyszłości - PioDer */
|
||||
public boolean insertRecipe(String name, String ingredients, String description, String tags, ImageIcon img) {
|
||||
try {
|
||||
BufferedImage bImg = new BufferedImage(img.getIconWidth(), img.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
|
||||
@@ -62,7 +61,6 @@ public class Cookbook {
|
||||
ImageIO.write( bImg, "png", bStream );
|
||||
bStream.flush();
|
||||
|
||||
|
||||
PreparedStatement prepStmt = conn.prepareStatement(
|
||||
"INSERT INTO recipes VALUES (NULL, ?, ?, ?, ?, ?);");
|
||||
prepStmt.setString(1, name);
|
||||
@@ -78,12 +76,6 @@ public class Cookbook {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
catch (IOException e) {
|
||||
System.err.println("Blad przy wstawianiu przepisu");
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user