Files
roastart/Programe/update_start.prg
Marius Mutu b241a639b1 Import initial: surse ROASTART + text FoxBin2Prg in arbore
Binarele VFP raman pe SVN si sunt git-ignored; COMUN e gestionat separat.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A5okKjUKMM5Xk1egq2w81P
2026-08-03 09:34:12 +03:00

229 lines
7.2 KiB
Plaintext

******************************************************************************
Procedure citeste_drepturi
Lparameters tnIdGrup,tnIdProgram
lcCursor = [v_obiectegrup]
If Used(lcCursor)
*!* Select v_obiectegrup
*!* Locate For id_firma=gnIdFirma
*!* If Found()
*!* Return
*!* Else
Use In (lcCursor)
*!* Endif
Endif
lcSql=[select cheie from vdef_grup_obiecte_prog ]+;
[where id_grup=]+Alltrim(Str(tnIdGrup))+[ and id_program=]+Alltrim(Str(tnIdProgram))
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
If lnSucces < 0
aMessagebox(goExecutor.cEroare,0+16,'Eroare')
Return
Endif
Endproc
******************************************************************************
Procedure viz_prg_instalat
If Used('v_programe_instalate')
Use In v_programe_instalate
Endif
*!* lcSql = [select * from vdef_util_programe where id_util=]+Alltrim(Str(gnIdUtil))+;
*!* [ order by ordine]
lcSql = [{call pack_drepturi.programe_utilizator(]+ALLTRIM(STR(gnIdUtil))+[)}]
lcCursor = [v_programe_instalate]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
goExecutor.oReset()
Endproc
******************************************************************************
Procedure viz_optiuni_prg
If Used('v_optiuni_programe')
Use In v_optiuni_programe
Endif
lcSql = [select * from vdef_util_optiuni where id_util=]+Alltrim(Str(gnIdUtil))+;
[ order by ordine]
lcCursor = [v_optiuni_programe]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
goExecutor.oReset()
Endproc
******************************************************************************
Procedure update_organigrama_firme_util
If Used('v_organigrama_fu')
Use In v_organigrama_fu
Endif
lcSql = [select * from vdef_organigrama_firme_util]
lcCursor = [v_organigrama_fu]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
goExecutor.oReset()
Endproc
******************************************************************************
Procedure update_organigrama_firme_grup
If Used('v_organigrama_fg')
Use In v_organigrama_fg
Endif
lcSql = [select * from vdef_organigrama_firme_grup]
lcCursor = [v_organigrama_fg]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
goExecutor.oReset()
Endproc
******************************************************************************
Procedure update_organigrama_programe_firme
If Used('v_organigrama_pf')
Use In v_organigrama_pf
Endif
lcSql = [select * from vdef_organigrama_prog_firme]
lcCursor = [v_organigrama_pf]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
goExecutor.oReset()
Endproc
******************************************************************************
Procedure update_organigrama_programe_util
If Used('v_organigrama_pu')
Use In v_organigrama_pu
Endif
lcSql = [select * from vdef_organigrama_programe_util]
lcCursor = [v_organigrama_pu]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
goExecutor.oReset()
Endproc
******************************************************************************
Procedure update_organigrama_programe_grup
If Used('v_organigrama_pg')
Use In v_organigrama_pg
Endif
lcSql = [select * from vdef_organigrama_programe_grup]
lcCursor = [v_organigrama_pg]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
goExecutor.oReset()
Endproc
******************************************************************************
Procedure update_organigrama_util_firme
If Used('v_organigrama_uf')
Use In v_organigrama_uf
Endif
lcSql = [select * from vdef_organigrama_util_firme]
lcCursor = [v_organigrama_uf]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
goExecutor.oReset()
Endproc
******************************************************************************
Procedure update_organigrama_util_grup
If Used('v_organigrama_ug')
Use In v_organigrama_ug
Endif
lcSql = [select * from vdef_organigrama_util_grup]
lcCursor = [v_organigrama_ug]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
goExecutor.oReset()
Endproc
******************************************************************************
Procedure update_organigrama_grupuri
If Used('v_organigrama')
Use In v_organigrama
Endif
lcSql = [select * from vdef_organigrama_grupuri]
lcCursor = [v_organigrama]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
goExecutor.oReset()
Endproc
******************************************************************************
Procedure update_programe
Lparameters tnIdGrup
If Used('v_programe')
Use In v_programe
Endif
If Empty(tnIdGrup)
lcSql = [select ide_program,nume from vdef_programe where instalat=1 order by nume]
Else
lcSql = [{call pack_drepturi.programe_grup(]+Alltrim(Str(tnIdGrup))+[)}]
Endif
lcCursor = [v_programe]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
goExecutor.oReset()
Endproc
******************************************************************************
Procedure update_obiecte_prog
Lparameters tnIdGrup,tnIdProgram
If Used('v_obiecte')
Use In v_obiecte
Endif
lcSql = [select * from vdef_obiecte where id_program=]+Alltrim(Str(tnIdProgram))+;
[ order by cale]
*!* lcSql = [{call pack_drepturi.obiecte_program(]+Alltrim(Str(tnIdGrup))+[,]+;
*!* Alltrim(Str(tnIdProgram))+[)}]
lcCursor = [v_obiecte]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
If lnSucces<0
aMessagebox(goExecutor.cEroare+" "+lcSql)
Endif
goExecutor.oReset()
Endproc
******************************************************************************
*!* modificare v 2.0.25
*!* Procedure update_obiecte_grup
*!* Lparameters tnIdGrup
*!* If Used('v_obiectegrup')
*!* Use In v_obiecte
*!* Endif
*!* lcSql = [select * from vdef_grup_drept_obiecte where id_grup=]+Alltrim(Str(tnIdGrup))+;
*!* [ order by id_obiect]
*!* lcCursor = [v_obiectegrup]
*!* lnSucces = goExecutor.oExecute(lcSql,lcCursor)
*!* goExecutor.oReset()
*!* Endproc
*!* modificare v 2.0.25 ^
******************************************************************************
Procedure update_grupuri
If Used('v_grupuri')
Use In v_grupuri
Endif
lcSql = [select * from vdef_grup order by grup]
lcCursor = [v_grupuri]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
goExecutor.oReset()
Endproc
******************************************************************************
Procedure update_firme
If Used('v_firme')
Use In v_firme
Endif
If Used('v_firmeo')
Use In v_firmeo
Endif
lcSql = [select id_firma,firma from v_nom_firme order by firma]
lcCursor = [v_firmeo]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
goExecutor.oReset()
Create Cursor v_firme(id_firma N(10),firma C(100))
Select v_firme
Append Blank
Replace id_firma With -1,firma With "<<TOATE FIRMELE>>"
Insert Into v_firme(id_firma,firma) Select id_firma,firma From v_firmeo Order By firma
If Used('v_firmeo')
Use In v_firmeo
Endif
Endproc
******************************************************************************
Procedure update_nom_programe
If Used('vnom_programe')
Use In vnom_programe
Endif
lcSql = [select id_program,denumire as nume from vnom_programe order by 2]
lcCursor = [vnom_programe]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
goExecutor.oReset()
Endproc
******************************************************************************
Procedure update_grup_prog
If Used('vgrup_programe')
Use In vgrup_programe
Endif
lcSql = [select id_grup_prog,explicatie,ordine from vdef_grup_programe ]+;
[order by ordine]
lcCursor = [vgrup_programe]
lnSucces = goExecutor.oExecute(lcSql,lcCursor)
If lnSucces<0
aMessagebox(goExecutor.cEroare+" "+lcSql)
Endif
goExecutor.oReset()
Endproc
******************************************************************************