Procházet zdrojové kódy

++ gestion reponsesV5

PCYoshi před 9 roky
rodič
revize
0c7b7e3a87

+ 69
- 59
java/.idea/workspace.xml Zobrazit soubor

@@ -7,10 +7,15 @@
7 7
   </component>
8 8
   <component name="ChangeListManager">
9 9
     <list default="true" id="a647cb6a-4230-4101-a652-d7cfd0c21e24" name="Default" comment="">
10
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/ConnexionBDD.class" afterPath="$PROJECT_DIR$/out/production/java/ConnexionBDD.class" />
11
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/GestionQuestions.class" afterPath="$PROJECT_DIR$/out/production/java/GestionQuestions.class" />
12
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanQuestionsListener.class" />
13
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" afterPath="$PROJECT_DIR$/out/production/java/InterfacePrincipale$PanReponsesListener.class" />
10 14
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/ConnexionBDD.java" afterPath="$PROJECT_DIR$/src/ConnexionBDD.java" />
11 15
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/GestionQuestions.java" afterPath="$PROJECT_DIR$/src/GestionQuestions.java" />
12
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/GestionReponses.java" afterPath="$PROJECT_DIR$/src/GestionReponses.java" />
13 16
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/InterfacePrincipale.java" afterPath="$PROJECT_DIR$/src/InterfacePrincipale.java" />
17
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/NouvelleQuestionDialog.java" afterPath="$PROJECT_DIR$/src/NouvelleQuestionDialog.java" />
18
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" afterPath="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
14 19
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
15 20
     </list>
16 21
     <ignored path="java.iws" />
@@ -37,7 +42,7 @@
37 42
         <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
38 43
           <provider selected="true" editor-type-id="text-editor">
39 44
             <state vertical-scroll-proportion="0.0">
40
-              <caret line="543" column="90" selection-start-line="543" selection-start-column="90" selection-end-line="543" selection-end-column="90" />
45
+              <caret line="231" column="68" selection-start-line="231" selection-start-column="68" selection-end-line="231" selection-end-column="68" />
41 46
               <folding>
42 47
                 <element signature="imports" expanded="true" />
43 48
                 <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
@@ -54,7 +59,7 @@
54 59
         <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
55 60
           <provider selected="true" editor-type-id="text-editor">
56 61
             <state vertical-scroll-proportion="0.0">
57
-              <caret line="102" column="57" selection-start-line="102" selection-start-column="57" selection-end-line="102" selection-end-column="57" />
62
+              <caret line="83" column="30" selection-start-line="83" selection-start-column="30" selection-end-line="83" selection-end-column="30" />
58 63
               <folding>
59 64
                 <element signature="imports" expanded="true" />
60 65
                 <element signature="e#1239#1240#0" expanded="true" />
@@ -68,10 +73,10 @@
68 73
           </provider>
69 74
         </entry>
70 75
       </file>
71
-      <file leaf-file-name="GestionReponses.java" pinned="false" current-in-tab="true">
76
+      <file leaf-file-name="GestionReponses.java" pinned="false" current-in-tab="false">
72 77
         <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
73 78
           <provider selected="true" editor-type-id="text-editor">
74
-            <state vertical-scroll-proportion="0.619403">
79
+            <state vertical-scroll-proportion="0.0">
75 80
               <caret line="84" column="28" selection-start-line="84" selection-start-column="28" selection-end-line="84" selection-end-column="28" />
76 81
               <folding>
77 82
                 <element signature="imports" expanded="true" />
@@ -86,12 +91,11 @@
86 91
         <entry file="file://$PROJECT_DIR$/src/GestionQuestions.java">
87 92
           <provider selected="true" editor-type-id="text-editor">
88 93
             <state vertical-scroll-proportion="0.0">
89
-              <caret line="87" column="106" selection-start-line="87" selection-start-column="106" selection-end-line="87" selection-end-column="106" />
94
+              <caret line="89" column="36" selection-start-line="89" selection-start-column="36" selection-end-line="89" selection-end-column="36" />
90 95
               <folding>
91 96
                 <element signature="imports" expanded="true" />
92
-                <element signature="e#2947#2948#0" expanded="true" />
93
-                <element signature="e#2975#2976#0" expanded="true" />
94
-                <marker date="1433256883202" expanded="true" signature="2334:2897" placeholder="{...}" />
97
+                <element signature="e#2985#2986#0" expanded="true" />
98
+                <element signature="e#3013#3014#0" expanded="true" />
95 99
               </folding>
96 100
             </state>
97 101
           </provider>
@@ -101,23 +105,23 @@
101 105
         <entry file="file://$PROJECT_DIR$/src/NouvelleQuestionDialog.java">
102 106
           <provider selected="true" editor-type-id="text-editor">
103 107
             <state vertical-scroll-proportion="0.0">
104
-              <caret line="78" column="18" selection-start-line="78" selection-start-column="18" selection-end-line="78" selection-end-column="18" />
108
+              <caret line="19" column="8" selection-start-line="19" selection-start-column="8" selection-end-line="19" selection-end-column="28" />
105 109
               <folding>
106 110
                 <element signature="imports" expanded="true" />
107
-                <element signature="e#1953#1954#0" expanded="true" />
108
-                <element signature="e#1985#1986#0" expanded="true" />
109
-                <element signature="e#2013#2014#0" expanded="true" />
110
-                <element signature="e#2053#2054#0" expanded="true" />
111
+                <element signature="e#1976#1977#0" expanded="true" />
112
+                <element signature="e#2008#2009#0" expanded="true" />
113
+                <element signature="e#2036#2037#0" expanded="true" />
114
+                <element signature="e#2076#2077#0" expanded="true" />
111 115
               </folding>
112 116
             </state>
113 117
           </provider>
114 118
         </entry>
115 119
       </file>
116
-      <file leaf-file-name="NouvelleReponseDialog.java" pinned="false" current-in-tab="false">
120
+      <file leaf-file-name="NouvelleReponseDialog.java" pinned="false" current-in-tab="true">
117 121
         <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
118 122
           <provider selected="true" editor-type-id="text-editor">
119
-            <state vertical-scroll-proportion="0.0">
120
-              <caret line="48" column="37" selection-start-line="48" selection-start-column="37" selection-end-line="48" selection-end-column="37" />
123
+            <state vertical-scroll-proportion="0.5635359">
124
+              <caret line="20" column="28" selection-start-line="20" selection-start-column="28" selection-end-line="20" selection-end-column="28" />
121 125
               <folding>
122 126
                 <element signature="imports" expanded="true" />
123 127
               </folding>
@@ -156,12 +160,12 @@
156 160
         <option value="$PROJECT_DIR$/src/GestionCategories.java" />
157 161
         <option value="$PROJECT_DIR$/src/MainAdminBddBurgerQuizz.java" />
158 162
         <option value="$PROJECT_DIR$/src/Question.java" />
159
-        <option value="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
160
-        <option value="$PROJECT_DIR$/src/NouvelleQuestionDialog.java" />
163
+        <option value="$PROJECT_DIR$/src/GestionReponses.java" />
161 164
         <option value="$PROJECT_DIR$/src/ConnexionBDD.java" />
162
-        <option value="$PROJECT_DIR$/src/InterfacePrincipale.java" />
163 165
         <option value="$PROJECT_DIR$/src/GestionQuestions.java" />
164
-        <option value="$PROJECT_DIR$/src/GestionReponses.java" />
166
+        <option value="$PROJECT_DIR$/src/InterfacePrincipale.java" />
167
+        <option value="$PROJECT_DIR$/src/NouvelleQuestionDialog.java" />
168
+        <option value="$PROJECT_DIR$/src/NouvelleReponseDialog.java" />
165 169
       </list>
166 170
     </option>
167 171
   </component>
@@ -735,7 +739,13 @@
735 739
       <option name="project" value="LOCAL" />
736 740
       <updated>1433253655646</updated>
737 741
     </task>
738
-    <option name="localTasksCounter" value="20" />
742
+    <task id="LOCAL-00020" summary="++ gestion reponsesV5">
743
+      <created>1433256920732</created>
744
+      <option name="number" value="00020" />
745
+      <option name="project" value="LOCAL" />
746
+      <updated>1433256920732</updated>
747
+    </task>
748
+    <option name="localTasksCounter" value="21" />
739 749
     <servers />
740 750
   </component>
741 751
   <component name="TodoView">
@@ -756,6 +766,7 @@
756 766
       <window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
757 767
       <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
758 768
       <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32864675" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
769
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32864675" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
759 770
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
760 771
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3996479" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
761 772
       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32922536" sideWeight="0.5030441" order="9" side_tool="true" content_ui="tabs" />
@@ -767,10 +778,9 @@
767 778
       <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
768 779
       <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
769 780
       <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.16717325" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
770
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.30579966" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
781
+      <window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.30579966" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
771 782
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
772 783
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
773
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
774 784
       <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
775 785
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
776 786
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
@@ -806,7 +816,8 @@
806 816
     <MESSAGE value="++ gestion reponsesV2" />
807 817
     <MESSAGE value="++ gestion reponsesV3" />
808 818
     <MESSAGE value="++ gestion reponsesV4" />
809
-    <option name="LAST_COMMIT_MESSAGE" value="++ gestion reponsesV4" />
819
+    <MESSAGE value="++ gestion reponsesV5" />
820
+    <option name="LAST_COMMIT_MESSAGE" value="++ gestion reponsesV5" />
810 821
   </component>
811 822
   <component name="XDebuggerManager">
812 823
     <breakpoint-manager>
@@ -1165,16 +1176,6 @@
1165 1176
         <state />
1166 1177
       </provider>
1167 1178
     </entry>
1168
-    <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
1169
-      <provider selected="true" editor-type-id="text-editor">
1170
-        <state vertical-scroll-proportion="0.0">
1171
-          <caret line="48" column="37" selection-start-line="48" selection-start-column="37" selection-end-line="48" selection-end-column="37" />
1172
-          <folding>
1173
-            <element signature="imports" expanded="true" />
1174
-          </folding>
1175
-        </state>
1176
-      </provider>
1177
-    </entry>
1178 1179
     <entry file="file://$PROJECT_DIR$/src/Question.java">
1179 1180
       <provider selected="true" editor-type-id="text-editor">
1180 1181
         <state vertical-scroll-proportion="0.46082088">
@@ -1183,10 +1184,22 @@
1183 1184
         </state>
1184 1185
       </provider>
1185 1186
     </entry>
1187
+    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
1188
+      <provider selected="true" editor-type-id="text-editor">
1189
+        <state vertical-scroll-proportion="0.0">
1190
+          <caret line="84" column="28" selection-start-line="84" selection-start-column="28" selection-end-line="84" selection-end-column="28" />
1191
+          <folding>
1192
+            <element signature="imports" expanded="true" />
1193
+            <element signature="e#2627#2628#0" expanded="true" />
1194
+            <element signature="e#2653#2654#0" expanded="true" />
1195
+          </folding>
1196
+        </state>
1197
+      </provider>
1198
+    </entry>
1186 1199
     <entry file="file://$PROJECT_DIR$/src/ConnexionBDD.java">
1187 1200
       <provider selected="true" editor-type-id="text-editor">
1188 1201
         <state vertical-scroll-proportion="0.0">
1189
-          <caret line="102" column="57" selection-start-line="102" selection-start-column="57" selection-end-line="102" selection-end-column="57" />
1202
+          <caret line="83" column="30" selection-start-line="83" selection-start-column="30" selection-end-line="83" selection-end-column="30" />
1190 1203
           <folding>
1191 1204
             <element signature="imports" expanded="true" />
1192 1205
             <element signature="e#1239#1240#0" expanded="true" />
@@ -1199,56 +1212,53 @@
1199 1212
         </state>
1200 1213
       </provider>
1201 1214
     </entry>
1202
-    <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1215
+    <entry file="file://$PROJECT_DIR$/src/GestionQuestions.java">
1203 1216
       <provider selected="true" editor-type-id="text-editor">
1204 1217
         <state vertical-scroll-proportion="0.0">
1205
-          <caret line="543" column="90" selection-start-line="543" selection-start-column="90" selection-end-line="543" selection-end-column="90" />
1218
+          <caret line="89" column="36" selection-start-line="89" selection-start-column="36" selection-end-line="89" selection-end-column="36" />
1206 1219
           <folding>
1207 1220
             <element signature="imports" expanded="true" />
1208
-            <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
1209
-            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
1210
-            <element signature="method#createStatusBar#0;class#InterfacePrincipale#0" expanded="false" />
1211
-            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
1212
-            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
1221
+            <element signature="e#2985#2986#0" expanded="true" />
1222
+            <element signature="e#3013#3014#0" expanded="true" />
1213 1223
           </folding>
1214 1224
         </state>
1215 1225
       </provider>
1216 1226
     </entry>
1217
-    <entry file="file://$PROJECT_DIR$/src/NouvelleQuestionDialog.java">
1227
+    <entry file="file://$PROJECT_DIR$/src/InterfacePrincipale.java">
1218 1228
       <provider selected="true" editor-type-id="text-editor">
1219 1229
         <state vertical-scroll-proportion="0.0">
1220
-          <caret line="78" column="18" selection-start-line="78" selection-start-column="18" selection-end-line="78" selection-end-column="18" />
1230
+          <caret line="231" column="68" selection-start-line="231" selection-start-column="68" selection-end-line="231" selection-end-column="68" />
1221 1231
           <folding>
1222 1232
             <element signature="imports" expanded="true" />
1223
-            <element signature="e#1953#1954#0" expanded="true" />
1224
-            <element signature="e#1985#1986#0" expanded="true" />
1225
-            <element signature="e#2013#2014#0" expanded="true" />
1226
-            <element signature="e#2053#2054#0" expanded="true" />
1233
+            <element signature="method#InterfacePrincipale#0;class#InterfacePrincipale#0" expanded="false" />
1234
+            <element signature="method#loadImgBouton#0;class#InterfacePrincipale#0" expanded="false" />
1235
+            <element signature="method#createStatusBar#0;class#InterfacePrincipale#0" expanded="false" />
1236
+            <element signature="method#modem56k#0;class#InterfacePrincipale#0" expanded="false" />
1237
+            <element signature="method#nyan#0;class#InterfacePrincipale#0" expanded="false" />
1227 1238
           </folding>
1228 1239
         </state>
1229 1240
       </provider>
1230 1241
     </entry>
1231
-    <entry file="file://$PROJECT_DIR$/src/GestionQuestions.java">
1242
+    <entry file="file://$PROJECT_DIR$/src/NouvelleQuestionDialog.java">
1232 1243
       <provider selected="true" editor-type-id="text-editor">
1233 1244
         <state vertical-scroll-proportion="0.0">
1234
-          <caret line="87" column="106" selection-start-line="87" selection-start-column="106" selection-end-line="87" selection-end-column="106" />
1245
+          <caret line="19" column="8" selection-start-line="19" selection-start-column="8" selection-end-line="19" selection-end-column="28" />
1235 1246
           <folding>
1236 1247
             <element signature="imports" expanded="true" />
1237
-            <element signature="e#2947#2948#0" expanded="true" />
1238
-            <element signature="e#2975#2976#0" expanded="true" />
1239
-            <marker date="1433256883202" expanded="true" signature="2334:2897" placeholder="{...}" />
1248
+            <element signature="e#1976#1977#0" expanded="true" />
1249
+            <element signature="e#2008#2009#0" expanded="true" />
1250
+            <element signature="e#2036#2037#0" expanded="true" />
1251
+            <element signature="e#2076#2077#0" expanded="true" />
1240 1252
           </folding>
1241 1253
         </state>
1242 1254
       </provider>
1243 1255
     </entry>
1244
-    <entry file="file://$PROJECT_DIR$/src/GestionReponses.java">
1256
+    <entry file="file://$PROJECT_DIR$/src/NouvelleReponseDialog.java">
1245 1257
       <provider selected="true" editor-type-id="text-editor">
1246
-        <state vertical-scroll-proportion="0.619403">
1247
-          <caret line="84" column="28" selection-start-line="84" selection-start-column="28" selection-end-line="84" selection-end-column="28" />
1258
+        <state vertical-scroll-proportion="0.5635359">
1259
+          <caret line="20" column="28" selection-start-line="20" selection-start-column="28" selection-end-line="20" selection-end-column="28" />
1248 1260
           <folding>
1249 1261
             <element signature="imports" expanded="true" />
1250
-            <element signature="e#2627#2628#0" expanded="true" />
1251
-            <element signature="e#2653#2654#0" expanded="true" />
1252 1262
           </folding>
1253 1263
         </state>
1254 1264
       </provider>

binární
java/out/production/java/ConnexionBDD.class Zobrazit soubor


binární
java/out/production/java/GestionQuestions.class Zobrazit soubor


binární
java/out/production/java/InterfacePrincipale$PanQuestionsListener.class Zobrazit soubor


binární
java/out/production/java/InterfacePrincipale$PanReponsesListener.class Zobrazit soubor


+ 6
- 1
java/src/ConnexionBDD.java Zobrazit soubor

@@ -81,7 +81,7 @@ public class ConnexionBDD
81 81
 		gestionReponses.deleteReponses(reponse1, reponse2);
82 82
 	}
83 83
 
84
-	public void modifyReponsesReponses(String categorie, String oldRep1, String oldRep2, String newRep1, String newRep2)
84
+	public void modifyReponses(String categorie, String oldRep1, String oldRep2, String newRep1, String newRep2)
85 85
 	{
86 86
 		gestionReponses.updateReponses(categorie, oldRep1, oldRep2, newRep1, newRep2);
87 87
 	}
@@ -102,4 +102,9 @@ public class ConnexionBDD
102 102
 	{
103 103
 		gestionQuestions.deleteQuestion(intitule, reponse1, reponse2);
104 104
 	}
105
+
106
+	public void modifyQuestion(String oldIntitule, String newIntitule, String reponse1, String reponse2, int newNum_reponse)
107
+	{
108
+		gestionQuestions.updateQuestion(oldIntitule, newIntitule, reponse1, reponse2, newNum_reponse);
109
+	}
105 110
 }

+ 9
- 9
java/src/GestionQuestions.java Zobrazit soubor

@@ -85,19 +85,19 @@ public class GestionQuestions
85 85
 		}
86 86
 	}
87 87
 
88
-	public void updateReponsesReponses(String intitule, String reponse1, String reponse2, int num_reponse)
88
+	public void updateQuestion(String oldIntitule, String newIntitule, String reponse1, String reponse2, int newNum_reponse)
89 89
 	{
90
-		String rq ="UPDATE reponses" +
91
-				" SET nom_cat = ?, reponse1 = ?, reponse2 = ?" +
92
-				" WHERE reponse1 = ? AND reponse2 = ?";
90
+		String rq ="UPDATE questions" +
91
+				" SET intitule = ?, num_reponse = ?" +
92
+				" WHERE intitule = ? AND reponse1 = ? AND reponse2 = ?";
93 93
 		try
94 94
 		{
95 95
 			PreparedStatement preparedStatement = bdd.prepareStatement(rq);
96
-			preparedStatement.setString(1, categorie);
97
-			preparedStatement.setString(2, newRep1);
98
-			preparedStatement.setString(3, newRep2);
99
-			preparedStatement.setString(4, oldRep1);
100
-			preparedStatement.setString(5, oldRep2);
96
+			preparedStatement.setString(1, newIntitule);
97
+			preparedStatement.setInt(2, newNum_reponse);
98
+			preparedStatement.setString(3, oldIntitule);
99
+			preparedStatement.setString(4, reponse1);
100
+			preparedStatement.setString(5, reponse2);
101 101
 			preparedStatement.executeUpdate();
102 102
 
103 103
 			preparedStatement.close();

+ 17
- 8
java/src/InterfacePrincipale.java Zobrazit soubor

@@ -32,7 +32,6 @@ public class InterfacePrincipale extends JFrame
32 32
 	private Bouton addQ;
33 33
 	private Bouton delQ;
34 34
 	private Bouton editQ;
35
-	private JComboBox comboQueRep;
36 35
 	private JList listQ;
37 36
 
38 37
 	//image pour les boutons
@@ -203,7 +202,6 @@ public class InterfacePrincipale extends JFrame
203 202
 		addQ = new Bouton("Ajouter une question", plusImg);
204 203
 		delQ = new Bouton("Supprimer la question", delImg);
205 204
 		editQ = new Bouton("Modifier la question", editImg);
206
-		comboQueRep = new JComboBox();
207 205
 
208 206
 		listQ = new JList();
209 207
 		JScrollPane sp = new JScrollPane(listQ,
@@ -216,12 +214,10 @@ public class InterfacePrincipale extends JFrame
216 214
 		addQ.setAlignmentX(CENTER_ALIGNMENT);
217 215
 		delQ.setAlignmentX(CENTER_ALIGNMENT);
218 216
 		editQ.setAlignmentX(CENTER_ALIGNMENT);
219
-		comboQueRep.setOpaque(false);
220 217
 
221 218
 		addQ.setMaximumSize(new Dimension(208,34));
222 219
 		delQ.setMaximumSize(new Dimension(208,34));
223 220
 		editQ.setMaximumSize(new Dimension(208,34));
224
-		comboQueRep.setMaximumSize(new Dimension(1000,34));
225 221
 
226 222
 		JLabel labQ = new JLabel("Questions");
227 223
 		labQ.setAlignmentX(Component.CENTER_ALIGNMENT);
@@ -234,8 +230,6 @@ public class InterfacePrincipale extends JFrame
234 230
 		panQuestions.add(Box.createRigidArea(new Dimension(1, 10)));
235 231
 		panQuestions.add(sp);
236 232
 		panQuestions.add(Box.createRigidArea(new Dimension(1, 10)));
237
-		panQuestions.add(comboQueRep);
238
-		panQuestions.add(Box.createRigidArea(new Dimension(1, 5)));
239 233
 		panQuestions.add(editQ);
240 234
 
241 235
 
@@ -486,7 +480,7 @@ public class InterfacePrincipale extends JFrame
486 480
 				NouvelleReponseDialog nrd = new NouvelleReponseDialog("Modification jeu de réponses", reponse1, reponse2, catName, getCategorieList(), null);
487 481
 				if(nrd.afficher() == true)
488 482
 				{
489
-					bdd.modifyReponsesReponses(nrd.getCat(), reponse1, reponse2, nrd.getRep1(), nrd.getRep2());
483
+					bdd.modifyReponses(nrd.getCat(), reponse1, reponse2, nrd.getRep1(), nrd.getRep2());
490 484
 					//listR.setListData(bdd.getListeReponses(catName).toArray());
491 485
 					reSelectCategorie(nrd.getCat());
492 486
 					reSelectReponses(nrd.getRep1(), nrd.getRep2());
@@ -547,7 +541,22 @@ public class InterfacePrincipale extends JFrame
547 541
 			}
548 542
 			else if(e.getSource() == editQ)
549 543
 			{
550
-				statusText.setText("Modification de question");
544
+				Question q = (Question) listQ.getSelectedValue();
545
+				if(q == null)
546
+				{
547
+					statusText.setText("Veuiller d'abord selectionner une question.");
548
+					return;
549
+				}
550
+
551
+				NouvelleQuestionDialog nqd = new NouvelleQuestionDialog("Modification question", q.getIntitule(),
552
+						q.getReponse(), q.getReponse1(), q.getReponse2(), null);
553
+
554
+				if(nqd.afficher() == true)
555
+				{
556
+					bdd.modifyQuestion(q.getIntitule(), nqd.getIntitule(),
557
+							q.getReponse1(), q.getReponse2(), nqd.getReponse());
558
+					reSelectQuestion(nqd.getIntitule());
559
+				}
551 560
 			}
552 561
 		}
553 562
 	}

+ 2
- 1
java/src/NouvelleQuestionDialog.java Zobrazit soubor

@@ -17,6 +17,7 @@ public class NouvelleQuestionDialog extends JDialog implements ActionListener
17 17
 		createInterface(defIntitule, defReponse, reponse1, reponse2);
18 18
 		pack();
19 19
 		setLocationRelativeTo(null);
20
+		setResizable(false);
20 21
 	}
21 22
 
22 23
 	private void createInterface(String defIntitule, int defReponse, String reponse1, String reponse2)
@@ -24,7 +25,7 @@ public class NouvelleQuestionDialog extends JDialog implements ActionListener
24 25
 		JPanel champs = new JPanel();
25 26
 		JPanel boutons = new JPanel();
26 27
 
27
-		intitule = new JTextField(defIntitule, 15);
28
+		intitule = new JTextField(defIntitule, 20);
28 29
 		intitule.setBackground(Color.WHITE);
29 30
 
30 31
 		ok = new JButton("OK");

+ 1
- 0
java/src/NouvelleReponseDialog.java Zobrazit soubor

@@ -18,6 +18,7 @@ public class NouvelleReponseDialog extends JDialog implements ActionListener
18 18
 		createInterface(defRep1, defRep2, defCategorie, tabCategorie);
19 19
 		pack();
20 20
 		setLocationRelativeTo(null);
21
+		setResizable(false);
21 22
 	}
22 23
 
23 24
 	private void createInterface(String defRep1, String defRep2, String defCategorie, String[] tabCategorie)