From 367db7b0832e1325a0f1d0580baffa28deca86f4 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 Apr 2014 11:55:21 +0200 Subject: test --- Dozentenmodul/src/models/Lecture.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Dozentenmodul/src/models/Lecture.java') diff --git a/Dozentenmodul/src/models/Lecture.java b/Dozentenmodul/src/models/Lecture.java index 383bded9..069946b3 100644 --- a/Dozentenmodul/src/models/Lecture.java +++ b/Dozentenmodul/src/models/Lecture.java @@ -11,9 +11,28 @@ public class Lecture { private Date startdate; private Date enddate; private boolean active; + private String id; + private String linkedImagename; + public static Lecture lecture =new Lecture(); + + public String getLinkedImagename() { + return linkedImagename; + } + + public void setLinkedImagename(String linkedImagename) { + this.linkedImagename = linkedImagename; + } + + public String getid() { + return id; + } + + public void setid(String id) { + this.id = id; + } public String getName() { return name; } -- cgit v1.2.3-55-g7522 From 0fbe8c2ce5354de8a2725003e9d259a7d722c184 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Apr 2014 13:13:21 +0200 Subject: Update der Datenbank beim Update der Veranstaltung funktioniert nun --- Dozentenmodul/bin/Models/Lecture.class | Bin 2035 -> 2226 bytes .../bin/gui/image/FTPCreateUploader_GUI$1.class | Bin 792 -> 792 bytes .../bin/gui/image/FTPCreateUploader_GUI$2.class | Bin 1313 -> 1313 bytes .../bin/gui/image/FTPCreateUploader_GUI$3.class | Bin 1446 -> 1446 bytes .../bin/gui/image/FTPCreateUploader_GUI$4.class | Bin 1198 -> 1198 bytes .../bin/gui/image/FTPCreateUploader_GUI$5.class | Bin 813 -> 813 bytes .../bin/gui/image/FTPCreateUploader_GUI$6.class | Bin 1707 -> 1707 bytes .../bin/gui/image/FTPCreateUploader_GUI$7.class | Bin 1652 -> 1652 bytes .../bin/gui/image/FTPCreateUploader_GUI$8.class | Bin 1014 -> 1014 bytes .../bin/gui/image/FTPCreateUploader_GUI.class | Bin 12313 -> 12312 bytes .../bin/gui/image/FTPDownloader_GUI$1.class | Bin 1414 -> 1414 bytes .../bin/gui/image/FTPDownloader_GUI$2.class | Bin 1303 -> 1303 bytes .../bin/gui/image/FTPDownloader_GUI$3.class | Bin 1167 -> 1167 bytes .../bin/gui/image/FTPDownloader_GUI$4.class | Bin 785 -> 785 bytes .../bin/gui/image/FTPDownloader_GUI$5.class | Bin 1557 -> 1557 bytes .../bin/gui/image/FTPDownloader_GUI$6.class | Bin 972 -> 972 bytes .../bin/gui/image/FTPDownloader_GUI.class | Bin 9974 -> 9974 bytes .../bin/gui/image/FTPEditUploader_GUI$1.class | Bin 782 -> 782 bytes .../bin/gui/image/FTPEditUploader_GUI$2.class | Bin 1301 -> 1301 bytes .../bin/gui/image/FTPEditUploader_GUI$3.class | Bin 1434 -> 1434 bytes .../bin/gui/image/FTPEditUploader_GUI$4.class | Bin 1186 -> 1186 bytes .../bin/gui/image/FTPEditUploader_GUI$5.class | Bin 799 -> 799 bytes .../bin/gui/image/FTPEditUploader_GUI$6.class | Bin 1503 -> 1503 bytes .../bin/gui/image/FTPEditUploader_GUI.class | Bin 11869 -> 11868 bytes .../gui/lecture/EditLectureAllgemein_GUI$4.class | Bin 1912 -> 1951 bytes .../bin/gui/lecture/EditLectureAllgemein_GUI.class | Bin 9977 -> 9977 bytes Dozentenmodul/bin/models/Lecture.class | Bin 2035 -> 2226 bytes Dozentenmodul/src/Models/Lecture.java | 9 ++++ .../src/gui/image/FTPCreateUploader_GUI.java | 4 +- Dozentenmodul/src/gui/image/FTPDownloader_GUI.java | 4 +- .../src/gui/image/FTPEditUploader_GUI.java | 4 +- .../src/gui/lecture/CreateLectureLink_GUI.java | 5 +- .../src/gui/lecture/EditLectureAllgemein_GUI.java | 3 +- .../src/gui/lecture/EditLectureLink_GUI.java | 29 ++++++----- Dozentenmodul/src/models/Lecture.java | 9 ++++ Dozentenmodulserver/bin/server/ServerHandler.class | Bin 11027 -> 11415 bytes Dozentenmodulserver/bin/sql/SQL.class | Bin 14453 -> 14580 bytes Dozentenmodulserver/src/server/ServerHandler.java | 16 ++++++- Dozentenmodulserver/src/sql/SQL.java | 53 ++++++++------------- 39 files changed, 83 insertions(+), 53 deletions(-) (limited to 'Dozentenmodul/src/models/Lecture.java') diff --git a/Dozentenmodul/bin/Models/Lecture.class b/Dozentenmodul/bin/Models/Lecture.class index 7c968cd1..a0cb753d 100644 Binary files a/Dozentenmodul/bin/Models/Lecture.class and b/Dozentenmodul/bin/Models/Lecture.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class index 8a14b449..3eded544 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class index 8a5194f2..aac75f6d 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class index a788e377..4adde720 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class index 8dcb0f90..03aeea73 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class index 70962f9c..7ffa5033 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class index c02959c2..720ce3cd 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class index f5009ce3..496f2158 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$7.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class index e3beaa57..29269bbd 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class index cec2cfad..bf24ef25 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class index 28596b7f..3be2f5f1 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class index 8b17dab5..217b987a 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class index 0b03bc49..0b7106e2 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class index 75c93b92..9b5b4107 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class index 0c97260a..847b6416 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class index 842bbb87..cb5888ae 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class index 0f9f8a09..97b76e5c 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class index 5df62ad7..a25d7157 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$1.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class index 4a933e6e..55d72ee9 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$2.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class index b790203f..23f71ee1 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$3.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class index 44bbface..dfb69143 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class index cadf961a..87c0067c 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$5.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class index cd7f2b25..8d99419a 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI$6.class differ diff --git a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class index 5a6ea8fa..71d93a4a 100644 Binary files a/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class and b/Dozentenmodul/bin/gui/image/FTPEditUploader_GUI.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class index 57e66269..c412ac7b 100644 Binary files a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class and b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI$4.class differ diff --git a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class index 05c6ac16..83d7cf3e 100644 Binary files a/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class and b/Dozentenmodul/bin/gui/lecture/EditLectureAllgemein_GUI.class differ diff --git a/Dozentenmodul/bin/models/Lecture.class b/Dozentenmodul/bin/models/Lecture.class index 7c968cd1..a0cb753d 100644 Binary files a/Dozentenmodul/bin/models/Lecture.class and b/Dozentenmodul/bin/models/Lecture.class differ diff --git a/Dozentenmodul/src/Models/Lecture.java b/Dozentenmodul/src/Models/Lecture.java index 069946b3..6b7e6fa1 100644 --- a/Dozentenmodul/src/Models/Lecture.java +++ b/Dozentenmodul/src/Models/Lecture.java @@ -6,6 +6,7 @@ public class Lecture { private String name; + private String newName; private String shortDesc; private String desc; private Date startdate; @@ -18,6 +19,14 @@ public class Lecture { public static Lecture lecture =new Lecture(); + public String getNewName() { + return newName; + } + + public void setNewName(String newName) { + this.newName = newName; + } + public String getLinkedImagename() { return linkedImagename; } diff --git a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java index 1bf8cc3a..cd952d0f 100644 --- a/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPCreateUploader_GUI.java @@ -50,8 +50,8 @@ public class FTPCreateUploader_GUI extends JFrame implements private final JPanel contentPanel = new JPanel(); JLabel lblPath; JProgressBar progressBar; - //String host = "141.79.128.121"; - String host = "141.79.128.102"; + String host = "141.79.128.121"; + //String host = "141.79.128.102"; int port = 21; server.User user; String filename = ""; diff --git a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java index d0f789f4..2ace42c6 100644 --- a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java @@ -45,8 +45,8 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener JLabel downspeed; User user; JProgressBar progressBar; - //String host = "141.79.128.121"; - String host = "141.79.128.102"; + String host = "141.79.128.121"; + //String host = "141.79.128.102"; int port = 21; String downloadFile = ""; static String arg = ""; diff --git a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java index b184c96c..a23e85d2 100644 --- a/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPEditUploader_GUI.java @@ -49,8 +49,8 @@ public class FTPEditUploader_GUI extends JFrame implements private final JPanel contentPanel = new JPanel(); JLabel lblPath; JProgressBar progressBar; - //String host = "141.79.128.121"; - String host = "141.79.128.102"; + String host = "141.79.128.121"; + //String host = "141.79.128.102"; int port = 21; server.User user; String filename = ""; diff --git a/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java index a9125829..2243fd43 100644 --- a/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java +++ b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java @@ -476,8 +476,9 @@ public class CreateLectureLink_GUI extends JFrame { images.get(x).getLicenseRestriction(), images.get(x).getOsName(), images.get(x).getLectureName(), - images.get(x).getUpdateTime(), - images.get(x).getUserData() }; + images.get(x).getUserData(), + images.get(x).getUpdateTime() + }; ListObj.add(obj); model.addRow(ListObj.get(x)); x++; diff --git a/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java index 40b3ce84..115a9f1f 100644 --- a/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java +++ b/Dozentenmodul/src/gui/lecture/EditLectureAllgemein_GUI.java @@ -361,13 +361,14 @@ public class EditLectureAllgemein_GUI extends JFrame { } Lecture.lecture.setName(textFieldLaborname.getText()); + Lecture.lecture.setNewName(textFieldLaborname.getText()); Lecture.lecture.setDesc(description.getText()); Lecture.lecture.setEnddate(dateChooserend.getDate()); Lecture.lecture.setStartdate(dateChooserstart.getDate()); Image.image.setImagename(textFieldLaborname.getText()); - CreateLectureLink_GUI ev=new CreateLectureLink_GUI(); + EditLectureLink_GUI ev=new EditLectureLink_GUI(); ev.setVisible(true); dispose(); } diff --git a/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java index c245ce79..c1fdec80 100644 --- a/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java +++ b/Dozentenmodul/src/gui/lecture/EditLectureLink_GUI.java @@ -63,7 +63,7 @@ public class EditLectureLink_GUI extends JFrame { JTable tablePublicVorlagen = new JTable(); private JTextField textFieldName; String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung", - "Verantwortlicher", "Letztes Update", "Schlagwort" }; + "Verantwortlicher", "Letztes Update", "Schlagwort", "ID", "Version" }; ThriftConnection thrift = new ThriftConnection(); Client client = thrift.getThriftConnection(); @@ -355,7 +355,7 @@ public class EditLectureLink_GUI extends JFrame { } { JButton cancelButton = new JButton( - "Veranstaltung erzeugen und abschlie\u00DFen"); + "Veranstaltung ändern und abschlie\u00DFen"); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -370,14 +370,16 @@ public class EditLectureLink_GUI extends JFrame { String imagename = tableAllImages.getValueAt( tableAllImages.getSelectedRow(), 0) .toString(); + System.out.println("ID: "+Lecture.lecture.getid()); + try { - DateFormat formatter = new SimpleDateFormat( - "yyyy-MM-dd hh:mm:ss"); - System.out.println(formatter.format( - Lecture.lecture.getStartdate()) + + DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + System.out.println( formatter.format( + Lecture.lecture.getEnddate()) .toString()); - client.writeLecturedata( - Lecture.lecture.getName(), + client.updateLecturedata(Lecture.lecture.getName(), + Lecture.lecture.getNewName(), Lecture.lecture.getShortDesc(), Lecture.lecture.getDesc(), formatter.format( @@ -393,7 +395,9 @@ public class EditLectureLink_GUI extends JFrame { person.verantwortlicher.getHochschule(), person.verantwortlicher.getEMail(), person.verantwortlicher.getTel(), - person.verantwortlicher.getFakultät()); + person.verantwortlicher.getFakultät(), + Lecture.lecture.getid()); + } catch (TException e1) { // TODO Auto-generated catch block e1.printStackTrace(); @@ -407,6 +411,8 @@ public class EditLectureLink_GUI extends JFrame { JOptionPane.INFORMATION_MESSAGE); } + MainMenue_GUI m = new MainMenue_GUI(); + m.setVisible(true); dispose(); } @@ -459,8 +465,9 @@ public class EditLectureLink_GUI extends JFrame { images.get(x).getLicenseRestriction(), images.get(x).getOsName(), images.get(x).getLectureName(), - images.get(x).getUpdateTime(), - images.get(x).getUserData() }; + images.get(x).getUserData(), + images.get(x).getUpdateTime(), "", images.get(x).id, + images.get(x).getVersion() }; ListObj.add(obj); model.addRow(ListObj.get(x)); x++; diff --git a/Dozentenmodul/src/models/Lecture.java b/Dozentenmodul/src/models/Lecture.java index 069946b3..6b7e6fa1 100644 --- a/Dozentenmodul/src/models/Lecture.java +++ b/Dozentenmodul/src/models/Lecture.java @@ -6,6 +6,7 @@ public class Lecture { private String name; + private String newName; private String shortDesc; private String desc; private Date startdate; @@ -18,6 +19,14 @@ public class Lecture { public static Lecture lecture =new Lecture(); + public String getNewName() { + return newName; + } + + public void setNewName(String newName) { + this.newName = newName; + } + public String getLinkedImagename() { return linkedImagename; } diff --git a/Dozentenmodulserver/bin/server/ServerHandler.class b/Dozentenmodulserver/bin/server/ServerHandler.class index d14b9ee1..76357894 100644 Binary files a/Dozentenmodulserver/bin/server/ServerHandler.class and b/Dozentenmodulserver/bin/server/ServerHandler.class differ diff --git a/Dozentenmodulserver/bin/sql/SQL.class b/Dozentenmodulserver/bin/sql/SQL.class index ea2ae3c3..6a4524b7 100644 Binary files a/Dozentenmodulserver/bin/sql/SQL.class and b/Dozentenmodulserver/bin/sql/SQL.class differ diff --git a/Dozentenmodulserver/src/server/ServerHandler.java b/Dozentenmodulserver/src/server/ServerHandler.java index c7ab500b..9474d942 100644 --- a/Dozentenmodulserver/src/server/ServerHandler.java +++ b/Dozentenmodulserver/src/server/ServerHandler.java @@ -311,7 +311,21 @@ public class ServerHandler implements Server.Iface { boolean isActive, String imagename, String firstname, String lastname, String university, String Mail, String Tel, String Fak, String id) throws TException { - // TODO Auto-generated method stub + int pk_image=0; + int imageversion=0; + ResultSet image=sql.getImageIDandVersion(con, imagename); + + try { + while(image.next()) + { + pk_image=image.getInt("GUID_imageID"); + imageversion=image.getInt("imageVersion"); + } + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + sql.updateLectureData(con, pk_image, imageversion, lastname, newName, desc, shortdesc, startDate, endDate, isActive, id); return false; } diff --git a/Dozentenmodulserver/src/sql/SQL.java b/Dozentenmodulserver/src/sql/SQL.java index ec1ea11f..27bdc17c 100644 --- a/Dozentenmodulserver/src/sql/SQL.java +++ b/Dozentenmodulserver/src/sql/SQL.java @@ -6,6 +6,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.text.DateFormat; +import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Random; @@ -447,8 +448,8 @@ public class SQL { return -1; } - public int updateLectureData(Connection con, int pk_person, int pk_image, - int imageversion, String name, String desc, String shortdesc, + public int updateLectureData(Connection con, int pk_image, + int imageversion, String name, String newName ,String desc, String shortdesc, String start, String end, boolean isactive, String id) { DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); @@ -459,36 +460,24 @@ public class SQL { } try { Statement stm = con.createStatement(); - Random random = new Random(); - int uid = random.nextInt(); - stm.executeUpdate("INSERT INTO `bwLehrpool`.`m_VLData_lecture`(`lectureID`,`name`,`isActive`,`startTime`,`endTime`,`lastUsed`,`shortDescription`,`description`,`imageID`,`imageVersion`,`admin_createTime`,`admin_changeTime`,`admin_owner`,`admin_change_by`)VALUES('" - + uid - + "','" - + name - + "','" - + active_bol - + "','" - + start - + "','" - + end - + "','" - + formatter.format(new Date()) - + "','" - + shortdesc - + "','" - + desc - + "','" - + pk_image - + "','" - + imageversion - + "','" - + formatter.format(new Date()) - + "','" - + formatter.format(new Date()) - + "','" - + pk_person - + "','" - + pk_person + "');"); + stm.executeUpdate("UPDATE `bwLehrpool`.`m_VLData_lecture` SET `name` = '" + +newName + +"',`isActive` = '" + +active_bol + +"',`startTime` = '" + +start + +"',`endTime` = '" + +end + +"',`description` = '" + +desc + +"',`imageID` = '" + +pk_image + +"',`imageVersion` = '" + +imageversion + +"',`admin_changeTime` = '" + +formatter.format(new Date()) + +"'WHERE `lectureID` = '" + +id+"';" ); con.commit(); } catch (SQLException e) { -- cgit v1.2.3-55-g7522