Subversion Repositories eFlore/Applications.cel

Rev

Rev 132 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 132 Rev 140
Line 421... Line 421...
421
		    	    	    	
421
		    	    	    	
Line 422... Line 422...
422
		    	    	        break;
422
		    	    	        break;
Line 423... Line 423...
423
		    	    	      
423
		    	    	      
424
		    	    	      case KEY_ENTER:
424
		    	    	      case KEY_ENTER:
425
		    	    	    	  
425
		    	    	    	  
426
		    	    	    	 if (selectionEspece) {
426
			    	    	    	if(selectionEspece) {
427
		    	    	    		 selectionEspece=false;
427
			    	    	    		 selectionEspece=false;
428
		    	    	    	 }
428
			    	    	    	}
429
		    	    	    	 else {
-
 
Line 430... Line 429...
430
		    	    	    		validerSaisie(Champs.ESPECE); 	    	    		 
429
			    	    	    	else {
Line 431... Line 430...
431
		    	    	    	 }
430
			    	    	    		validerSaisie(Champs.ESPECE); 	    	    		 
Line 477... Line 476...
477
	  	    	      default:
476
	  	    	      default:
478
					}
477
					}
479
				}
478
				}
480
		    });
479
		    });
Line 481... Line 480...
481
			
480
			
Line 482... Line 481...
482
			comment.addKeyPressListener(new EventCallback() {
481
			/*comment.addKeyPressListener(new EventCallback() {
483
 
482
 
484
				public void execute(EventObject e) {
483
				public void execute(EventObject e) {
Line 490... Line 489...
490
	  	    	    	  break;
489
	  	    	    	  break;
Line 491... Line 490...
491
	  	    	       
490
	  	    	       
492
	  	    	      default:
491
	  	    	      default:
493
					}
492
					}
494
				}
493
				}
Line 495... Line 494...
495
		    });
494
		    });*/
Line 675... Line 674...
675
			if(nouvelleDonnees instanceof String)
674
			if(nouvelleDonnees instanceof String)
676
			{
675
			{
677
				String str = (String)nouvelleDonnees ;
676
				String str = (String)nouvelleDonnees ;
678
				observationMediateur.obtenirNombreObservation() ;
677
				observationMediateur.obtenirNombreObservation() ;
679
			}
678
			}
-
 
679
			
-
 
680
			if(nouvelleDonnees instanceof String[]) {
-
 
681
				String[] anumNom = (String[])nouvelleDonnees ;
-
 
682
				numeroNom = anumNom[1];
-
 
683
				espece.setValue(anumNom[0]);
-
 
684
				setModification("false");
-
 
685
			}
Line 680... Line 686...
680
 
686
 
Line 681... Line 687...
681
	}
687
	}
Line 700... Line 706...
700
	 
706
	 
Line 701... Line 707...
701
	}
707
	}
-
 
708
   
-
 
709
 
-
 
710
	public void ajouterObservation() {
-
 
711
		
-
 
712
		if(departement.equals("000null") || departement.equals("")) {
-
 
713
			String[] depCom = commune.getText().split(" ");
-
 
714
			if(depCom.length > 1) {
-
 
715
				String dep = depCom[1].replace('(', ' ');
-
 
716
				dep =dep.replace(')', ' ');
-
 
717
				dep = dep.trim();
-
 
718
				dep = dep.replace('\\',' ');
-
 
719
				dep = dep.trim();
-
 
720
				
-
 
721
				try
-
 
722
				{
-
 
723
					int nDep = Integer.parseInt(dep);
-
 
724
					if(nDep > 0 && nDep < 110) {
-
 
725
						departement = dep ;
-
 
726
					}
-
 
727
				}
-
 
728
				catch(NumberFormatException e)
-
 
729
				{
-
 
730
					departement = "" ;
Line 702... Line 731...
702
   
731
				}
703
 
732
			}
704
	public void ajouterObservation() {
733
		}
Line 722... Line 751...
722
 
751
 
723
	
752
	
724
	public void afficherDetailsObservation(Observation obs)
753
	public void afficherDetailsObservation(Observation obs)
-
 
754
	{
-
 
755
		raz() ;
-
 
756
		char g ;
-
 
757
		
-
 
758
		String idLoc =obs.getIdentifiantLocalite().replaceAll(" ","/");
-
 
759
		idLoc = idLoc.replaceAll("%","");
-
 
760
		idLoc = idLoc.replaceAll("\"","");
Line 725... Line 761...
725
	{
761
		idLoc = idLoc.replace('\\',' ');
726
		raz() ;
762
		idLoc = idLoc.trim();
727
		
763
		
728
		if(!obs.getDate().equals("null") && !obs.getDate().equals("000null")) {
764
		if(!obs.getDate().equals("null") && !obs.getDate().equals("000null")) {
Line 746... Line 782...
746
		}
782
		}
747
		if(!obs.getCommentaire().equals("null") && !obs.getCommentaire().equals("000null")) {
783
		if(!obs.getCommentaire().equals("null") && !obs.getCommentaire().equals("000null")) {
748
			comment.setValue(obs.getCommentaire()) ;
784
			comment.setValue(obs.getCommentaire()) ;
749
		}
785
		}
750
		if(!obs.getLocalite().equals("null") && !obs.getLocalite().equals("000null")) {
786
		if(!obs.getLocalite().equals("null") && !obs.getLocalite().equals("000null")) {
-
 
787
			if(!idLoc.equals("000null")) {
-
 
788
				commune.setValue(obs.getLocalite()+" ("+idLoc+")") ;
-
 
789
			}
-
 
790
			else
-
 
791
			{
751
			commune.setValue(obs.getLocalite()) ;
792
				commune.setValue(obs.getLocalite());
-
 
793
			}
752
		}
794
		}
753
		if(!obs.getIdentifiantLocalite().equals("null") && !obs.getIdentifiantLocalite().equals("000null")) {
795
		if(!obs.getIdentifiantLocalite().equals("null") && !obs.getIdentifiantLocalite().equals("000null")) {
754
			departement = obs.getIdentifiantLocalite();
796
			departement = idLoc;
755
		}
797
		}
756
		if(!obs.getNomSaisi().equals("null") && !obs.getNomSaisi().equals("000null")) {
798
		if(!obs.getNomSaisi().equals("null") && !obs.getNomSaisi().equals("000null")) {
757
			espece.setValue(obs.getNomSaisi()) ;
799
			espece.setValue(obs.getNomSaisi()) ;
758
		}
800
		}
759
		if(!obs.getNumeroNomenclaturalSaisi().equals("null") && !obs.getNumeroNomenclaturalSaisi().equals("000null")) {
801
		if(!obs.getNumeroNomenclaturalSaisi().equals("null") && !obs.getNumeroNomenclaturalSaisi().equals("000null")) {