1 2 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 48 49 50 51 52
   | declare
	compte users.compte_user%type;
	pwd    users.pwd_user%type;
	type_u users.type_user%type;
  	n    number;
  	t number := 0;
 
begin
		select compte_user, pwd_user , type_user into compte, pwd, type_u
		from users
		where ((compte_user=:compte) and (pwd_user=:pwd) and (type_user=:type_u));
	--**************           appel                     **************************
		declare
 
     the_list PARAMLIST:= Get_Parameter_List('default'); 
   begin
 
        case type_u
        when 'CHEF DE STATION' then   
      	 New_Form('D:\application NAFTGD\ACCUEIL_CHEF_STATION',FULL_ROLLBACK, NO_QUERY_ONLY ,SHARE_LIBRARY_DATA,'default');  
        when 'CADRE D"ETUDES' then   
      	 New_Form('D:\application NAFTGD\CADRE_DETUDES',FULL_ROLLBACK, NO_QUERY_ONLY ,SHARE_LIBRARY_DATA,'default');         
        when 'ADMINISTRATEUUR' then   
      	 New_Form('D:\application NAFTGD\ADMINISTRATEUR',FULL_ROLLBACK, NO_QUERY_ONLY ,SHARE_LIBRARY_DATA,'default');          
        else
   	          null; 
                -- appel_fonction; 
      end case ;
 
end;
 
	exception
 
		when no_data_found or too_many_rows then
	begin
		t:=t+1;
		if t<4 and t>1 then
		set_alert_property('message',alert_message_text,'compte utilisateur ou mot de passe incorrect !');
		n:=show_alert('message');
	  go_item('pwd');
		clear_item;
		go_item('compte');
		clear_item;
		end if;
			if t=4 then
		  set_alert_property('message1',alert_message_text,'Windows doit fermer l''application!');
		  n:=show_alert('message1');
			exit_form;
			end if;
	end;
 
	end; | 
Partager