Procedure make_cFCentre *!* Create Cursor cFCentre (id_centru I(4) Null, csectie C(2) Null, centru C(30) Null) *!* Insert Into cFCentre Values (0, '00','') Create Cursor cFCentre (id_sectie I(4) Null, sectie C(30) Null) Insert Into cFCentre Values (0, '') Private poCentre, pcschema1, pcselect1 Store '' To poCentre pcschema1 = [''] *!* If gnId_centre_sectie = 1 Then *!* pcselect1 = ['select ce.id_centru, ce.csectie, ce.sectie as centru ]+; *!* [from mg_nom_centre_sectie ce ]+; *!* [where 1=2'] *!* pcorder1 = [ce.sectie] *!* pcfiltru1 = [ce.sectie is not null and ce.societate = 0] *!* Else *!* pcselect1 = ['select ce.id_centru, ce.csectie, ce.centru ]+; *!* [from mg_nom_centre_profit ce ]+; *!* [where 1=2'] *!* pcorder1 = [ce.centru] *!* pcfiltru1 = [ce.centru is not null and ce.societate = 0] *!* Endif Local lcSchema, lcSelect, lcOrder, lcgroup, lcFiltru, lcFiltruOriginal, llModParam, llAfiseaza lcSchema = [id_sectie N(5), sectie C(30)] lcSelect = [select id_sectie, sectie from vnom_sectii] lcOrder = [sectie] lcgroup = [] lcFiltru = [2=2] llModParam = .T. llAfiseaza = .F. gencursor('pocentre','cc', lcSelect, lcFiltru, lcSchema, lcOrder, llAfiseaza, lcgroup, llModParam, lcFiltruOriginal) poCentre.ca_baza1.afisare() Select cFCentre Append From Dbf("cc") If Used('cc') Use In cc Endif Release poCentre Select cFCentre Go Top Endproc && make_cFCentre ***--------------------------------------------------------------------------------------------- Procedure make_cTipuri_seturi Create Cursor cTipuri_seturi (id_tip_set N(5), nume_tip_set C(30)) Insert Into cTipuri_seturi Values (0, '') Private poTipuri_seturi, pcschema1, pcselect1 Store '' To poTipuri_seturi pcschema1 = [''] pcselect1 = ['select ts.id_tip_set, ts.nume_tip_set ]+; [from mg_tipuri_seturi ts ]+; [where 1=2'] pcorder1 = [ts.nume_tip_set] pcfiltru1 = [2=2] llAfiseaza = .F. gencursor('poTipuri_seturi','cc',pcselect1,pcfiltru1,pcschema1,pcorder1,llAfiseaza) poTipuri_seturi.ca_baza1.afisare() Select cTipuri_seturi Append From Dbf("cc") Release poTipuri_seturi Select cTipuri_seturi Go Top Endproc && make_cTipuri_seturi ***--------------------------------------------------------------------------------------------- Procedure make_venChelt Create Cursor cVenChelt (id_venchelt I(4) Null, explicatie C(200) Null) Insert Into cVenChelt Values (0, '') Insert Into cVenChelt Values (99999, 'FARA TIP CHELTUIALA') Private poVenChelt, pcschema1, pcselect1 Store '' To poVenChelt Local lcSchema, lcSelect, lcOrder, lcgroup, lcFiltru, lcFiltruOriginal, llModParam, llAfiseaza lcSchema = [id_venchelt N(5), explicatie C(30)] lcSelect = [select id_venchelt, explicatie from vnom_venchel] lcOrder = [explicatie] lcgroup = [] lcFiltru = [2=2] llModParam = .T. llAfiseaza = .F. gencursor('poVenChelt','cc', lcSelect, lcFiltru, lcSchema, lcOrder, llAfiseaza, lcgroup, llModParam, lcFiltruOriginal) poVenChelt.ca_baza1.afisare() Select cVenChelt Append From Dbf("cc") If Used('cc') Use In cc Endif Release poVenChelt Select cVenChelt Go Top Endproc && make_venChelt ***---------------------------------------------------------------------------------------------