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
**************************
