diff --git a/ba/ba5.cpp b/ba/ba5.cpp index 24abab1c7..1b02cb851 100755 --- a/ba/ba5.cpp +++ b/ba/ba5.cpp @@ -28,7 +28,7 @@ public: }; TSoci_sheet::TSoci_sheet(bool fis) -: TArray_sheet(-1,-1, 0, 0, "Soci", fis ? PHYSICAL_HEAD : JURASSIC_HEAD), +: TArray_sheet(-1,-1, -4, -4, "Soci", fis ? PHYSICAL_HEAD : JURASSIC_HEAD), _physical(fis) {} @@ -54,7 +54,8 @@ void TSoci_sheet::add_socio(const TString& codice, } else t.add(ragione); if (elem < 0) add(t); - else row(elem) = t; + else + row(elem) = (TString&) t; } /////////////////////////////////////////////////////////// @@ -213,24 +214,15 @@ bool TQuery_application::do_query() for (_soci->read(_isgteq); !_soci->eof(); _soci->next()) // Fill sheet { if (query.test(soci) == 0) - s.add_socio(soci.get("CODANAGRSO"), ""); - } - - TString ragsoc(80), - cur_codice(10); - for (int i = 0; i < s.items(); i++) - { - - TToken_string& t = (TToken_string&) s.row(i); - - t.restart(); - cur_codice = t.get(); - anag.zero(); - anag.put("TIPOA", query.tipo()); - anag.put("CODANAGR", cur_codice); - if (_anag->read() != NOERR) ragsoc = "Anagrafica assente"; - else ragsoc = _anag->curr().get("RAGSOC"); - s.add_socio(cur_codice, ragsoc, i); + { + TString cur_codice = soci.get("CODANAGRSO"), ragsoc(80); + anag.zero(); + anag.put("TIPOA", query.tipo()); + anag.put("CODANAGR", cur_codice); + if (_anag->read() != NOERR) ragsoc = "Anagrafica assente"; + else ragsoc = _anag->curr().get("RAGSOC"); + s.add_socio(cur_codice, ragsoc); + } } if (s.items() == 0) @@ -238,7 +230,7 @@ bool TQuery_application::do_query() warning_box("Nessuna corrispondenza"); return TRUE; } - + while(s.run() == K_ENTER) { TToken_string& r = s.row(); @@ -252,7 +244,7 @@ bool TQuery_application::do_query() h.add(head(ditte, "RAGSOC", "Ragione sociale")); h.add("Carica|Qualifica|740|750"); h.add(head(soci, "PERCQUAZ", "% Quote")); - TArray_sheet d(-1,-1, 0, 0, nome, h); + TArray_sheet d(-1,-1, -4, -4, nome, h); soci.zero(); soci.put("TIPOASOC", query.tipo()); diff --git a/ba/ba5000.uml b/ba/ba5000.uml index c597c51d5..c30a3e8ab 100755 --- a/ba/ba5000.uml +++ b/ba/ba5000.uml @@ -1,6 +1,6 @@ #include "ba4600.h" -PAGE "Ricerca soci" -1 -1 50 9 +PAGE "Ricerca soci" -1 -1 54 9 RADIOBUTTON LST_SC1_TIPOASOC 20 BEGIN