Patch level : 4.0
Files correlati : cg3.exe Ricompilazione Demo : [ ] Commento : Allineato alla 3.0 git-svn-id: svn://10.65.10.50/trunk@15002 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									f7fb19d8cc
								
							
						
					
					
						commit
						2c139d8b39
					
				@ -77,7 +77,7 @@ void TAllegati_set::add(const TAllegato_info& info)
 | 
				
			|||||||
  const TRectype& clifo = info.clifo();
 | 
					  const TRectype& clifo = info.clifo();
 | 
				
			||||||
  for (unsigned int i = 0; i < columns(); i++)
 | 
					  for (unsigned int i = 0; i < columns(); i++)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    const TString& field = TAS400_recordset::column_info(i)._name;
 | 
					    const TString& field = column_info(i)._name;
 | 
				
			||||||
    if (clifo.type(field) != _nullfld)
 | 
					    if (clifo.type(field) != _nullfld)
 | 
				
			||||||
      set(field, TVariant(clifo.get(field)));
 | 
					      set(field, TVariant(clifo.get(field)));
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
@ -272,9 +272,6 @@ void TAlleg_mask::scan_iva_rows(const TRecordset& mov)
 | 
				
			|||||||
  TToken_string clifo_key; 
 | 
					  TToken_string clifo_key; 
 | 
				
			||||||
  clifo_key << mov.get(MOV_TIPO) << '|' << mov.get(MOV_CODCF);
 | 
					  clifo_key << mov.get(MOV_TIPO) << '|' << mov.get(MOV_CODCF);
 | 
				
			||||||
  const TRectype& clifo = cache().get(LF_CLIFO, clifo_key);
 | 
					  const TRectype& clifo = cache().get(LF_CLIFO, clifo_key);
 | 
				
			||||||
  if (clifo.empty())
 | 
					 | 
				
			||||||
    return;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  const long codalleg = clifo.get_long(CLI_CODALLEG);
 | 
					  const long codalleg = clifo.get_long(CLI_CODALLEG);
 | 
				
			||||||
  if (codalleg > 0) // Aggiorno codice clifo con allegato
 | 
					  if (codalleg > 0) // Aggiorno codice clifo con allegato
 | 
				
			||||||
    clifo_key.add(codalleg,1);
 | 
					    clifo_key.add(codalleg,1);
 | 
				
			||||||
@ -321,6 +318,8 @@ TRecordset* TAlleg_mask::new_recordset()
 | 
				
			|||||||
  query << "\nTO TIPO=#TYPE";                // Inutile dire CODCF=999999
 | 
					  query << "\nTO TIPO=#TYPE";                // Inutile dire CODCF=999999
 | 
				
			||||||
  TISAM_recordset mov(query);
 | 
					  TISAM_recordset mov(query);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  _clifi.destroy();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const TString& tipo = get(F_TIPO);
 | 
					  const TString& tipo = get(F_TIPO);
 | 
				
			||||||
  const int anno = get_int(F_ANNO);
 | 
					  const int anno = get_int(F_ANNO);
 | 
				
			||||||
  mov.set_var("#YEAR", TVariant(long(anno)));
 | 
					  mov.set_var("#YEAR", TVariant(long(anno)));
 | 
				
			||||||
@ -377,22 +376,18 @@ bool TAlleg_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
 | 
				
			|||||||
  case DLG_SELECT:
 | 
					  case DLG_SELECT:
 | 
				
			||||||
    if (e == fe_button)
 | 
					    if (e == fe_button)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      KEY k = K_ENTER;
 | 
					      TRecordset* rs = new_recordset();
 | 
				
			||||||
      while (k == K_ENTER)
 | 
					      TRecordset_sheet sheet(*rs, TR("Elenco di controllo"), 0x8);
 | 
				
			||||||
 | 
					      while (sheet.run() == K_ENTER)
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        TRecordset* rs = new_recordset();
 | 
					        const long sel = sheet.selected();
 | 
				
			||||||
        TRecordset_sheet sheet(*rs, TR("Elenco di controllo"), 0x8);
 | 
					        TToken_string& row = sheet.row(sel);
 | 
				
			||||||
        k = sheet.run();
 | 
					        TRectype clifo(LF_CLIFO);
 | 
				
			||||||
        if (k == K_ENTER)
 | 
					        clifo.put(CLI_TIPOCF, row.get(0));
 | 
				
			||||||
        {
 | 
					        clifo.put(CLI_CODCF, row.get(1));
 | 
				
			||||||
          const long sel = sheet.selected();
 | 
					        clifo.edit();
 | 
				
			||||||
          TToken_string& row = sheet.row(sel);
 | 
					 | 
				
			||||||
          TRectype clifo(LF_CLIFO);
 | 
					 | 
				
			||||||
          clifo.put(CLI_TIPOCF, row.get(0));
 | 
					 | 
				
			||||||
          clifo.put(CLI_CODCF, row.get(1));
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        delete rs;
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					      delete rs;
 | 
				
			||||||
      return false;
 | 
					      return false;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    break;
 | 
					    break;
 | 
				
			||||||
@ -450,9 +445,9 @@ public:
 | 
				
			|||||||
  virtual void main_loop();
 | 
					  virtual void main_loop();
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
void TClifo_alleg_app::main_loop()
 | 
					void TClifo_alleg_app::main_loop()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					  open_files(LF_CAUSALI, LF_CLIFO, LF_COMUNI, LF_MOV, LF_RMOVIVA, 0);
 | 
				
			||||||
  TAlleg_mask m;
 | 
					  TAlleg_mask m;
 | 
				
			||||||
  m.run();
 | 
					  m.run();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user