diff options
| author | unknown | 2014-04-10 09:25:16 +0200 |
|---|---|---|
| committer | unknown | 2014-04-10 09:25:16 +0200 |
| commit | 0c626844e491923e61657f5483586b9a2a3f6bb8 (patch) | |
| tree | 8cf3b19fc4f6b6e9c8bb87f9f9c885caa78e59a2 /Dozentenmodulserver/src/sql/SQL.java | |
| parent | ycxv (diff) | |
| parent | Merge branch 'master' of git.openslx.org:openslx-ng/tutor-module (diff) | |
| download | tutor-module-0c626844e491923e61657f5483586b9a2a3f6bb8.tar.gz tutor-module-0c626844e491923e61657f5483586b9a2a3f6bb8.tar.xz tutor-module-0c626844e491923e61657f5483586b9a2a3f6bb8.zip | |
Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module
Conflicts:
Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI$8.class
Dozentenmodul/bin/gui/image/FTPCreateUploader_GUI.class
Dozentenmodul/bin/gui/image/FTPDownloader_GUI$1.class
Dozentenmodul/bin/gui/image/FTPDownloader_GUI$2.class
Dozentenmodul/bin/gui/image/FTPDownloader_GUI$3.class
Dozentenmodul/bin/gui/image/FTPDownloader_GUI$4.class
Dozentenmodul/bin/gui/image/FTPDownloader_GUI$5.class
Dozentenmodul/bin/gui/image/FTPDownloader_GUI$6.class
Dozentenmodul/bin/gui/image/FTPDownloader_GUI.class
Diffstat (limited to 'Dozentenmodulserver/src/sql/SQL.java')
| -rw-r--r-- | Dozentenmodulserver/src/sql/SQL.java | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Dozentenmodulserver/src/sql/SQL.java b/Dozentenmodulserver/src/sql/SQL.java index 0a2f5ab2..ec1ea11f 100644 --- a/Dozentenmodulserver/src/sql/SQL.java +++ b/Dozentenmodulserver/src/sql/SQL.java @@ -446,4 +446,56 @@ public class SQL { }
return -1;
}
+
+ public int updateLectureData(Connection con, int pk_person, int pk_image,
+ int imageversion, String name, String desc, String shortdesc,
+ String start, String end, boolean isactive, String id) {
+
+ DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+ int active_bol = 0;
+
+ if (isactive == true) {
+ active_bol = 1;
+ }
+ 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 + "');");
+ con.commit();
+
+ } catch (SQLException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return 0;
+
+ }
}
|
