| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 
 | 
void doActualisationFormDonnee(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		Connexion updatePrlvmt= new Connexion();
		if (listIdPrelevement.isEmpty()){
			getServletContext().getRequestDispatcher((String) params.get("urlFormulaire")).forward(request,
					response);       
			return;
		}
		else{
//serveur,login,pwd,database
				updatePrlvmt.loadDriverAndConnect("127.0.0.1","3306","root","root","");
				//
				// ETAPE 1 :recuperation de la signification de chacun des indices
				for (int j=0; j<listIndice.length; j++) {
					String query="insert into CorrespIndiceEBM values ('"+NEtude +"','"+listIndice[j] +"','null','null','null','null','null','null'," +
					"'null','null','null','null','null','null')";
					updatePrlvmt.execute(query);
					for (int k=1; k<=listIndice.length; k++) {
			try{	[TRAITEMENT: INSERTION DES VALEURS DE L'UTILISATEUR DANS LES LIGNES ADEQUATES]
	// si apres la création de la ligne concernant la lettre, il n'y a pas eu d'information rentré (donc status='null') 
				// alors on supprime la ligne
				for (int m=0; m<listIndice.length; m++) {	
					String queryCheck="SELECT Corresp1,Corresp2,Corresp3,Corresp4" +
							" FROM CorrespIndiceEBM where Netude='"+NEtude+"' AND lettre='"+listIndice[m]+"'";
					
					ResultSet rsCheck=updatePrlvmt.ConnectAndQuestion(queryCheck);
					
					while (rsCheck.next()){
						String Corresp1= rsCheck.getString("Corresp1");
						String Corresp2= rsCheck.getString("Corresp2");
						String Corresp3= rsCheck.getString("Corresp3");
						String Corresp4= rsCheck.getString("Corresp4");
											
						if (Corresp1.equals("null") && Corresp2.equals("null") && Corresp3.equals("null") && Corresp4.equals("null")){
							updatePrlvmt.execute("delete FROM CorrespIndiceEBM " +
									" where Netude='"+NEtude+"' AND lettre='"+listIndice[m]+"'");
						}
						
					}
					
				} | 
Partager