Cookbook edit
This commit is contained in:
@@ -53,7 +53,6 @@ public class Cookbook {
|
|||||||
return true;
|
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) {
|
public boolean insertRecipe(String name, String ingredients, String description, String tags, ImageIcon img) {
|
||||||
try {
|
try {
|
||||||
BufferedImage bImg = new BufferedImage(img.getIconWidth(), img.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
|
BufferedImage bImg = new BufferedImage(img.getIconWidth(), img.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
|
||||||
@@ -62,7 +61,6 @@ public class Cookbook {
|
|||||||
ImageIO.write( bImg, "png", bStream );
|
ImageIO.write( bImg, "png", bStream );
|
||||||
bStream.flush();
|
bStream.flush();
|
||||||
|
|
||||||
|
|
||||||
PreparedStatement prepStmt = conn.prepareStatement(
|
PreparedStatement prepStmt = conn.prepareStatement(
|
||||||
"INSERT INTO recipes VALUES (NULL, ?, ?, ?, ?, ?);");
|
"INSERT INTO recipes VALUES (NULL, ?, ?, ?, ?, ?);");
|
||||||
prepStmt.setString(1, name);
|
prepStmt.setString(1, name);
|
||||||
@@ -78,12 +76,6 @@ public class Cookbook {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
catch (IOException e) {
|
|
||||||
System.err.println("Blad przy wstawianiu przepisu");
|
|
||||||
e.printStackTrace();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user