Initial commit - tasks v1.1.14

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-21 15:46:20 +03:00
commit d91b19e336
218 changed files with 8258 additions and 0 deletions

BIN
backup/APPWIZ.VCT Normal file

Binary file not shown.

52
backup/SETTINGS.XML.TMPL Normal file
View File

@@ -0,0 +1,52 @@
<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
<VFPData>
<xsd:schema id="VFPData" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="VFPData" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="settings" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="host">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="100"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="schema">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="100"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="parola">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="100"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="idutilizator" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:totalDigits value="10"/>
<xsd:fractionDigits value="0"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:choice>
<xsd:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="lax"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<settings>
<host>ROA_ROMFAST</host>
<schema>SOFT</schema>
<parola>SOFT</parola>
</settings>
</VFPData>

BIN
backup/appwiz.vcx Normal file

Binary file not shown.

33
backup/exemplu.prg Normal file
View File

@@ -0,0 +1,33 @@
LOCAL lnHandle
lnHandle=SQLCONNECT([jcsserver],[soft],[123])
lcSql=[select * from vtasks]
lnSucces = SQLEXEC(lnHandle,lcSql,[cursorprg])
IF lnSucces < 0
MESSAGEBOX("Eroare la select")
ELSE
SELECT cursorprg
BROWSE
ENDIF
*!* lcDescriere=[descriere]
*!* lcData = TTOC(DATEtime(),1)
*!* lnEstimareInitiala = 5
*!* lcSql=[insert into tasks(descriere,dataora_inceput,estimare_initiala) values(']+lcDescriere+[',to_date(']+lcData+[','YYYYMMDDHH24miss'),] + ALLTRIM(STR(lnEstimareInitiala)) + [)]
*!* lnSucces = SQLEXEC(lnHandle,lcSql)
*!* IF lnSucces < 0
*!* MESSAGEBOX("Eroare la insert")
*!* ELSE
*!* MESSAGEBOX("A fost adaugata inregistrarea!")
*!* ENDIF
lcDescriere2=[descriere modificata]
lnIdTask = 1
lnEstimareCurenta = 5.15
lcSql = [update tasks set descriere = '] + lcDescriere2 + [',estimare_curenta =] + ALLTRIM(STR(lnEstimareCurenta,14,2)) + [ where id_task = ] + ALLTRIM(STR(lnIdTask))
lnSucces = SQLEXEC(lnHandle,lcSql)
IF lnSucces < 0
MESSAGEBOX("Eroare la update")
ELSE
MESSAGEBOX("A fost modificata inregistrarea!")
ENDIF
SQLDISCONNECT(lnHandle)

Binary file not shown.

Binary file not shown.

BIN
backup/frm_connect.SCT Normal file

Binary file not shown.

BIN
backup/frm_connect.scx Normal file

Binary file not shown.

BIN
backup/frm_lucrare_noua.SCT Normal file

Binary file not shown.

BIN
backup/frm_lucrare_noua.scx Normal file

Binary file not shown.

BIN
backup/frm_setari.SCT Normal file

Binary file not shown.

BIN
backup/frm_setari.scx Normal file

Binary file not shown.

BIN
backup/frm_tasks.SCT Normal file

Binary file not shown.

BIN
backup/frm_tasks.scx Normal file

Binary file not shown.

BIN
backup/frm_viz_lucrari.SCT Normal file

Binary file not shown.

BIN
backup/frm_viz_lucrari.scx Normal file

Binary file not shown.

297
backup/main.prg Normal file
View File

@@ -0,0 +1,297 @@
Set Talk Off
Set Deleted On
Set Century On
Set Date Dmy SHORT
Set Safety Off
Set Console Off
Set Seconds Off
Set Exclusive Off
Set Status Off
Set Status Bar Off
Set Hours To 24
Set Exact On
Set Ansi On
_Screen.WindowState= 2
Set NullDisplay To ""
*!* =================================================================
Public gnConnHandle, gnIdProgram, gnIdUtilizator, ;
gnIdClient, gbSpecial, gdData, gcAppName, gcAppPath, gcDataPath
Local lcPath
gnConnHandle = -1
gnIdUtilizator = 0
gnIdProgram = 0
gnIdClient = 0
gbSpecial = .F.
gdData = Date()
gcAppPath = Addbs(Justpath(Sys(16,0)))
gcAppName = Juststem(Sys(16,0))
Set Default To (gcAppPath)
gcDataPath = Addbs(gcAppPath) + [test.vcx]
Set Classlib To (gcDataPath)
*!* PUSH MENU _MSYSMENU
lcOnShutdown="ShutDown()"
On Shutdown &lcOnShutdown
On Error ErrorHandler(Error(),Program(),Lineno())
Push Menu _Msysmenu
*!* SETARI
gcSettingsFile = gcAppPath + 'settings.xml'
If !File(gcSettingsFile)
Messagebox('Nu exista fisierul ' + gcSettingsFile + '!',0+16,'Setari')
Shutdown()
Return
Endif
Xmltocursor(gcSettingsFile,"settings",512)
*!* SETARI ^
*!* PROGRAME_CHANGELOGS
gcProgrameChangeLogsFile = gcAppPath + 'programe_changelogs.xml'
If !File(gcProgrameChangeLogsFile)
Create Cursor programe_changelogs (id_program i, Program v(100), changelog v(200))
Else
Xmltocursor(gcProgrameChangeLogsFile,"programe_changelogs",512)
Endif
*!* PROGRAME_CHANGELOGS ^
Private goApp
goApp=Createobject("custom")
goApp.AddProperty("idutilizator",settings.idutilizator)
goExecutant = Createobject("Executor")
Do (gcAppPath + "meniu.mpr")
Do Form (gcAppPath + "frm_connect.scx")
If gnConnHandle<0
Shutdown()
Return
Endif
Set Procedure To proceduri.prg Additive && tasks, soft clienti
SET PROCEDURE TO proceduri_sql.prg ADDITIVE
SET PROCEDURE TO utile.prg ADDITIVE
SET PROCEDURE TO rapoarte.prg ADDITIVE
gcAppPath=Addbs(Justpath(Sys(16,0)))
gcAppName=Juststem(Sys(16,0))
Set Default To (gcAppPath)
lcPath = gcAppPath + "ferestre;" + ;
gcAppPath + "clase;" + ;
gcAppPath + "programe;" + ;
gcAppPath + "meniuri;" + ;
gcAppPath + "grafice;" + ;
gcAppPath + "date"
Set Path To (lcPath) Additive
Set Classlib To appwiz Additive && generare script
Set Classlib To comun Additive
Set Classlib To utility Additive
Set Classlib To Start Additive
Set Classlib To gen_script Additive
Set Classlib To execute_script Additive
Set Classlib To frm_script_aplicat Additive
Set Procedure To oproceduri_comune.prg Additive
Set Procedure To oinit_optiuni.prg Additive
Set Procedure To ini.prg Additive
Set Procedure To proceduri_genscript.prg Additive
lnSucces=editLucrare()&&in proceduri.prg
Read Events
*!* =================================================================
*!* =================================================================
*!* Release goApp
*!* _Screen.MaxButton=.T.
*!* _Screen.BorderStyle= 3
*!* _Screen.WindowState= 2
*!* Pop Menu _Msysmenu
*!* On Error
*!* On Shutdown
*!* =================================================================
*!* =================================================================
Function ErrorHandler(nError,cMethod,nLine)
Local lcErrorMsg,lcCodeLineMsg
Wait Clear
lcErrorMsg=Message()+Chr(13)+Chr(13)
lcErrorMsg=lcErrorMsg+"Method: "+cMethod
lcCodeLineMsg=Message(1)
If Between(nLine,1,10000) And Not lcCodeLineMsg="..."
lcErrorMsg=lcErrorMsg+Chr(13)+"Line: "+Alltrim(Str(nLine))
If Not Empty(lcCodeLineMsg)
lcErrorMsg=lcErrorMsg+Chr(13)+Chr(13)+lcCodeLineMsg
Endif
Endif
If Messagebox(lcErrorMsg,17,_Screen.Caption)#1
On Error
Return .F.
Endif
Endfunc
**=============================================
Function Shutdown
*!* If Type("goApp")=="O" And Not Isnull(goApp)
*!* Return goApp.OnShutDown()
*!* Endif
Do salveazaSetari
*DO inchide
Do deconectare
Cleanup()
Pop Menu _Msysmenu
*!* If _vfp.StartMode !=0
*!* Quit
*!* Endif
Endfunc
**=============================================
Function Cleanup
If Cntbar("_msysmenu")=7
Return
Endif
On Error
On Shutdown
Set Classlib To
Set Path To
Clear All
*Close All
Pop Menu _Msysmenu
Clear Events
Return
Endfunc
**=============================================
Procedure deconectare
Local lcCaption, lnSucces
lnSucces = -1
If gnConnHandle > 0
lnSucces = SQLDisconnect(gnConnHandle)
Endif
Return lnSucces
Endproc && deconectare
**=============================================
Procedure conectare
Parameters tcHost, tcUser, tcPassword
gnConnHandle = SQLConnect(tcHost, tcUser, tcPassword)
If gnConnHandle < 0
Aerror(laEroare)
Messagebox(laEroare(2))
Endif
Return gnConnHandle
Endproc && conectare
***=====================================================
Define Class Executor As Relation
cEroare = []
Procedure executaSql
Lparameters cmdsql,crsName, tlDontShowError
Local lnSucces
lnSucces = -1
If Pcount()<2
crsName=""
Endif
*LPARAMETERS cmdsql, crsname
If gnConnHandle > 0
lnSucces=SQLExec(gnConnHandle,cmdsql,crsName)
If lnSucces < 0
Aerror(laEroare)
This.cEroare = laEroare(2)
If !m.tlDontShowError
Messagebox(This.cEroare)
Endif
Endif
Endif
Return lnSucces
Endproc
Enddefine && Executor
**======================================
Procedure salveazaSetari
If Used('settings')
Replace settings.idutilizator With goApp.idutilizator In settings
Cursortoxml("SETTINGS",gcSettingsFile,1,512,0,"1")
Endif
If Used('programe_changelogs')
Cursortoxml("programe_changelogs", gcProgrameChangeLogsFile,1,512,0,"1")
Endif
Endproc
**======================================
** actualizeaza programe_changelogs cu calea catre fisierul changelog pentru un id_program
Procedure UpdateProgrameChangeLogs
Lparameters tnIdProgram, tcProgram, tcChangeLog
Local lcSelect
lcSelect = Select()
If Used('programe_changelogs') And !Empty(tcChangeLog)
Select programe_changelogs
Locate For id_program = tnIdProgram
If Found()
Replace changelog With Alltrim(tcChangeLog)
Else
Insert Into programe_changelogs(id_program, Program, changelog) Values (tnIdProgram, Alltrim(tcProgram), Alltrim(tcChangeLog))
Endif
Endif
Select (lcSelect)
Endproc
**======================================
** intoarce calea catre fisierul changelog in functie de id_program
Function GetChangeLogByIdProgram
Lparameters tnIdProgram
Local lcSelect, lcChangelog
lcSelect = Select()
lcChangelog = ""
If Used('programe_changelogs')
Select programe_changelogs
Locate For id_program = tnIdProgram
If Found()
lcChangelog = Alltrim(changelog)
Endif
Endif
Select (lcSelect)
Return lcChangelog
Endfunc

BIN
backup/meniu.MNT Normal file

Binary file not shown.

BIN
backup/meniu.mnx Normal file

Binary file not shown.

37
backup/proceduri.prg Normal file
View File

@@ -0,0 +1,37 @@
Procedure EditTask
parameters tnId
private poRec
lcSql = [select * from tasks where ]+Iif(!Empty(tnId),[ id = ?tnId] , [1=2])
lcCursor = Sys(2015)
lnSucces = goExecutant.executasql(lcSql,lcCursor)
If lnSucces > 0
Select (lcCursor)
Scatter Name poRec Memo
Do Form frm_adaugare_task
Endif
Return lnSucces
Endproc
*****==============================================================
Procedure EditLucrare
parameters tnId
private poRec
*!* IF EMPTY(tnid)
*!* endif
lcSql = [select * from luc_vlucrari_tot where ]+Iif(!Empty(tnId),[ id = ?tnId], [1=2])
lcCursor = Sys(2015)
lnSucces = goExecutant.executasql(lcSql,lcCursor)
If lnSucces > 0
Select (lcCursor)
Scatter Name poRec Memo
poRec.datal = TTOD(poRec.datal)
Do Form frm_lucrare_noua
Endif
Return lnSucces
Endproc
**************************

65
backup/proceduri_sql.prg Normal file
View File

@@ -0,0 +1,65 @@
************************ inceput conecteaza ***************************
Procedure conecteaza
Lparameters tcHost, tcUser, tcPassword
gnConnHandle = SQLConnect(tcHost, tcUser, tcPassword)
If gnConnHandle < 1
Aerror(laEroare)
Messagebox(laEroare(2))
Endif
Return gnConnHandle
Endproc
**************************** inceput executaSql ***************************
Function executaSql
Lparameters cmdSql, crsName, tlShowErr
Local lnSucces
lnSucces = -1
If Pcount() < 2 And !m.tlShowErr
crsName=""
Endif
If gnConnHandle > 0
lnSucces=SQLExec(gnConnHandle,cmdSql,crsName)
If lnSucces < 0 And m.tlShowErr
Aerror(laEroare)
eroaresql(@laEroare,cmdSql)
Endif
Endif
Return lnSucces
Endfunc
************************* inceput deconecteaza ************************
Function deconecteaza
*Lparameters lnConn
Local lnSucces
lnSucces = -1
If lnConn > 0
lnSucces = SQLDisconnect(gnConnHandle)
Endif
Return lnSucces
Endfunc
******************************* inceput eroareSql **********************************
Procedure eroaresql
Lparameters laErr, lcsql
EXTERNAL ARRAY laErr
Local lcMesaj
lcMesaj = [Eroare # : ] + Alltrim(Str(laErr(1))) + crlf + ;
[Mesajul : ] + laErr(2) + ;
IIF(!Empty(laErr(3)), [Eroare OLE : ] + laErr(3) ,[]) + ;
[Aplicatie : ] + laErr(4) + ;
IIF(Pcount() = 2, crlf + lcsql, [])
Messagebox(lcMesaj,0+16)
Endproc

BIN
backup/sc_form_main.SCT Normal file

Binary file not shown.

BIN
backup/sc_form_main.scx Normal file

Binary file not shown.

122
backup/soft_clienti.prg Normal file
View File

@@ -0,0 +1,122 @@
_Screen.WindowState= 2 &&Specifies properties and methods for the main Visual FoxPro window
&& 0-normal/1-minimized (minimized to an icon)/2-maximized (enlarged to fill the screen)
Set Deleted On &&ignore records that are marked for deletion.
Set Century On &&Specifies a four-digit year in a format that includes 10 characters (including date delimiters).
Set Date Dmy &&Date/Mounth/Year
Set Safety Off &&Determines whether Visual FoxPro displays a dialog box before overwriting an existing file, or whether table or field rules, default values, and error messages are evaluated when changes are made in the Table Designer or with ALTER TABLE
Set Console Off &&Suppresses output to the main Visual FoxPro window or to the active user-defined window
Set NullDisplay To '*' &&Specifies the text displayed for null values.
Set Seconds Off &&Specifies that seconds are not displayed in DateTime values
Set Hours To 24
Set Exclusive Off &&Allows a table opened on a network to be shared and modified by any user on the network.
Set Ansi On &&'Tommy' = 'Tom' is false (.F.)
Set Exact On &&Specifies the rules Visual FoxPro uses when comparing two strings of different lengths
Local lcMainClassLib
Local lcLastSetTalk, lcLastSetPath, lcLastSetClassLib, lcOnShutdown, lcPath
*-- Save and configure environment.
lcLastSetTalk=Set("TALK")
Set Talk Off
lcLastSetPath=Set("PATH")
Public gcAppDir, gcDatePath, gcDataPath, buton, gcTempPath, recordNumber, gnConnHandle
Store 2 To buton
Store 0 To recordNumeber
gnConnHandle = 0
&&declarare variabile pt. nr crt
&& in programul principal
Public m.nrord
Private nror
Declare nror[65000]
*!* lcOnShutdown = "inchide()"
*!* On Shutdown &lcOnShutdown
On Error ErrorHandler(Error(),Program(),Lineno())
gcAppDir=Addbs(Justpath(Sys(16,0)))
*gcAppDir=SYS(5)+ SYS(2003)+"\"
gcAppDir = Strtran(gcAppDir, 'PROGRAME\','')
gpos = Rat('\',gcAppDir,2)
gcDatePath = Left(gcAppDir,gpos) + 'date_aplicatii\'
If Not Directory(gcDatePath)
Md (gcDatePath)
Endif
gcDataPath = gcAppDir + "date\"
gcTempPath = "c:\temp\"
If Not Directory(gcTempPath)
Md (gcTempPath)
Endif
Cd (gcAppDir) && init: CD "\soft_clienti\"
lcclase = gcAppDir + [clase]
lcLastSetClassLib=Set("CLASSLIB")
Set Procedure To proceduri_sql Additive
*!* Set Procedure To proceduri_start Additive
*!* Set Procedure To proceduri_soft_clienti Additive
*gnConnHandle = conecteaza([jcsServer],[soft],[soft])
gnConnHandle = conecteaza([ROA_ROMFAST2],[soft],[soft])
Do Form sc_form_main
******************* inceput ErrorHandler *******************************************
Function ErrorHandler(nError,cMethod,nLine)
Local lcErrorMsg,lcCodeLineMsg
Wait Clear
lcErrorMsg = Message()+Chr(13)+Chr(13)
lcErrorMsg = lcErrorMsg + "Method: " + cMethod
lcCodeLineMsg = Message(1)
If Between(nLine,1,10000) And Not lcCodeLineMsg="..."
lcErrorMsg = lcErrorMsg + Chr(13) + "Line: "+Alltrim(Str(nLine))
If Not Empty(lcCodeLineMsg)
lcErrorMsg = lcErrorMsg + Chr(13) + Chr(13) + lcCodeLineMsg
Endif
Endif
If Messagebox(lcErrorMsg,17,_Screen.Caption) # 1
On Error
Return .F.
Endif
Endfunc
**************************************** inceput Shutdown ************************************
Function inchide()
If Type("goApp")=="O" And Not Isnull(goApp)
Return goApp.OnShutDown()
Endif
Cleanup()
If _vfp.StartMode = 4
Quit
Endif
*!* If gnConnHandle > 0
*!* deconecteaza(gnConnHandle)
*!* Endif
Endfunc
**************************************** inceput Cleanup *************************************
Function Cleanup
If Cntbar("_msysmenu")=7
Return
Endif
On Error
On Shutdown
Set Classlib To
Set Path To
Clear All
Close All
Pop Menu _Msysmenu
Return
Endfunc

BIN
backup/start.VCT Normal file

Binary file not shown.

BIN
backup/start.vcx Normal file

Binary file not shown.

BIN
backup/tasks_ref.CDX Normal file

Binary file not shown.

BIN
backup/tasks_ref.DBF Normal file

Binary file not shown.

BIN
backup/tasks_ref.FPT Normal file

Binary file not shown.

BIN
backup/test.VCT Normal file

Binary file not shown.

BIN
backup/test.vcx Normal file

Binary file not shown.

85
backup/utile.prg Normal file
View File

@@ -0,0 +1,85 @@
*-------------------------------------------
* Function...: Xmenu
* Author.....: MARTIN
* Date.......: 04/06/1997
* Notes......: Based on an idea from Steve Zimmelman for FoxPro 2.x
* Parameters.: tcItems = Semicolon-separated String with the various options
* ...........: tnBar = Initially selected item (default=1)
* Returns....: Selected item number
* See Also...: PROMPT() [FoxPro Native]
* lnOption = xmenu('\<Listare1;L\<istare2;Li\<stare3')
PROCEDURE XMENU
LPARAMETERS TCITEMS, TNBAR
LOCAL NITEMCOUNT, AITEMS, X, NROW, NCOL, CTITLE, NLASTPOS, CCOLOR, AITEMS
PRIVATE CPOPMENU, NSELECT && They flow into the GetChoice internal procedure
IF PCOUNT() < 2
TNBAR = 1
ENDIF
ACTIVATE SCREEN
* Parse every item
m.NITEMCOUNT = OCCURS( ';', TCITEMS ) + 1
DIMEN AITEMS[ m.nItemCount ]
m.NLASTPOS = 1
FOR m.X = 1 TO m.NITEMCOUNT
IF m.X < m.NITEMCOUNT
AITEMS[ m.x ] = SUBS( m.TCITEMS, m.NLASTPOS, ;
( AT( ';', m.TCITEMS, m.X ) - 1 ) - m.NLASTPOS + 1 )
ELSE
AITEMS[ m.x ] = SUBS( m.TCITEMS, m.NLASTPOS, ;
( LEN( m.TCITEMS ) - m.NLASTPOS ) + 1 )
ENDIF
IF AITEMS[ m.x ] # "\-"
AITEMS[ m.x ] = ALLT( AITEMS[ m.x ] )
ENDIF
m.NLASTPOS=AT( ';', m.TCITEMS, m.X ) + 1
NEXT
* Calculates the mouse pointer position
m.NROW = IIF( MROW() + m.NITEMCOUNT < SROW(), MROW() - 1, SROW() - m.NITEMCOUNT )
m.NCOL = IIF( MCOL() + 10 < SCOL(), MCOL() - 3, MCOL() - 13 )
* Gets an unique name for the pop-up
m.CPOPMENU = 'M' + SYS(3) + "_"
DEFINE POPUP ( m.CPOPMENU ) SHORTCUT RELATIVE FROM NROW, NCOL
FOR m.X = 1 TO m.NITEMCOUNT
DEFINE BAR m.X OF ( m.CPOPMENU ) PROMPT AITEMS[ m.x ]
NEXT
m.CANS = ""
m.NSELECT = 0
CLEAR TYPE
ON SELECTION POPUP ( m.CPOPMENU ) DO GETCHOICE
ACTIVATE POPUP ( m.CPOPMENU ) BAR TNBAR
POP KEY
RELEASE POPUP ( m.CPOPMENU )
RETURN IIF( LASTKEY()=27, 0, m.NSELECT )
ENDPROC && XMENU
*--------------------
PROCEDURE GETCHOICE
m.NSELECT = BAR()
DEACTIVATE POPUP ( m.CPOPMENU )
ENDPROC
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& MENIU &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&