Modificato e reso un poco piu' veloce il ciclo sulla maschera di input.
Aggiunta la disabilitazione del pulsante "Tutti" in ricerca Da-A. git-svn-id: svn://10.65.10.50/trunk@3047 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									3223e78497
								
							
						
					
					
						commit
						95f4974bdd
					
				@ -498,22 +498,6 @@ bool CG4400_application::is_mese_ok(int x, int month)
 | 
			
		||||
 | 
			
		||||
//********* handlers *********/
 | 
			
		||||
 | 
			
		||||
bool CG4400_application::mask_select (TMask_field& f, KEY k)
 | 
			
		||||
{
 | 
			
		||||
  if (k == K_SPACE)
 | 
			
		||||
  {
 | 
			
		||||
    app()._ditte->enable_check();
 | 
			
		||||
    // seleziona e aggiungi alle gia' selezionate 
 | 
			
		||||
    if (app()._ditte->run() == K_ENTER)
 | 
			
		||||
    {
 | 
			
		||||
      for (long j = 0l; j < app()._ditte->items(); j++)
 | 
			
		||||
        app()._selected.set(j, app()._ditte->checked(j));
 | 
			
		||||
      app().set_choice_limits(f.mask());
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  return TRUE;
 | 
			
		||||
}    
 | 
			
		||||
 | 
			
		||||
bool CG4400_application::mask_azzera (TMask_field& f, KEY k)
 | 
			
		||||
{
 | 
			
		||||
  if (k == K_SPACE)
 | 
			
		||||
@ -848,6 +832,7 @@ void CG4400_application::build_ditte_sheet()
 | 
			
		||||
{
 | 
			
		||||
  // build sheet
 | 
			
		||||
  _ditte->destroy();
 | 
			
		||||
  _ditte->enable_row(-1);
 | 
			
		||||
  for (int i = 0; i < _nomiditte.items(); i++)
 | 
			
		||||
  {
 | 
			
		||||
    TToken_string* d = new TToken_string(64);
 | 
			
		||||
@ -874,11 +859,13 @@ bool CG4400_application::to_ditt_handler(TMask_field& f, KEY key)
 | 
			
		||||
    TMask& m = f.mask();
 | 
			
		||||
    
 | 
			
		||||
    sh->disable_check();    
 | 
			
		||||
    sh->disable(DLG_USER);
 | 
			
		||||
    if (sh->run() == K_ENTER)
 | 
			
		||||
    {
 | 
			
		||||
      app().select_firm_range(m.get_long(DA_CODICE),sh->row(sh->selected()).get_long(1)); 
 | 
			
		||||
      app().set_choice_limits(m);           
 | 
			
		||||
    }
 | 
			
		||||
    sh->enable(DLG_USER);
 | 
			
		||||
  }
 | 
			
		||||
  if (key == K_TAB && f.focusdirty())
 | 
			
		||||
  {
 | 
			
		||||
@ -898,12 +885,14 @@ bool CG4400_application::fr_ditt_handler(TMask_field& f, KEY key)
 | 
			
		||||
    TArray_sheet* sh = app().get_ditte_sheet();
 | 
			
		||||
 | 
			
		||||
    sh->disable_check();    
 | 
			
		||||
    sh->disable(DLG_USER);
 | 
			
		||||
    if (sh->run() == K_ENTER)
 | 
			
		||||
    {
 | 
			
		||||
      app().select_firm_range(sh->row(sh->selected()).get_long(1), m.get_long(A_CODICE)); 
 | 
			
		||||
      app().set_choice_limits(m);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
    sh->enable(DLG_USER);
 | 
			
		||||
 }
 | 
			
		||||
  else if (key == K_TAB && f.focusdirty())
 | 
			
		||||
  {
 | 
			
		||||
    const long l = app().select_firm_range(m.get_long(DA_CODICE), m.get_long(A_CODICE)); 
 | 
			
		||||
@ -1005,7 +994,21 @@ bool CG4400_application::set_ditte(TMask& m)
 | 
			
		||||
  m.field(CODICE_LIBRO_PROVA).set("");
 | 
			
		||||
  
 | 
			
		||||
  KEY tasto;
 | 
			
		||||
  tasto = m.run();
 | 
			
		||||
  do
 | 
			
		||||
  {
 | 
			
		||||
    tasto = m.run();
 | 
			
		||||
    if (tasto == DLG_SELECT)
 | 
			
		||||
    {
 | 
			
		||||
      _ditte->enable_check();
 | 
			
		||||
      // seleziona e aggiungi alle gia' selezionate 
 | 
			
		||||
      if (_ditte->run() == K_ENTER)
 | 
			
		||||
      {
 | 
			
		||||
        for (long j = 0l; j < _ditte->items(); j++)
 | 
			
		||||
          _selected.set(j, _ditte->checked(j));
 | 
			
		||||
        set_choice_limits(m);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  } while (tasto != K_ENTER && tasto != K_QUIT);
 | 
			
		||||
  //  m.first_focus(tasto); 
 | 
			
		||||
  return tasto == K_ENTER;
 | 
			
		||||
}
 | 
			
		||||
@ -3241,7 +3244,6 @@ bool CG4400_application::set_print(int n)
 | 
			
		||||
  m.set_handler (FINO_A_MESE, mask_mese);
 | 
			
		||||
  m.set_handler (CODICE_LIB_UN, mask_cod);
 | 
			
		||||
  m.set_handler (CODICE_LIBRO_IVA, mask_libun);
 | 
			
		||||
  m.set_handler (DLG_SELECT, mask_select);
 | 
			
		||||
  m.set_handler (F_ANNULLA,  mask_azzera);
 | 
			
		||||
  m.set_handler (A_CODICE,  to_ditt_handler);
 | 
			
		||||
  m.set_handler (DA_CODICE, fr_ditt_handler);
 | 
			
		||||
 | 
			
		||||
@ -83,7 +83,6 @@ protected:
 | 
			
		||||
  static bool mask_data        (TMask_field&, KEY);
 | 
			
		||||
  static bool mask_mese        (TMask_field&, KEY);
 | 
			
		||||
  static bool mask_fino_a_mese (TMask_field&, KEY); 
 | 
			
		||||
  static bool mask_select      (TMask_field&, KEY);
 | 
			
		||||
  static bool mask_azzera      (TMask_field&, KEY);
 | 
			
		||||
  static bool year_handler     (TMask_field&, KEY);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -58,6 +58,7 @@ BUTTON DLG_SELECT 10 2
 | 
			
		||||
BEGIN
 | 
			
		||||
  PROMPT 41 3 "~Selezione"
 | 
			
		||||
  HELP "Indicare le ditte da selezionare per la stampa"
 | 
			
		||||
  MESSAGE EXIT, DLG_SELECT
 | 
			
		||||
END
 | 
			
		||||
 | 
			
		||||
BUTTON F_ANNULLA 10
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user