*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="onom_sal.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS cus_odata_caseasig AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_caseasig"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_caseasig"
			lcamp = "id_caseasig"
			lclook = gcS + ".sal_stat"
			lclookid = "id_caseasig"
			
			
		
		
		
		Endif
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcid_judet = NVL(ALLTRIM(STR(torec.id_judet)),'0')
			lcNumecasa = NVL(STRTRAN(ALLTRIM(UPPER(torec.numecasa)),['],['']),"")
		
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.SAL_caseasig (ID_judet, numecasa) VALUES (]+;
					LCId_judet + [,']+ lcNumecasa + [')]
				
			Case lcActiune = "UPDATE"
		*!*	DEBUG 
		*!*	SUSPEND 
				lcSql = [UPDATE ] + gcS + [.SAL_caseasig SET id_judet = ] + lcid_judet +;
				 [,numecasa = '] + lcnumecasa + [' where id_caseasig = ] + lcId
		
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_clasesal AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_clasesal"
	*</PropValue>
	
	PROCEDURE make_sql
		
		
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_clasesal"
			lcamp = "id_clasasal"
			lclook = gcS + ".sal_stat"
			lclookid = "sal_stat.id_clasasal"
		Endif
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcCod = NVL(ALLTRIM(torec.cod),"")
			lcTarifar = Nvl(ALLTRIM(STR(toRec.tarifar)),"0")
			lcinactiv = Nvl(ALLTRIM(STR(toRec.inactiv)),"0")
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.sal_nom_clasesal (cod,tarifar) VALUES ('];
				 + lcCod+ [',] + lcTarifar +[)]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE ] + gcS + [.sal_nom_clasesal SET cod = '] + lcCod+ ;
				 [',tarifar = ]+ lcTarifar+[,inactiv = ]+ lcInactiv+;
				 [ where id_clasasal = ] + lcId
		
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
				*lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_conf_popr AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_conf_popr"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_popriri"
			lcamp = "id_popriri"
			lclook = gcS + ".sal_popriri"
			lclookid = "sal_popriri.id_poprire"
		Endif
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcNume_popr = NVL(UPPER(ALLTRIM(torec.nume_popr)),"")
			lcsumafixa = Nvl(ALLTRIM(STR(toRec.sumafixa)),"0")
			lcid_calcdin = Nvl(ALLTRIM(STR(toRec.id_calcdin)),"0")
			lcpermanent = Nvl(ALLTRIM(STR(toRec.permanent)),"0")
			lcneimpozab = Nvl(ALLTRIM(STR(toRec.neimpozab)),"0")
			lcinactiv = Nvl(ALLTRIM(STR(toRec.inactiv)),"0")
			lcidben = ALLTRIM(STR(NVL(toRec.id_beneficiar,0)))
			lcScd = NVL(UPPER(ALLTRIM(torec.scd)),"")
			lcAscd = NVL(UPPER(ALLTRIM(torec.ascd)),"")
			lcScc = NVL(UPPER(ALLTRIM(torec.scc)),"")
			lcAscc = NVL(UPPER(ALLTRIM(torec.ascc)),"")
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.sal_nom_popriri (nume_popr,sumafixa,id_calcdin,permanent,neimpozab,id_beneficiar,scd,ascd,scc,ascc) VALUES ('] + lcNume_popr+ [',] + lcSumafixa + ;
				[,] + lcid_calcdin + [,] + lcpermanent + [,] + lcneimpozab +[,]+lcidben +[,']+lcScd+[',']+lcAscd+[',']+lcScc+[',']+lcAscc+[')]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE ] + gcS + [.sal_nom_popriri SET nume_popr = '] +lcNume_popr + [',sumafixa =] + lcsumafixa + ;
				[,id_calcdin = ] + lcid_Calcdin + [,permanent = ] + lcpermanent + [,neimpozab = ] + lcneimpozab + ;
				[,inactiv = ]+ lcinactiv + [,id_beneficiar = ']+lcidben  +;
				[',scd = ']+lcScd+[',ascd = ']+lcAscd+[',scc=']+lcScc+[',ascc = ']+lcAscc+[' where id_popriri = ] + lcId
		
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		*!*			lcSql = [UPDATE ] + gcS + [.sal_persintret SET STERS = 1  WHERE id_pers = ] +  lcId
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_conf_spor AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_conf_spor"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_sporuri "
			lcamp = "id_sporuri "
			lclook = gcS + ".sal_sporuri"
			lclookid = "sal_sporuri.id_spor"
		Endif
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcNume_spor = NVL(UPPER(ALLTRIM(torec.nume_spor)),"")
			lcsumafixa = Nvl(ALLTRIM(STR(toRec.sumafixa)),"0")
			lcid_calcdin = Nvl(ALLTRIM(STR(toRec.id_calcdin)),"0")
			lcpermanent = Nvl(ALLTRIM(STR(toRec.permanent)),"0")
			lcsomaj = Nvl(ALLTRIM(STR(toRec.somaj)),"0")
			lcvechime = Nvl(ALLTRIM(STR(toRec.vechime)),"0")
			lcinactiv = Nvl(ALLTRIM(STR(toRec.inactiv)),"0")
			lcIdTipSpor = ALLTRIM(STR(toRec.id_tip_spor))
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		*!*	modificare	v 2.0.0
		*!*			lcSql = [INSERT INTO ] + gcS + [.sal_nom_sporuri (nume_spor,sumafixa,id_calcdin,permanent,somaj,vechime) VALUES ('] + lcNume_spor+ [',] + lcSumafixa + ;
		*!*			[,] + lcid_calcdin + [,] + lcpermanent + [,] + lcsomaj + [,] + lcvechime +[)]
				lcSql = [begin pack_def_salarii.adauga_spor(] + lcIdTipSpor + [,'] + lcNume_spor+ [',] + lcSumafixa + ;
					[,] + lcid_calcdin + [,] + lcpermanent + [,] + lcsomaj + [,] + lcvechime +[,] + lcInactiv + [); end;]
			Case lcActiune = "UPDATE"
		*!*			lcSql = [UPDATE ] + gcS + [.sal_nom_sporuri SET nume_spor = '] +lcNume_spor + [',sumafixa =] + lcsumafixa + ;
		*!*			[,id_calcdin = ] + lcid_Calcdin + [,permanent = ] + lcpermanent + [,somaj = ] + lcsomaj + ;
		*!*			[,vechime = ] + lcvechime + [,inactiv = ]+ lcinactiv + [ where id_sporuri = ] + lcId
				lcSql = [begin pack_def_salarii.modifica_spor(] + lcId + [,] + lcIdTipSpor + [,'] + lcNume_spor+ [',] + lcSumafixa + ;
					[,] + lcid_calcdin + [,] + lcpermanent + [,] + lcsomaj + [,] + lcvechime +[,] + lcInactiv + [); end;]
		*!*	modificare	v 2.0.0	^
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		*!*			lcSql = [UPDATE ] + gcS + [.sal_persintret SET STERS = 1  WHERE id_pers = ] +  lcId
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_curscal AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_curscal"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_curs"
			lcamp = "id_c"
			lclook = gcS + ".sal_cursuri"
			lclookid = "id_c"
		Endif
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcDenumire = NVL(STRTRAN(ALLTRIM(UPPER(torec.denumire)),['],['']),"")
			lcInactiv = NVL(ALLTRIM(STR(torec.inactiv)),'0')
		
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.sal_nom_curs (denumire) VALUES (']+;
					lcDenumire + [')]
				
			Case lcActiune = "UPDATE"
		*!*	DEBUG 
		*!*	SUSPEND 
				lcSql = [UPDATE ] + gcS + [.sal_nom_curs SET denumire = '] + lcDenumire +;
				 [',inactiv = ] + lcinactiv +[ where id_c = ] + lcId
		
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update ] +gcS +[.sal_deduceri set sters=1 where id_deducere=]+lcid
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_formatii AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_formatii"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_formatii"
			lcamp = "id_formatia"
			lclook = gcS + ".sal_stat"
			lclookid = "id_formatie"
			
			
		
		
		
		Endif
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcid_sectie = NVL(ALLTRIM(STR(torec.id_sectie)),'0')
			lcTranse = NVL(ALLTRIM(STR(torec.id_transa)),'0')
			lcSemnaturi = NVL(ALLTRIM(STR(torec.id_semnatura)),'null')
			lcDenumire = NVL(STRTRAN(ALLTRIM(UPPER(torec.denumire)),['],['']),"")
			lcOrdine = NVL(ALLTRIM(STR(torec.ordine)),'')
			lcInactiv = NVL(ALLTRIM(STR(torec.INACTIV)),'0')
		Endif
		
		IF gnSAL_SPECIAL = 4 AND gnIdProgram = 9
			If Inlist(lcActiune, "UPDATE",'DELETE')
				lcId = Alltrim(Str(tnId))
				lcnom = gcS + ".sal_nom_locmunca"
				lcamp = "id_locmunca"
				lclook = gcS + ".sal_stat"
				lclookid = "id_locmunca"
			ENDIF 	
			
		
		
				Do Case
				Case lcActiune = "INSERT"
		
					lcSql = [INSERT INTO ] + gcS + [.sal_nom_locmunca (ID_SECTIE, ID_TRANSA, DENUMIRE, ORDINE,id_semnatura) VALUES (]+;
						LCiD_SECTIE + [,]+ lctranse + [,'] + lcDenumire + [',] + lcOrdine + [,]+lcSemnaturi +[)]
					
				Case lcActiune = "UPDATE"
			*!*	DEBUG 
			*!*	SUSPEND 
					lcSql = [UPDATE ] + gcS + [.sal_nom_locmunca SET id_sectie = ] + lcid_sectie +[,id_transa = ] + lctranse;
					 + [,denumire = '] + lcDenumire + [',inactiv = ] + lcinactiv +[,ordine= ] + lcOrdine + [,id_semnatura = ]+lcSemnaturi +[ where id_locmunca = ] + lcId
		
				Case lcActiune = "DELETE"
				
			*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
					lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
			Endcase
		
		ELSE 
			Do Case
				Case lcActiune = "INSERT"
		
					lcSql = [INSERT INTO ] + gcS + [.SAL_nom_FORMATII (ID_SECTIE, ID_TRANSA, DENUMIRE, ORDINE,id_semnatura) VALUES (]+;
						LCiD_SECTIE + [,]+ lctranse + [,'] + lcDenumire + [',] + lcOrdine + [,]+lcSemnaturi +[)]
					
				Case lcActiune = "UPDATE"
			*!*	DEBUG 
			*!*	SUSPEND 
					lcSql = [UPDATE ] + gcS + [.SAL_nom_FORMATII SET id_sectie = ] + lcid_sectie +[,id_transa = ] + lctranse;
					 + [,denumire = '] + lcDenumire + [',inactiv = ] + lcinactiv +[,ordine= ] + lcOrdine + [,id_semnatura = ]+lcSemnaturi +[ where id_formatia = ] + lcId
		
				Case lcActiune = "DELETE"
				
			*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
					lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
			Endcase
		ENDIF 
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_grdhand AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_grdhand"
	*</PropValue>
	
	PROCEDURE make_sql
		
		
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".SAL_NOM_HANDICAP"
			lcamp = "ID_HANDICAP"
			lclook = gcS + ".sal_stat"
			lclookid = "sal_stat.ID_HANDICAP"
		Endif
		If Inlist(lcActiune, "UPDATE",'INSERT')
		
			lcDen = NVL(ALLTRIM(torec.denumire),"")
			lcCHand = Nvl(ALLTRIM(STR(toRec.c_handicap,5,3)),"0")
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.SAL_NOM_HANDICAP (denumire,c_handicap) VALUES ('];
				 + lcDen + [',] + lcCHand + [)]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE ] + gcS + [.SAL_NOM_HANDICAP set denumire= '] + lcDen + ;
				[',c_handicap=] + lcCHand+;
				 [ where id_handicap = ] + lcId
		
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
				*lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_grilaco AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_grilaco"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_zileco"
		*!*		lcamp = "id_caseasig"
		*!*		lclook = gcS + ".sal_stat"
		*!*		lclookid = "id_caseasig"
		Endif
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcliminf = Nvl(Alltrim(Str(toRec.liminf)),'0')
			lclimsup = Nvl(Alltrim(Str(toRec.limsup)),'0')
			lcZile = Nvl(Alltrim(Str(toRec.zile)),'0')
		*!*	modificare	v 2.0.9
			lcDataI = [to_date(']+Dtoc(toRec.datai,1)+[','YYYYMMDD')]
			lcDataS = Iif(Empty(Nvl(toRec.DataS,{})),[NULL],[to_date(']+Dtoc(toRec.DataS,1)+[','YYYYMMDD')])
		*!*	modificare	v 2.0.9	^
		Endif
		
		
		Do Case
		*!*	modificare	v 2.0.9
		*!*		Case lcActiune = "INSERT"
		*!*			lcSql = [INSERT INTO ] + gcS + [.SAL_nom_zileco (liminf, limsup,zile) VALUES (]+;
		*!*				LCliminf + [,]+ lclimsup + [,] + lcCoef+ [)]
		*!*
		*!*		Case lcActiune = "UPDATE"
		*!*			lcSql = [UPDATE ] + gcS + [.SAL_nom_zileco SET liminf = ] + lcliminf +;
		*!*			 [,limsup = ] + lclimsup + [,zile = ] + lcCoef + [ where id_grilaco = ] + lcId
		*!*		Case lcActiune = "DELETE"
		*!*			lcSql = [update ] +gcS +[.sal_nom_zileco set sters=1 where id_grilaco=]+lcid
		*!*	*!*			lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Case lcActiune = "INSERT"
			lcSql = [begin pack_def_salarii.adauga_grila_co(] + lcliminf + [,] + lclimsup + [,] + lcZile + [,] + ;
				lcDataI + [,] + lcDataS + [,?gnIdUtil); end;]
		Case lcActiune = "UPDATE"
			lcSql = [begin pack_def_salarii.modifica_grila_co(] + lcId + [,] + lcliminf + [,] + lclimsup + [,] + ;
				lcZile + [,] + lcDataI + [,] + lcDataS + [,?gnIdUtil); end;]
		Case lcActiune = "DELETE"
			lcSql = [begin pack_def_salarii.sterge_grila_co(] + lcId + [,?gnIdUtil); end;]
		*!*	modificare	v 2.0.9	^
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_grpmun AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_grpmun"
	*</PropValue>
	
	PROCEDURE make_sql
		
		
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_coef_cas"
			lcamp = "ID_CAS"
			lclook = gcS + ".sal_stat"
			lclookid = "sal_stat.ID_CAS"
		Endif
		If Inlist(lcActiune, "UPDATE",'INSERT')
		
			lcDenGrupa = NVL(ALLTRIM(torec.dengrupa),"")
			lcCCas = Nvl(ALLTRIM(STR(toRec.c_cas,5,3)),"0")
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.SAL_coef_cas (dengrupa,c_cas) VALUES ('];
				 + lcDenGrupa + [',] + lcCCas + [)]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE ] + gcS + [.SAL_coef_cas set dengrupa= '] + lcDenGrupa + ;
				[',c_cas=] + lcCCas+;
				 [ where id_cas = ] + lcId
		
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
				*lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_imp AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_imp"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_impozitar"
		*!*		lcamp = "id_caseasig"
		*!*		lclook = gcS + ".sal_stat"
		*!*		lclookid = "id_caseasig"
		Endif
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcinf = NVL(ALLTRIM(STR(torec.inf)),'0')
			lcsup = NVL(ALLTRIM(STR(torec.sup)),'0')
			lcsumainit = NVL(ALLTRIM(STR(torec.sumainit)),'0')
			lccoef = NVL(ALLTRIM(STR(torec.coef,5,3)),'0')
			IF plImpAn
				lcLuna = '0'
				lcAn = NVL(ALLTRIM(STR(gnAN)),'0')
			ELSE 
				lcLuna = NVL(ALLTRIM(STR(gnLuna)),'0')
				lcAn = NVL(ALLTRIM(STR(gnAN)),'0')
			ENDIF 
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.SAL_impozitar (inf, sup,sumainit,coef,an,luna) VALUES (]+;
					LCinf + [,]+ lcsup +[,]+ lcsumainit+[,] + lcCoef+[,]+LcAn+[,]+lcLuna+ [)]
				
			Case lcActiune = "UPDATE"
		*!*	DEBUG 
		*!*	SUSPEND 
				lcSql = [UPDATE ] + gcS + [.SAL_impozitar SET inf = ] + lcinf +;
				 [,sup = ] + lcsup + [,sumainit = ] + lcsumainit + [,coef = ] + lcCoef + [,luna = ] + lcLuna +[,an = ] + lcAn +[ where id_impozitar = ] + lcId
		
			Case lcActiune = "DELETE"
			
				lcSql = [update ] +gcS +[.SAL_impozitar set sters=1 where id_impozitar=]+lcid
		*!*			lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_limded AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Height = 18
		Name = "cus_odata_limded"
		Width = 20
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_deduceri"
			*lcId_calensal = ALLTRIM(STR(gcIdCalensal))
			*lcId_calensal = ALLTRIM(STR(torec.id_calensal))
			*!*		lcamp = "id_caseasig"
			*!*		lclook = gcS + ".sal_stat"
			*!*		lclookid = "id_caseasig"
		Endif
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcnrpers = Nvl(Alltrim(Str(toRec.nrpers)),'0')
			lcsuma = Nvl(Alltrim(Str(toRec.suma)),'0')
			*lcId_calensal = ALLTRIM(STR(gcIdCalensal))
			*lcId_calensal = ALLTRIM(STR(torec.id_calensal))
		Endif
		
		If Used('crsCalendar')
			Select crsCalendar
			If id_calendar = 0 Then
				aMessagebox('Nu se pot introduce deduceri in aceasta luna!',16,"Eroare")
				Return .F.
			Else
				lcId_calensal =Alltrim(Str(id_calendar))
			Endif
		*!*	modificare	v 1.0.15
		*!*		Use In crsCalendar
		Else
			aMessagebox('Nu se pot introduce deduceri in aceasta luna!',16,"Eroare")
			Return .F.
		*!*	modificare	v 1.0.15	^
		Endif
		Do Case
			Case lcActiune = "INSERT"
				lcSql = [INSERT INTO ] + gcS + [.sal_deduceri (nrpers, suma,id_calensal) VALUES (]+;
					lcnrpers + [,]+ lcsuma+ [,]+lcId_calensal +[)]
			Case lcActiune = "UPDATE"
				lcSql = [UPDATE ] + gcS + [.sal_deduceri SET nrpers = ] + lcnrpers +;
					[,suma = ] + lcsuma +[,id_calensal = ]+lcId_calensal +[ where id_deducere = ] + lcId
			Case lcActiune = "DELETE"
				lcSql = [update ] +gcS +[.sal_deduceri set sters=1 where id_deducere=]+lcId
				*!*			lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		*STRTOFILE(LCSQL,'C:\1.TXT')
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_meserii AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_meserii"
	*</PropValue>
	
	PROCEDURE make_sql
		
		
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_mes"
			lcamp = "id_meseria"
			lclook = gcS + ".sal_stat"
			lclookid = "sal_stat.id_meserie"
		Endif
		If Inlist(lcActiune, "UPDATE",'INSERT')
		
			lcMeseria = NVL(ALLTRIM(torec.meserie),"")
			lcCOdMes = NVL(ALLTRIM(torec.cod_meserie),"")
			lcZILESUPL_CO = Nvl(ALLTRIM(STR(toRec.ZILESUPL_CO)),"0")
			lcinactiv = Nvl(ALLTRIM(STR(toRec.inactiv)),"0")
			lcVersiune = ALLTRIM(STR(toRec.versiune_cor))
			*!*	modificare	v 2.0.3
			lcTipModificare = NVL(ALLTRIM(Str(toRec.tip_modificare)),"NULL")
			lcDataConsemnare = NVL(ALLTRIM(DTOC(toRec.dataconsemnare,1)),"")
			*!*	modificare	v 2.0.3	^	
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		*!*	modificare	v 2.0.0
		*!*			lcSql = [INSERT INTO ] + gcS + [.SAL_NOM_MES (meserie,cod_meserie,ZILESUPL_CO,inactiv) VALUES ('];
		*!*			 + lcMeseria+ [','] + lcCOdMes+ [',] + lcZILESUPL_CO+ [,] + lcinactiv + [)]
				lcSql = [begin pack_def_salarii.adauga_meserie('] + lcMeseria + [','] + lcCodMes + [',] + lcVersiune + [,] + ;
					lcZileSupl_CO + [,] + lcInactiv + [,?gnIdUtil); end;]
			Case lcActiune = "UPDATE"
		*!*			lcSql = [UPDATE ] + gcS + [.SAL_NOM_MES SET meserie= '] + lcMeseria+ ;
		*!*			[',cod_meserie='] + lcCOdMes+[',ZILESUPL_CO= ] + lcZILESUPL_CO+ [,inactiv = ]+ lcInactiv+;
		*!*			 [ where id_meseria = ] + lcId
				lcSql = [begin pack_def_salarii.modifica_meserie(] + lcId + [,'] + lcMeseria + [','] + lcCodMes + [',] + lcVersiune + [,] + ;
					lcZileSupl_CO + [,] + lcInactiv + [,] + lcTipModificare + [,to_date('] + lcDataConsemnare + [','YYYYMMDD'),?gnIdUtil); end;]
		*!*	modificare	v 2.0.0	^
			Case lcActiune = "DELETE"
		*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
				*lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_modlic AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_modlic"
	*</PropValue>
	
	PROCEDURE make_sql
		
		
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_modlic"
			lcamp = "id_modlic"
			lclook = gcS + ".sal_stat"
			lclookid = "sal_stat.ID_modlic"
		Endif
		If Inlist(lcActiune, "UPDATE",'INSERT')
		
			lcTipMod = NVL(ALLTRIM(torec.modlic),"")
		
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.SAL_NOM_modlic (modlic) VALUES ('];
				 + lcTipMod + [')]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE ] + gcS + [.SAL_NOM_modlic SET modlic = '] + lcTipMod + ;
				[' where id_modlic = ] + lcId
		
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
				*lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_nom_limbi AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_nom_limbi"
	*</PropValue>
	
	PROCEDURE make_sql
		
		
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_limbi"
			lcamp = "id_limba"
		Endif
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcDenumire = NVL(ALLTRIM(torec.denumire),"")
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.sal_nom_limbi (denumire) VALUES ('];
				 + lcDenumire + [')]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE ] + gcS + [.sal_nom_limbi SET denumire= '] + lcDenumire + ;
				 [' where id_limba = ] + lcId
		
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
				*lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		lcSql = [UPDATE ] + gcS + [.sal_nom_limbi SET sters = 1 where id_limba = ] + lcId
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_nomcm AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_nomcm"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_cm"
			lcamp = "id_cm"
			lclook = gcS + ".SAL_CONCMED"
			lclookid = "id_cm"
		Endif
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcOrdine = NVL(ALLTRIM(STR(torec.ordine)),'0')
			lconc_med = NVL(STRTRAN(ALLTRIM(UPPER(torec.conc_med)),['],['']),"")
			lcCoef = NVL(ALLTRIM(STR(torec.coef,5,3)),'0')
			lcPlbass = NVL(ALLTRIM(STR(torec.plbass)),'0')
			lcPlang = NVL(ALLTRIM(STR(torec.plang)),'0')
			lcCuvechime = NVL(ALLTRIM(STR(torec.cuvechime)),'0')
			lcingrijire = NVL(ALLTRIM(STR(torec.INGRIJIRE)),'0')
			lcCAS = NVL(ALLTRIM(STR(torec.cas)),'0')
			lcimpozit = NVL(ALLTRIM(STR(torec.impozit)),'0')
			lcsanatate = NVL(ALLTRIM(STR(torec.sanatate)),'0')
			lcSomaj = NVL(ALLTRIM(STR(torec.somaj)),'0')
			
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.SAL_nom_cm (ordine, conc_med,coef,plbass,plang,cuvechime,ingrijire,cas,impozit,sanatate,somaj) VALUES (]+;
					lcOrdine + [,']+ lconc_med + [',] + lcCoef +[,]+lcPlbass + [,]+lcPlang + [,]+lcCuvechime+[,]+ lcingrijire+[,]+lcCas+[,]+lcimpozit+[,]+lcsanatate+[,]+lcSomaj+ [)]
				
			Case lcActiune = "UPDATE"
		*!*	DEBUG 
		*!*	SUSPEND 
				lcSql = [UPDATE ] + gcS + [.SAL_nom_cm SET ordine = ] + lcOrdine +;
				 [,conc_med = '] + lconc_med + [',coef = ] + lcCoef + [, plbass = ] +lcPlbass +[,plang = ]+lcPlang+[,cuvechime = ]+lcCuvechime + [,ingrijire=]+lcingrijire + [,cas = ]+lccas+[,impozit = ]+ lcimpozit+[,sanatate = ]+lcsanatate +[,somaj = ]+lcSomaj+;
				  [ where id_cm = ] + lcId
		
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update ] +gcS +[.sal_nom_cm set sters=1 where id_nomore=]+lcid
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_nomore AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_nomore"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nomore"
		*!*		lcamp = "id_caseasig"
		*!*		lclook = gcS + ".sal_stat"
		*!*		lclookid = "id_caseasig"
		Endif
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcOrdine = NVL(ALLTRIM(STR(torec.ordine)),'0')
			lcOre = NVL(STRTRAN(ALLTRIM(UPPER(torec.ore)),['],['']),"")
			lcComentariu = NVL(STRTRAN(ALLTRIM(UPPER(torec.comentariu)),['],['']),"")
			lcinactiv = NVL(ALLTRIM(STR(torec.inactiv)),'0')
			lcTabel = NVL(STRTRAN(ALLTRIM(UPPER(torec.tabel)),['],['']),"")
			lcColoana1 = NVL(STRTRAN(ALLTRIM(UPPER(torec.coloana1)),['],['']),"")
			lcColoana2 = NVL(STRTRAN(ALLTRIM(UPPER(torec.coloana2)),['],['']),"")
			lcTotalzile = NVL(ALLTRIM(STR(torec.totalzile)),'0')
			
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO SAL_nomore (ordine, ore,comentariu, tabel, coloana1, coloana2, totalzile) VALUES (]+;
					lcOrdine + [,']+ lcOre + [','] + lcComentariu + [','] + lcTabel + [','] + lcColoana1 + [','] + lcColoana2 + [',] +  lcTotalzile + [)]
				
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE ] + gcS + [.SAL_nomore SET ordine = ] + lcOrdine +;
				 [,ore = '] + lcOre + [',comentariu = '] + lcComentariu + [', inactiv = ] + lcInactiv + ;
				 [,tabel = '] + lcTabel + [',coloana1 = '] + lcColoana1 + [', coloana2 = '] + lcColoana2 + [', totalzile = ] + lcTotalzile + ;
				 [ where id_nomore = ] + lcId
		
			Case lcActiune = "DELETE"
			
				lcSql = [update ] +gcS +[.sal_nomore set sters=1 where id_nomore=]+lcid
		*!*			lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_nompop AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_nompop"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_popriri"
			lcamp = "ID_popriri"
			lclook = gcS + ".sal_popriri"
			lclookid = "id_poprire"
			
			
		
		
		
		Endif
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcid_popriri = NVL(ALLTRIM(STR(torec.id_popriri)),'0')
			lcDenumire = NVL(STRTRAN(ALLTRIM(UPPER(torec.denumire)),['],['']),"")
			lcPermanent = NVL(ALLTRIM(STR(torec.permanent)),'0')
			lcSumafixa = NVL(ALLTRIM(STR(torec.sumafixa)),'0')
			lcIdCalcDin = NVL(ALLTRIM(STR(torec.id_calcdin)),'0')
			lcInactiv = NVL(ALLTRIM(STR(torec.inactiv)),'0')
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.SAL_NOM_POPRIRI (DENUMIRE, PERMANENT, SUMAFIXA, ID_CALCDIN) VALUES (']+;
					lcDenumire + [',]+  lcPermanent + [,]+lcSumafixa + [,] + lcIdCalcDin+[)]
				
			Case lcActiune = "UPDATE"
		*!*	DEBUG 
		*!*	SUSPEND 
				lcSql = [UPDATE ] + gcS + [.SAL_NOM_popriri SET denumire = '] + lcDenumire+['];
				 + [,permanent = ]+ lcPermanent + [,sumafixa = ]+ lcSumafixa + [,id_calcdin = ] + lcIdCalcDin +[,inactiv = ] + lcinactiv + [ where id_popriri = ] + lcId
		
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_nomtichete AS _cusodatabase OF "..\..\..\roasalspec\comun\clase\_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_nomtichete"
	*</PropValue>
	
	PROCEDURE make_sql
		lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_tichete"
			lcamp = "id"
			lclook = gcS + ".sal_stat"
			lclookid = "sal_stat.id_tichet"
		Endif
		If Inlist(lcActiune, "UPDATE",'INSERT')
		
			lcDenumire = NVL(ALLTRIM(torec.denumire),"")
			lcvaloare = Nvl(ALLTRIM(STR(torec.valoare,6,2)),"0")
			lcinactiv = Nvl(ALLTRIM(STR(toRec.inactiv)),"0")
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO sal_nom_tichete(denumire,valoare,inactiv) VALUES (']+lcDenumire +[',]+lcvaloare +[,]+lcinactiv +[)]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE sal_nom_tichete SET denumire= ']+lcDenumire +[',valoare=]+lcvaloare +[,inactiv = ]+lcinactiv +[ where id = ] + lcId
		
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
				*lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_nomture AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_nomture"
	*</PropValue>
	
	PROCEDURE make_sql
		lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_ture"
		
		Endif
		If Inlist(lcActiune, "UPDATE",'INSERT')
		
			lcDenumire = NVL(ALLTRIM(torec.denumire),"")
			lcTura = NVL(ALLTRIM(torec.tura),"")
			lcOrastart = NVL(ALLTRIM(torec.orastart),"")
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [begin PACK_DEF_SALARII.adauga_tura(']+lcTura  +[',']+lcDenumire+[',']+lcOrastart +['); end;]
		
			Case lcActiune = "UPDATE"
				lcSql = [UPDATE sal_nom_ture SET orastart = ']+lcOrastart +[' where id_tura = ] + lcId
		*!*			lcSql = [UPDATE sal_nom_tichete SET denumire= ']+lcDenumire +[',valoare=]+lcvaloare +[,inactiv = ]+lcinactiv +[ where id = ] + lcId
		
			Case lcActiune = "DELETE"
				lcSql = [UPDATE sal_nom_ture SET sters= 1 where id_tura = ] + lcId
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_resp AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_resp"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
		*!*		lcnom = gcS + ".dev_nom_resp"
			lcamp = "id_sresp"
		*!*		lclook = gcS + ".dev_oper_mecanici"
		*!*		lclookid = "dev_oper_mecanici.id_mecanic"
		Endif
		If Inlist(lcActiune, "UPDATE",'INSERT')
		
			lcNume = Nvl(Alltrim(toRec.nume),"")
			lcpreNume = Nvl(Alltrim(toRec.prenume),"")
			lcFunctia = Nvl(Alltrim(toRec.functia),"")
			lcales_decl = Nvl(Alltrim(Str(toRec.ales_decl)),"")
			lcales_doc = Nvl(Alltrim(Str(toRec.ales_doc)),"")
			lcinactiv = Nvl(Alltrim(Str(toRec.inactiv)),"")
		Endif
		
		
		Do Case
		Case lcActiune = "INSERT"
			lcSql = [begin pack_def_salarii.adauga_responsabil_sal(']+lcNume+[',']+lcpreNume+[',']+lcFunctia+[',] +;
				lcales_decl + [,] + lcales_doc + [,?gnIdUtil); end;]
		*!*			lcSql = [INSERT INTO ] + gcS + [.sal_responsabil (nume,prenume,functia,ales,inactiv) VALUES ('];
		*!*			 + lcNume+ [','] + lcPrenume+ [','] + lcfunctia+ [',] + lcales + [,]+lcinactiv+[)]
		Case lcActiune = "UPDATE"
			lcSql = [begin pack_def_salarii.modifica_responsabil_sal(]+lcId+[,']+lcNume+[',']+lcpreNume+[',']+lcFunctia+[',] +;
				lcales_decl + [,] + lcales_doc + [,] + lcinactiv + [,?gnIdUtil); end;]
		*!*			lcSql = [UPDATE ] + gcS + [.sal_responsabil SET nume = '] + lcNume+ ;
		*!*			[',prenume='] + lcPrenume+[',functia = '] + lcFunctia+ [',ales = ]+ lcAles +[,inactiv = ]+ lcInactiv+;
		*!*			 [ where id_sresp = ] + lcId
		Case lcActiune = "DELETE"
			lcSql = [begin pack_def_salarii.sterge_responsabil_sal(]+lcId+[,?gnIdUtil); end;]
		*!*	*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
		*!*			*lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		*!*			lcSql = [UPDATE ] + gcS + [.sal_responsabil SET STERS = 1  WHERE id_sresp = ] +  lcId
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_sarbatori AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_sarbatori"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
		*!*		lcnom = gcS + ".sal_nom_mes"
		*!*		lcamp = "id_meseria"
		*!*		lclook = gcS + ".sal_stat"
		*!*		lclookid = "sal_stat.id_meserie"
		Endif
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcData = NVL(DTOS(torec.data),"")
			lcSarbatoare = NVL(ALLTRIM(torec.sarbatoare),"")
			
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.SAL_NOM_SARBATORI (data,sarbatoare) VALUES (TO_DATE('];
				 + lcData+ [','YYYYMMDD'),'] + lcSarbatoare+ [')]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE ] + gcS + [.SAL_NOM_SARBATORI SET data= TO_DATE('];
				 + lcData+ [','YYYYMMDD'),sarbatoare='] + lcSarbatoare + [' where id_sarbat = ] + lcId
		
			Case lcActiune = "DELETE"
			
				lcSql = [update ] + gcS + [.sal_nom_sarbatori set sters=1 where id_sarbat =]+lcid
				*lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_tabvechime AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_tabvechime"
	*</PropValue>
	
	PROCEDURE make_sql
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_tab_vechimi"
		*!*		lcamp = "id_caseasig"
		*!*		lclook = gcS + ".sal_stat"
		*!*		lclookid = "id_caseasig"
		Endif
		
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcliminf = NVL(ALLTRIM(STR(torec.lim_inf)),'0')
			lclimsup = NVL(ALLTRIM(STR(torec.lim_sup)),'0')
			lccoef = NVL(ALLTRIM(STR(torec.coef_vechi,5,3)),'0')
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.SAL_tab_vechimi (lim_inf, lim_sup,coef_vechi) VALUES (]+;
					LCliminf + [,]+ lclimsup + [,] + lcCoef+ [)]
				
			Case lcActiune = "UPDATE"
		*!*	DEBUG 
		*!*	SUSPEND 
				lcSql = [UPDATE ] + gcS + [.SAL_tab_vechimi SET lim_inf = ] + lcliminf +;
				 [,lim_sup = ] + lclimsup + [,coef_vechi = ] + lcCoef + [ where id_tabvechime = ] + lcId
		
			Case lcActiune = "DELETE"
			
				lcSql = [update ] +gcS +[.sal_tab_vechimi set sters=1 where id_tabvechime=]+lcid
		*!*			lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_tipctr AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_tipctr"
	*</PropValue>
	
	PROCEDURE make_sql
		
		
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_tipctr"
			lcamp = "id_tipctr"
			lclook = gcS + ".sal_stat"
			lclookid = "sal_stat.ID_TIPCTR"
		Endif
		If Inlist(lcActiune, "UPDATE",'INSERT')
		
			lcTipctr = NVL(ALLTRIM(torec.tip_contract),"")
			lcIdOra = NVL(ALLTRIM(STR(torec.id_ore)),"0")
			lcinactiv = Nvl(ALLTRIM(STR(toRec.inactiv)),"0")
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.SAL_NOM_tipctr (tip_contract,id_ore) VALUES ('];
				 + lcTipctr + [',] + lcIdOra + [)]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE ] + gcS + [.SAL_NOM_tipctr SET tip_contract = '] + lcTipctr + ;
				[',id_ore=] + lcIdOra+ [,inactiv = ]+ lcInactiv+;
				 [ where id_tipctr = ] + lcId
		
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
				*lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_tipintret AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_tipintret"
	*</PropValue>
	
	PROCEDURE make_sql
		
		
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".SAL_NOM_DEDSUPL"
			lcamp = "ID_dedsupl"
			lclook = gcS + ".sal_persintret"
			lclookid = "sal_persintret.ID_deducere"
		Endif
		If Inlist(lcActiune, "UPDATE",'INSERT')
		
			lcCalitate = NVL(ALLTRIM(torec.calitate),"")
			lcCDed = Nvl(ALLTRIM(STR(toRec.c_ded,5,3)),"0")
			lcCoasig = Nvl(ALLTRIM(STR(toRec.coasigurat,5,3)),"0")
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.SAL_NOM_DEDSUPL (calitate,c_ded,coasigurat) VALUES ('];
				 + lcCalitate + [',] + lcCDed + [,]+lcCoasig+[)]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE ] + gcS + [.SAL_NOM_DEDSUPL set calitate= '] + lcCalitate + ;
				[',c_ded=] + lcCDed+ [,coasigurat = ] + lcCoasig +;
				 [ where id_dedsupl = ] + lcId
		
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
				*lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_transe AS _cusodatabase OF "_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_transe"
	*</PropValue>
	
	PROCEDURE make_sql
		
		
		Lparameters toRec,tnId
		
		lcActiune = Alltrim(This.cActiune)
		
		If Inlist(lcActiune, "UPDATE",'INSERT') And Type('toRec') != "O"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE') And Type('tnId') != "N"
			Return .F.
		Endif
		
		If Inlist(lcActiune, "UPDATE",'DELETE')
			lcId = Alltrim(Str(tnId))
			lcnom = gcS + ".sal_nom_transe"
			lcamp = "id_transa"
			lclook = gcS + ".sal_nom_formatii"
			lclookid = "sal_nom_formatii.id_transa"
		Endif
		If Inlist(lcActiune, "UPDATE",'INSERT')
			lcTransa = NVL(ALLTRIM(torec.transa),"")
			lcinactiv = Nvl(ALLTRIM(STR(toRec.inactiv)),"0")
		Endif
		
		
		Do Case
			Case lcActiune = "INSERT"
		
				lcSql = [INSERT INTO ] + gcS + [.SAL_NOM_transe (transa) VALUES ('];
				 + lcTransa+ [')]
		
			Case lcActiune = "UPDATE"
		
				lcSql = [UPDATE ] + gcS + [.SAL_NOM_transe SET transa= '] + lcTransa+ ;
				 [',inactiv = ]+ lcInactiv+;
				 [ where id_transa = ] + lcId
		
			Case lcActiune = "DELETE"
			
		*!*			lcSql = [update nom_sectii set sters=1,id_util=]+ALLTRIM(STR(gcidutil))+[,id_modif=seq_modif_nomen.nextval where id_banca=]+lcid
				*lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
				lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
		
		Endcase
		
		This.csql = lcSql
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cus_odata_zile AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		Name = "cus_odata_zile"
	*</PropValue>

ENDDEFINE

DEFINE CLASS frm_caseasig AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Name = "frm_caseasig"
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 255
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 122
		Lb_titlu_alb_b121.Caption = "Case de asigurări"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Height = 27
		BUT_TERMIN1.Left = 345
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 2, ;
		DeleteMark = .F., ;
		Height = 200, ;
		Left = 18, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		RecordSource = "v_caseasig", ;
		Top = 36, ;
		Width = 336, ;
		Column1.ControlSource = "numecasa", ;
		Column1.Name = "Column1", ;
		Column1.Width = 228, ;
		Column2.ControlSource = "judet", ;
		Column2.Name = "Column2"
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Denumire casa", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Judet", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 285, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 255, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 315, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomgrp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomgrp.ca_baza1.cfiltru=lcFiltru
		ponomgrp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		Do update_judete In updateserver.prg
		pniesire=0
		Select v_caseasig
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Scatter Name loRec Blank
		Do Adauga_Modifica_Inregistrare With "caseasig",loRec,,"INSERT",,"addcasa"
		IF USED('v_jud')
			USE IN v_jud
		ENDIF 
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		Do update_judete In updateserver.prg
		pniesire=0
		Select v_caseasig
		Scatter Name loRec
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Do Adauga_Modifica_Inregistrare With "caseasig",loRec,loRec.id_caseasig,"UPDATE",,"modcasa"
		IF USED('v_jud')
			USE IN v_jud
		ENDIF 
		 
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_caseasig
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "caseasig",loRec.id_caseasig
		This.actualizeaza_grid1()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_caseasig_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_caseasig1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 113
		Name = "frm_caseasig_nou"
		nid = .F.
		orec = .F.
		Width = 313
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 252
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 61
		Lb_titlu_alb_b121.Caption = "Case de asigurări"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 5
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 283
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 3
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		BUT_RENUNT1.Anchor = 9
		BUT_RENUNT1.Left = 254
		BUT_RENUNT1.Name = "BUT_RENUNT1"
		BUT_RENUNT1.TabIndex = 4
		BUT_RENUNT1.Top = 1
	*</PropValue>

	ADD OBJECT 'Cb_tx_simplu1' AS cb_tx_simplu WITH ;
		Left = 12, ;
		Name = "Cb_tx_simplu1", ;
		TabIndex = 2, ;
		Top = 69, ;
		_CBBASE1.ControlSource = "porec.judet", ;
		_CBBASE1.Name = "_CBBASE1", ;
		_CBBASE1.RowSource = "v_jud.judet", ;
		_CBBASE1.RowSourceType = 2, ;
		_LBBASE1.Caption = "Județ", ;
		_LBBASE1.Name = "_LBBASE1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 12, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 41, ;
		TEXT_SIMPLU1.ControlSource = "porec.numecasa", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Casa de asig.", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_caseasig1' AS cus_odata_caseasig WITH ;
		Left = 287, ;
		Name = "Cus_odata_caseasig1", ;
		Top = 30
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		Do Case
		Case Empty(porec.numecasa)
			Messagebox('Nu ati completat numele casei!',0+48,"Atentie")
			This.clb_tx_simplu1.texT_SIMPLU1.SetFocus()
			PLRETURN=.F.
		Otherwise
		
			PLRETURN=This.cus_odata_caseasig1.salvare(This.OREC,This.NID)
		*!*		ENDIF
		Endcase
		Return PLRETURN
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		This.cus_odata_caseasig1.cactiune = tcActiune
		*!*	modificare	v 2.0.12
		If tcActiune = [INSERT]
			Select v_jud
			porec.judet = judet
			porec.id_judet = id_judet
			Thisform.cb_tx_simplu1._cbbase1.Refresh()
		Endif
		*!*	modificare	v 2.0.12	^
	ENDPROC

	PROCEDURE Cb_tx_simplu1._CBBASE1.LostFocus
		porec.id_judet = v_jud.id_judet
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_clasesal AS formtermin OF "_frm_base.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmd_executa1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 272
		Name = "frm_clasesal"
		Width = 289
		_SHAPE1.Anchor = 11
		_SHAPE1.Name = "_SHAPE1"
		_SHAPE2.Anchor = 9
		_SHAPE2.Height = 29
		_SHAPE2.Left = 180
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		_SHAPE2.Width = 110
		LB_TITLU_ALB_B121.Caption = "Clase de salarizare"
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 258
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 3, ;
		DeleteMark = .F., ;
		Height = 200, ;
		Left = 22, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "v_clasesal", ;
		Top = 36, ;
		Width = 246, ;
		Column1.ControlSource = "cod", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 92, ;
		Column2.ControlSource = "tarifar", ;
		Column2.InputMask = (get_mask(14,Gnpa)), ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 80, ;
		Column3.ControlSource = "inactiv", ;
		Column3.CurrentControl = "Check1", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Sparse = .F., ;
		Column3.Width = 39
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Tarifar", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 17, ;
		Name = "Check1", ;
		Top = 47, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Inactiv", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 201, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 172, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 229, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Cmd_executa1' AS cmd_executa WITH ;
		Anchor = 12, ;
		AutoSize = .T., ;
		Caption = "Aplică grila de salarizare", ;
		Left = 105, ;
		Name = "Cmd_executa1", ;
		Top = 240
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=poclasesal.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		poclasesal.ca_baza1.cfiltru=lcFiltru
		poclasesal.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_clasesal
		Scatter Name loRec Blank
		*!*	DEBUG
		*!*	SUSPEND 
		Do Adauga_Modifica_Inregistrare With "clasesal",loRec,,"INSERT",,"addcs"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_executa
		IF MESSAGEBOX('Sunteti sigur ca doriti sa aplicati grilele de salarizare?',4+32,'') = 6
			lcSql = [begin PACK_SALARII.aplica_grila_sal('] + gcS +['); end;]&&[select * from ] + gcS + [.calendar]
			lcCursor = [crsRezultate]
			lnSucces = goExecutor.oExecute(lcSql)
		
			IF lnSucces < 0
				MESSAGEBOX(goExecutor.cEroare,0+16,"Eroare")
			ENDIF
			
		ENDIF 
		
		MESSAGEBOX('Au fost aplicate grilele de salarizare',0+48,'')
		
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_clasesal
		Scatter Name loRec
		Do Adauga_Modifica_Inregistrare With "clasesal",loRec,loRec.id_clasasal,"UPDATE",,"modcs"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_clasesal
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "clasesal",loRec.id_clasasal
		
		this.actualizeaza_grid1()
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_clasesal_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_clasesal1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 134
		Name = "frm_clasesal_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_SHAPE1.Anchor = 11
		_SHAPE1.Name = "_SHAPE1"
		_SHAPE2.Anchor = 9
		_SHAPE2.Height = 29
		_SHAPE2.Left = 314
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		_SHAPE2.Width = 62
		LB_TITLU_ALB_B121.Caption = "Clasă salarizare"
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		LB_TITLU_ALB_B121.TabIndex = 6
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 346
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 4
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		BUT_RENUNT1.Anchor = 9
		BUT_RENUNT1.Left = 316
		BUT_RENUNT1.Name = "BUT_RENUNT1"
		BUT_RENUNT1.TabIndex = 5
		BUT_RENUNT1.Top = 1
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Inactiv", ;
		ControlSource = "porec.inactiv", ;
		Height = 17, ;
		Left = 39, ;
		Name = "_checkbox1", ;
		TabIndex = 3, ;
		Top = 104, ;
		Width = 52
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 36, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 41, ;
		TEXT_SIMPLU1.ControlSource = "porec.cod", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Cod", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 36, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 69, ;
		TEXT_SIMPLU1.ControlSource = "porec.tarifar", ;
		TEXT_SIMPLU1.InputMask = (get_mask(14,Gnpa)), ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Tarifar", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_clasesal1' AS cus_odata_clasesal WITH ;
		Left = 336, ;
		Name = "Cus_odata_clasesal1", ;
		Top = 84
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		LOCAL PLRETURN
		
		lccontrol = UPPER(this.ActiveControl.BaseClass )
		IF   INLIST(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.Activecontrol.controlsource
			&lcval=thisform.ActiveControl.value
		ENDIF 	
		
		
		Do Case
		Case Empty(porec.tarifar)
			Messagebox('Nu ati completat tarifarul!',0+48,"Atentie")
			this.clb_tx_simplu2.text_simplu1.SetFocus()
			
			plreturn=.F.
		
		OTHERWISE
					PLRETURN=This.cus_odata_clasesal1.salvare(This.OREC,This.NID)
					 
		
		ENDCASE 
		
		Return PLRETURN
		
		
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_clasesal1.cactiune = tcActiune
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_conf_popr AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column6.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column6.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column7.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column8.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column8.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column9.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column9.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column10.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column10.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column11.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column11.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmd_executa1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 443
		Name = "frm_conf_popr"
		Width = 561
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 576
		_shape2.Height = 29
		_shape2.Left = 437
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 123
		Lb_titlu_alb_b121.Caption = "Configurare popriri"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Height = 27
		BUT_TERMIN1.Left = 528
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		ColumnCount = 11, ;
		DeleteMark = .F., ;
		Height = 367, ;
		Left = 10, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "v_nompopr", ;
		Top = 36, ;
		Width = 540, ;
		Column1.ControlSource = "nume_popr", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 123, ;
		Column2.ColumnOrder = 3, ;
		Column2.ControlSource = "permanent", ;
		Column2.CurrentControl = "Check1", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Sparse = .F., ;
		Column2.Width = 65, ;
		Column3.ColumnOrder = 4, ;
		Column3.ControlSource = "sumafixa", ;
		Column3.CurrentControl = "Check1", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Sparse = .F., ;
		Column3.Width = 35, ;
		Column4.ColumnOrder = 5, ;
		Column4.ControlSource = "nume_col", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 70, ;
		Column5.ColumnOrder = 6, ;
		Column5.ControlSource = "neimpozab", ;
		Column5.CurrentControl = "Check1", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Sparse = .F., ;
		Column5.Width = 43, ;
		Column6.ColumnOrder = 7, ;
		Column6.ControlSource = "inactiv", ;
		Column6.CurrentControl = "Check1", ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .T., ;
		Column6.Sparse = .F., ;
		Column6.Width = 38, ;
		Column7.ColumnOrder = 2, ;
		Column7.ControlSource = "beneficiar", ;
		Column7.Name = "Column7", ;
		Column7.ReadOnly = .T., ;
		Column7.Width = 129, ;
		Column8.ControlSource = "scd", ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .T., ;
		Column8.Width = 60, ;
		Column9.ControlSource = "ascd", ;
		Column9.Name = "Column9", ;
		Column9.ReadOnly = .T., ;
		Column9.Width = 64, ;
		Column10.ControlSource = "ascc", ;
		Column10.Name = "Column10", ;
		Column10.ReadOnly = .T., ;
		Column10.Width = 63, ;
		Column11.ControlSource = "ascc", ;
		Column11.Name = "Column11", ;
		Column11.ReadOnly = .T., ;
		Column11.Width = 67
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Caption = "Nume poprire", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column10.Header1' AS header WITH ;
		Caption = "Cont credit", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column10.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column11.Header1' AS header WITH ;
		Caption = "Acont credit", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column11.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 28, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 107, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Caption = "Permanent", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 34, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 83, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Caption = "Suma", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column4.Header1' AS header WITH ;
		Caption = "Se calc. din:", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column5.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 11, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 71, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column5.Header1' AS header WITH ;
		Caption = "Impozit", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column5.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column6.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 15, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 83, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column6.Header1' AS header WITH ;
		Caption = "Inactiv", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column6.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column7.Header1' AS header WITH ;
		Caption = "Beneficiar", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column7.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column8.Header1' AS header WITH ;
		Caption = "Cont debit", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column8.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column9.Header1' AS header WITH ;
		Caption = "Acont debit", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column9.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Height = 27, ;
		Left = 469, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Height = 27, ;
		Left = 439, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Height = 27, ;
		Left = 498, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Cmd_executa1' AS cmd_executa WITH ;
		Caption = "\<Nomenclator beneficiari deduceri", ;
		Height = 27, ;
		Left = 324, ;
		Name = "Cmd_executa1", ;
		Top = 408, ;
		Width = 228
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		
		LOCAL lcFiltru
		
		lcFiltru=pcFiltru
		
		*!*	IF EMPTY(lcFiltru)
		*!*		lcFiltru=pocentr.ca_baza1.cfiltru
		*!*	ENDIF
		save_grid_tag(thisform._grdrow1 )
		
		DO update_nom_popr IN update_salarii.prg
		restore_grid_tag(thisform._grdrow1)
		thisform._grdrow1.SetFocus 
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire,pnNr,pcNumeTata
		
		DO update_colcalc IN update_salarii.prg
		pniesire=0
		
		Select v_nompopr
		Scatter Name loRec Blank
		
		Do Adauga_Modifica_Inregistrare With "conf_popr",loRec,,"INSERT",,"apop"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_executa
		DO UPDATE_BENPOP IN update_salarii.prg
		SELECT v_benpop
		
		ofrm_ben = CREATEOBJECT('frm_benefpop')
		ofrm_ben.show(1)
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire,pcNumeTata
		
		DO update_colcalc IN update_salarii.prg
		
		pniesire=0
		Select v_nompopr
		Scatter Name loRec 
		
		Do Adauga_Modifica_Inregistrare With "conf_popr",loRec,loRec.id_popriri,"UPDATE",,"mpop"
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_nompopr
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "conf_popr",loRec.id_popriri
		this.actualizeaza_grid1()
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_conf_popr_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Cus_odata_conf_popr1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Check2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Check3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Check4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cmd_executa1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 401
		Name = "frm_conf_popr_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Name = "_shape1"
		_shape2.Name = "_shape2"
		Lb_titlu_alb_b121.Caption = "-"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 14
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 8
		Gridsort1.Name = "Gridsort1"
		BUT_RENUNT1.Name = "BUT_RENUNT1"
		BUT_RENUNT1.TabIndex = 13
	*</PropValue>

	ADD OBJECT 'Cb_tx_simplu1' AS cb_tx_simplu WITH ;
		Left = 50, ;
		Name = "Cb_tx_simplu1", ;
		TabIndex = 3, ;
		Top = 135, ;
		_CBBASE1.ControlSource = "porec.nume_col", ;
		_CBBASE1.Height = 23, ;
		_CBBASE1.Left = 108, ;
		_CBBASE1.Name = "_CBBASE1", ;
		_CBBASE1.RowSource = "v_colcalc.explicatie", ;
		_CBBASE1.RowSourceType = 2, ;
		_CBBASE1.Top = 3, ;
		_CBBASE1.Width = 179, ;
		_LBBASE1.Caption = "Se calculeaza din:", ;
		_LBBASE1.Name = "_LBBASE1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Check1' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Suma fixa", ;
		ControlSource = "porec.sumafixa", ;
		Height = 17, ;
		Left = 50, ;
		Name = "Check1", ;
		TabIndex = 9, ;
		Top = 111, ;
		Width = 72
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'Check2' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Poprire permanenta", ;
		ControlSource = "porec.permanent", ;
		Height = 17, ;
		Left = 50, ;
		Name = "Check2", ;
		TabIndex = 10, ;
		Top = 171, ;
		Width = 128
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'Check3' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Neimpozabil", ;
		ControlSource = "porec.neimpozab", ;
		Height = 17, ;
		Left = 50, ;
		Name = "Check3", ;
		TabIndex = 11, ;
		Top = 195, ;
		Width = 87
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'Check4' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Inactiv", ;
		ControlSource = "porec.inactiv", ;
		Height = 17, ;
		Left = 50, ;
		Name = "Check4", ;
		TabIndex = 12, ;
		Top = 219, ;
		Width = 52
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 50, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 47, ;
		TEXT_SIMPLU1.ControlSource = "porec.nume_popr", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		Lb_simplu1.Caption = "Poprire", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 50, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 77, ;
		Text_simplu1.ControlSource = "porec.beneficiar", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Beneficiar", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu3' AS clb_tx_simplu WITH ;
		Left = 50, ;
		Name = "Clb_tx_simplu3", ;
		TabIndex = 4, ;
		Top = 240, ;
		TEXT_SIMPLU1.ControlSource = "porec.scd", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		Lb_simplu1.Caption = "Cont debit", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu4' AS clb_tx_simplu WITH ;
		Left = 50, ;
		Name = "Clb_tx_simplu4", ;
		TabIndex = 5, ;
		Top = 271, ;
		TEXT_SIMPLU1.ControlSource = "porec.ascd", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		Lb_simplu1.Caption = "Analitic debit", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu5' AS clb_tx_simplu WITH ;
		Left = 50, ;
		Name = "Clb_tx_simplu5", ;
		TabIndex = 6, ;
		Top = 302, ;
		TEXT_SIMPLU1.ControlSource = "porec.scc", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		Lb_simplu1.Caption = "Cont credit", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu6' AS clb_tx_simplu WITH ;
		Left = 50, ;
		Name = "Clb_tx_simplu6", ;
		TabIndex = 7, ;
		Top = 333, ;
		TEXT_SIMPLU1.ControlSource = "porec.ascc", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		Lb_simplu1.Caption = "Analitic credit", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cmd_executa1' AS cmd_executa WITH ;
		AutoSize = .T., ;
		Caption = "Aleg partenerii pe sectii", ;
		Left = 110, ;
		Name = "Cmd_executa1", ;
		Top = 367
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Cus_odata_conf_popr1' AS cus_odata_conf_popr WITH ;
		Left = 6, ;
		Name = "Cus_odata_conf_popr1", ;
		Top = 163
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE Activate
		IF thisform.check1.Value = 1
			thisform.cb_tx_simplu1.Enabled = .f.
			
		ELSE 	
			thisform.cb_tx_simplu1.Enabled = .t.
		ENDIF 
	ENDPROC

	PROCEDURE inainte_de_do_termin
		LOCAL PLRETURN
		
		lccontrol = UPPER(this.ActiveControl.BaseClass )
		IF INLIST(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.Activecontrol.controlsource
			&lcval=thisform.ActiveControl.value
		ENDIF 	
		PLRETURN=this.cus_odata_conf_popr1.salvare(This.OREC,This.NID)
		
		Return PLRETURN
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		
		this.cus_odata_conf_popr1.cactiune = tcActiune
		
		
	ENDPROC

	PROCEDURE Cb_tx_simplu1._CBBASE1.LostFocus
		porec.id_calcdin =  v_colcalc.id_coloana
	ENDPROC

	PROCEDURE Check1.InteractiveChange
		IF this.Value = 1
			thisform.cb_tx_simplu1.Enabled = .f.
			porec.id_calcdin = 0
		
			
		ELSE 	
			thisform.cb_tx_simplu1.Enabled = .t.
		ENDIF 
	ENDPROC

	PROCEDURE Clb_tx_simplu2.Text_simplu1.GotFocus
			pcselect = [select * from sal_vbenef_pop ]
			pcfiltru = [1=2]
			pcschema = []
			pcorder = [beneficiar]
			pccoloane = [beneficiar]
			pcTitlu = [Beneficiar]
			pcTitluColoane = [Beneficiar]
			locauta = cauta_alfa(pcselect,pcfiltru,pcschema,pcorder,pccoloane,pcTitlu,pcTitluColoane)&&30iul2007
			
		*!*	Parameters tcselect,tcfiltru,tcschema,tcorder,tccoloana,tcTitlu,tcTitluColoana,tcNume_Proc,tl_AllInList,tcFiltruOriginal
			
			IF buton # 2
				porec.beneficiar = locauta.beneficiar
				porec.id_beneficiar = locauta.id_beneficiar 
				this.Refresh 
			ENDIF 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_conf_spor AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.cNume_tip_spor.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.cNume_tip_spor.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 420
		Name = "frm_conf_spor"
		Width = 588
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 588
		_shape2.Height = 29
		_shape2.Left = 461
		_shape2.Name = "_shape2"
		_shape2.Top = -1
		_shape2.Width = 128
		Lb_titlu_alb_b121.Caption = "Definire sporuri"
		Lb_titlu_alb_b121.Height = 21
		Lb_titlu_alb_b121.Left = 6
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.Top = 6
		Lb_titlu_alb_b121.Width = 109
		BUT_TERMIN1.Left = 557
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 0
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		ColumnCount = 6, ;
		DeleteMark = .F., ;
		Height = 372, ;
		Left = 12, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "v_nomspor", ;
		Top = 36, ;
		Width = 564, ;
		Column1.ControlSource = "nume_spor", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 141, ;
		Column2.ControlSource = "sumafixa", ;
		Column2.CurrentControl = "Check1", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Sparse = .F., ;
		Column2.Width = 37, ;
		Column3.ControlSource = "nume_col", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 94, ;
		Column4.ControlSource = "permanent", ;
		Column4.CurrentControl = "Check1", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Sparse = .F., ;
		Column4.Width = 65, ;
		Column5.ControlSource = "somaj", ;
		Column5.CurrentControl = "Check1", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Sparse = .F., ;
		Column5.Width = 40, ;
		Column6.ControlSource = "nume_tip_spor", ;
		Column6.Name = "cNume_tip_spor", ;
		Column6.ReadOnly = .T., ;
		Column6.Width = 149
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.cNume_tip_spor.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Tip spor", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.cNume_tip_spor.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nume spor", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 9, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 83, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Caption = "Suma", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Caption = "Se calc din:", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column4.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 27, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 71, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column4.Header1' AS header WITH ;
		Caption = "Permanent", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column5.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 21, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 71, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column5.Header1' AS header WITH ;
		Caption = "Somaj", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column5.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Height = 27, ;
		Left = 495, ;
		Name = "But_modifica1", ;
		Top = 0
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Height = 27, ;
		Left = 464, ;
		Name = "But_nou1", ;
		Top = 0
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Height = 27, ;
		Left = 526, ;
		Name = "But_sterge1", ;
		Top = 0
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		
		LOCAL lcFiltru
		
		lcFiltru=pcFiltru
		
		*!*	IF EMPTY(lcFiltru)
		*!*		lcFiltru=pocentr.ca_baza1.cfiltru
		*!*	ENDIF
		save_grid_tag(thisform._grdrow1 )
		
		DO update_nom_sporuri IN update_salarii.prg
		restore_grid_tag(thisform._grdrow1)
		thisform._grdrow1.SetFocus 
		
	ENDPROC

	PROCEDURE do_adauga
		PRIVATE pniesire,pnNr,pcNumeTata
		
		DO update_colcalc IN update_salarii.prg
		pniesire=0
		
		SELECT v_nomspor
		SCATTER NAME loRec BLANK
		
		DO Adauga_Modifica_Inregistrare WITH "conf_spor",loRec,,"INSERT",,"aspor"
		IF pniesire=1
			THIS.actualizeaza_grid1()
		
		
		
		ENDIF
		
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire,pcNumeTata
		
		DO update_colcalc IN update_salarii.prg
		
		pniesire=0
		Select v_nomspor
		Scatter Name loRec 
		
		Do Adauga_Modifica_Inregistrare With "conf_spor",loRec,loRec.id_sporuri,"UPDATE",,"mspor"
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_nomspor
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "conf_spor",loRec.id_sporuri
		this.actualizeaza_grid1()
		
	ENDPROC

	PROCEDURE Init
		DoDefault()
		Thisform._grdrow1.cNume_tip_spor.DynamicBackColor = [IIF(EMPTY(NVL(nume_tip_spor,'')),RGB(255,0,0),IIF(NVL(data_inactiv,DATE(2099,12,31))<DATE(gnAn,gnLuna,1),RGB(128,128,128),RGB(255,255,255)))]
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_conf_spor_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Check2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Check3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_conf_spor1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Check4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Ct_clb_tip_spor" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: do_cauta_tip_spor
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 230
		Name = "frm_conf_spor_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Name = "_shape1"
		_shape2.Height = 29
		_shape2.Left = 309
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 68
		Lb_titlu_alb_b121.Caption = "-"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 10
		BUT_TERMIN1.Left = 344
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 8
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		BUT_RENUNT1.Left = 312
		BUT_RENUNT1.Name = "BUT_RENUNT1"
		BUT_RENUNT1.TabIndex = 9
		BUT_RENUNT1.Top = 1
	*</PropValue>

	ADD OBJECT 'Cb_tx_simplu1' AS cb_tx_simplu WITH ;
		Height = 29, ;
		Left = 12, ;
		Name = "Cb_tx_simplu1", ;
		TabIndex = 4, ;
		Top = 119, ;
		Width = 312, ;
		_CBBASE1.ControlSource = "porec.nume_col", ;
		_CBBASE1.Height = 23, ;
		_CBBASE1.Left = 124, ;
		_CBBASE1.Name = "_CBBASE1", ;
		_CBBASE1.RowSource = "v_colcalc.explicatie", ;
		_CBBASE1.RowSourceType = 2, ;
		_CBBASE1.Top = 3, ;
		_LBBASE1.Caption = "Se calculeaza din:", ;
		_LBBASE1.Name = "_LBBASE1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Check1' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Suma fixa", ;
		ControlSource = "porec.sumafixa", ;
		Height = 17, ;
		Left = 14, ;
		Name = "Check1", ;
		TabIndex = 3, ;
		Top = 99, ;
		Width = 72
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'Check2' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Spor permanent", ;
		ControlSource = "porec.permanent", ;
		Height = 17, ;
		Left = 14, ;
		Name = "Check2", ;
		TabIndex = 5, ;
		Top = 151, ;
		Width = 107
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'Check3' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Participa la somaj", ;
		ControlSource = "porec.somaj", ;
		Height = 17, ;
		Left = 14, ;
		Name = "Check3", ;
		TabIndex = 6, ;
		Top = 172, ;
		Width = 117
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'Check4' AS checkbox WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Inactiv", ;
		ControlSource = "porec.inactiv", ;
		Height = 17, ;
		Left = 14, ;
		Name = "Check4", ;
		TabIndex = 7, ;
		Top = 193, ;
		Width = 52
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 12, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 2, ;
		Top = 65, ;
		Width = 312, ;
		TEXT_SIMPLU1.ControlSource = "porec.nume_spor", ;
		TEXT_SIMPLU1.Left = 124, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		Lb_simplu1.Caption = "Spor", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Ct_clb_tip_spor' AS ct_clb_cautare_var WITH ;
		cconditie = EMPTY(NVL(porec.id_tip_spor,0)), ;
		cprocedura = Thisform.do_cauta_tip_spor, ;
		cvar_afisata = porec.nume_tip_spor, ;
		Left = 11, ;
		Name = "Ct_clb_tip_spor", ;
		TabIndex = 1, ;
		Top = 36, ;
		shape_cautare.Name = "shape_cautare", ;
		img_cautare.Name = "img_cautare", ;
		lb_cautare.Caption = "Tip spor", ;
		lb_cautare.Name = "lb_cautare", ;
		tx_cautare.Name = "tx_cautare"
		*< END OBJECT: ClassLib="caut_ora.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_conf_spor1' AS cus_odata_conf_spor WITH ;
		Left = 336, ;
		Name = "Cus_odata_conf_spor1", ;
		Top = 180
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE Activate
		IF thisform.check1.Value = 1
			thisform.cb_tx_simplu1.Enabled = .f.
		
			
		ELSE 	
			thisform.cb_tx_simplu1.Enabled = .t.
		
		ENDIF 
	ENDPROC

	PROCEDURE do_cauta_tip_spor
		Local loTipSpor
		loTipSpor = caut_tip_spor()
		If gnButon<>2
			If !Empty(Nvl(loTipSpor.nume_tip_spor,[]))
				poRec.nume_tip_spor = loTipSpor.nume_tip_spor
				poRec.id_tip_spor = loTipSpor.id_tip_spor
				If Empty(Nvl(poRec.nume_spor,[]))
					poRec.nume_spor = Upper(loTipSpor.nume_tip_spor)
					Thisform.clb_tx_simplu1.text_simplu1.Refresh()
				Endif
			Endif
		Endif
		
	ENDPROC

	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		PLRETURN = .F.
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		Do Case
			Case Empty(Nvl(poRec.id_tip_spor,0))
				amessagebox("Nu ati ales tipul sporului!",48,"Atentie")
				Thisform.ct_clb_tip_spor.tx_cautare.SetFocus()
			Case Empty(poRec.nume_spor)
				amessagebox("Nu ati completat numele sporului!",48,"Atentie")
				Thisform.clb_tx_simplu1.text_simplu1.SetFocus()
			Otherwise
				PLRETURN=This.cus_odata_conf_spor1.salvare(This.OREC,This.NID)
		Endcase
		
		Return PLRETURN
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		
		this.cus_odata_conf_spor1.cactiune = tcActiune
		
		
	ENDPROC

	PROCEDURE Cb_tx_simplu1._CBBASE1.LostFocus
		porec.id_calcdin =  v_colcalc.id_coloana
	ENDPROC

	PROCEDURE Check1.InteractiveChange
		IF this.Value = 1
			thisform.cb_tx_simplu1.Enabled = .f.
			porec.id_calcdin = 0
		
			
		ELSE 	
			thisform.cb_tx_simplu1.Enabled = .t.
		ENDIF 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_curscal AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 308
		Name = "frm_curscal"
		Width = 235
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 120
		_shape2.Name = "_shape2"
		_shape2.Top = -1
		_shape2.Width = 116
		Lb_titlu_alb_b121.Caption = "Cursuri"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 204
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 0
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 2, ;
		DeleteMark = .F., ;
		Height = 264, ;
		Left = 14, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		RecordSource = "v_curscal", ;
		Top = 39, ;
		Width = 207, ;
		Column1.ControlSource = "denumire", ;
		Column1.Name = "Column1", ;
		Column1.Width = 131, ;
		Column2.ControlSource = "inactiv", ;
		Column2.CurrentControl = "Check1", ;
		Column2.Name = "Column2", ;
		Column2.Sparse = .F., ;
		Column2.Width = 40
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Denumire", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 19, ;
		Name = "Check1", ;
		Top = 56, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Inactiv", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 148, ;
		Name = "But_modifica1", ;
		Top = 0
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 119, ;
		Name = "But_nou1", ;
		Top = 0
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 177, ;
		Name = "But_sterge1", ;
		Top = 0
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomgrp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomgrp.ca_baza1.cfiltru=lcFiltru
		ponomgrp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_curscal
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Scatter Name loRec Blank
		Do Adauga_Modifica_Inregistrare With "curscal",loRec,,"INSERT",,"addcurs"
		 
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_curscal
		Scatter Name loRec
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Do Adauga_Modifica_Inregistrare With "curscal",loRec,loRec.id_c,"UPDATE",,"modcurs"
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_curscal
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "curscal",loRec.id_c
		This.actualizeaza_grid1()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_curscal_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Cus_odata_curscal1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 106
		Name = "frm_curscal_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 314
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 62
		Lb_titlu_alb_b121.Caption = "Curs calificare"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 5
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 345
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 3
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Anchor = 9
		But_renunt1.Left = 316
		But_renunt1.Name = "But_renunt1"
		But_renunt1.TabIndex = 4
		But_renunt1.Top = 1
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Inactiv", ;
		ControlSource = "porec.inactiv", ;
		Left = 48, ;
		Name = "_checkbox1", ;
		TabIndex = 2, ;
		Top = 77
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 36, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 41, ;
		Text_simplu1.ControlSource = "porec.denumire", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Denumire curs:", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_curscal1' AS cus_odata_curscal WITH ;
		Left = 324, ;
		Name = "Cus_odata_curscal1", ;
		Top = 48
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		*!*	Do Case
		*!*	Case Empty(porec.tip_contract)
		*!*		Messagebox('Nu ati completat formatia!',0+48,"Atentie")
		*!*		This.clb_tx_simplu1._cbbase1.SetFocus()
		*!*		PLRETURN=.F.
		*!*	Otherwise
		
			PLRETURN=this.cus_odata_curscal1.salvare(This.OREC,This.NID)
			 
			
		*!*		ENDIF
		*!*	Endcase
		Return PLRETURN
		
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_curscal1.cactiune = tcActiune
		 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_formatii AS _frmbase OF "_frm_base.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 434
		Name = "frm_formatii"
		Width = 652
		_shape1.Anchor = 11
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 732
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 516
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 131
		Lb_titlu_alb_b121.Caption = "Formații"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 615
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 5, ;
		DeleteMark = .F., ;
		Height = 372, ;
		Left = 12, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		Top = 48, ;
		Width = 624, ;
		Column1.ControlSource = "denumire", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 153, ;
		Column2.ControlSource = "sectiE", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 116, ;
		Column3.ControlSource = "transa", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 87, ;
		Column4.ControlSource = "ordine", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 41, ;
		Column5.ControlSource = "semnatura", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 193
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Formatia", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sectia", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Transa", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column4.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ordine", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column5.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Semnatura", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column5.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 551, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 519, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 583, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=poformatii.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		poformatii.ca_baza1.cfiltru=lcFiltru
		poformatii.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
			thisform._grdrow1.SetFocus()
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		Do update_sectie In update_roadef_sal.prg
		Do update_transe In update_roadef_sal.prg
		DO update_semnaturi In update_roadef_sal.prg
		pniesire=0
		Select v_formatii
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Scatter Name loRec Blank
		Do Adauga_Modifica_Inregistrare With "FORMATII",loRec,,"INSERT",,"addform"
		IF USED('v_sectie')
			USE IN v_sectie
		ENDIF 
		IF USED('v_transe')
			USE IN v_transe
		ENDIF 
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		Do update_sectie In update_roadef_sal.prg
		Do update_transe In update_roadef_sal.prg
		DO update_semnaturi In update_roadef_sal.prg
		
		pniesire=0
		Select v_formatii
		Scatter Name loRec
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		IF gnSAL_SPECIAL = 4 AND gnIdProgram = 9
			Do Adauga_Modifica_Inregistrare With "formatii",loRec,loRec.id_locmunca,"UPDATE",,"modform"
		
		ELSE 
			Do Adauga_Modifica_Inregistrare With "FORMATII",loRec,loRec.id_FORMATIA,"UPDATE",,"modform"
		ENDIF 
		IF USED('v_sectie')
			USE IN v_sectie
		ENDIF 
		IF USED('v_transe')
			USE IN v_transe
		ENDIF 
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_formatii
		SCATTER NAME lorec
		IF gnSAL_SPECIAL = 4 AND gnIdProgram = 9
			Do STERGE_INREGISTRARE With "formatii",loRec.id_locmunca
			ELSE 
			Do STERGE_INREGISTRARE With "formatii",loRec.id_formatia
		ENDIF 
		This.actualizeaza_grid1()
	ENDPROC

	PROCEDURE Init
		IF gnSAL_SPECIAL = 4 AND gnIdProgram = 9
			thisform.lb_titlu_alb_b121.Caption = 'Locuri de munca'
			thisform._grdrow1.column1.header1.Caption='Loc de munca'
			thisform._grdrow1.column2.header1.Caption='Partener'
			thisform._grdrow1.column3.header1.Caption='Activitate'
		ENDIF 
		DODEFAULT()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_formatii_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Cb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_formatii1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tx_simplu3" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 222
		Name = "frm_formatii_nou"
		nid = .F.
		orec = .F.
		Width = 565
		_shape1.Anchor = 11
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 624
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 504
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 63
		Lb_titlu_alb_b121.Caption = "Adăugare / modificare formație"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 9
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 534
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 6
		BUT_TERMIN1.Top = 0
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Anchor = 9
		But_renunt1.Left = 504
		But_renunt1.Name = "But_renunt1"
		But_renunt1.TabIndex = 7
		But_renunt1.Top = 0
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Inactiv", ;
		ControlSource = "porec.inactiv", ;
		Left = 30, ;
		Name = "_checkbox1", ;
		TabIndex = 8, ;
		Top = 197
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Cb_tx_simplu1' AS cb_tx_simplu WITH ;
		Height = 29, ;
		Left = 24, ;
		Name = "Cb_tx_simplu1", ;
		TabIndex = 2, ;
		Top = 73, ;
		Width = 530, ;
		_cbbase1.ControlSource = "porec.sectie", ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "v_sectie.sectie", ;
		_cbbase1.RowSourceType = 2, ;
		_cbbase1.Width = 424, ;
		_lbbase1.Caption = "Secția", ;
		_lbbase1.Name = "_lbbase1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cb_tx_simplu2' AS cb_tx_simplu WITH ;
		Height = 29, ;
		Left = 24, ;
		Name = "Cb_tx_simplu2", ;
		TabIndex = 3, ;
		Top = 101, ;
		Width = 530, ;
		_cbbase1.ControlSource = "porec.transa", ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "v_transe.transa", ;
		_cbbase1.RowSourceType = 2, ;
		_cbbase1.Width = 424, ;
		_lbbase1.Caption = "Tranșa", ;
		_lbbase1.Name = "_lbbase1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cb_tx_simplu3' AS cb_tx_simplu WITH ;
		Height = 29, ;
		Left = 24, ;
		Name = "Cb_tx_simplu3", ;
		TabIndex = 4, ;
		Top = 131, ;
		Width = 530, ;
		_cbbase1.ControlSource = "porec.semnatura", ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "v_semnaturi.semnatura", ;
		_cbbase1.RowSourceType = 2, ;
		_cbbase1.Width = 424, ;
		_lbbase1.Caption = "Semnatura", ;
		_lbbase1.Name = "_lbbase1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Height = 29, ;
		Left = 24, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 45, ;
		Width = 530, ;
		TEXT_SIMPLU1.ControlSource = "porec.denumire", ;
		TEXT_SIMPLU1.Height = 23, ;
		TEXT_SIMPLU1.Left = 101, ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		TEXT_SIMPLU1.Top = 3, ;
		TEXT_SIMPLU1.Width = 424, ;
		LB_SIMPLU1.Caption = "Formația", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 24, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 5, ;
		Top = 161, ;
		TEXT_SIMPLU1.ControlSource = "porec.ordine", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Ordine", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_formatii1' AS cus_odata_formatii WITH ;
		Left = 161, ;
		Name = "Cus_odata_formatii1", ;
		Top = 202
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		Do Case
		Case Empty(porec.denumire)
			Messagebox('Nu ati completat formatia!',0+48,"Atentie")
			This.clb_tx_simplu1._cbbase1.SetFocus()
			PLRETURN=.F.
		Otherwise
		
			PLRETURN=this.cus_odata_formatii1.salvare(This.OREC,This.NID)
			
		*!*		ENDIF
		Endcase
		Return PLRETURN
		
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_formatii1.cactiune = tcActiune
		
		IF gnSAL_SPECIAL = 4 AND gnIdProgram = 9
			thisform.lb_titlu_alb_b121.Caption = 'Loc de munca'
			thisform.clb_tx_simplu1.lB_SIMPLU1.Caption ='Loc munca'
			thisform.cb_tx_simplu1._LBBASE1.Caption='Partener'
			thisform.cb_tx_simplu2._LBBASE1.Caption='Activitate'
		ENDIF 
	ENDPROC

	PROCEDURE Cb_tx_simplu1._cbbase1.LostFocus
		porec.id_sectie = v_sectie.id_sectie
	ENDPROC

	PROCEDURE Cb_tx_simplu2._cbbase1.LostFocus
		porec.id_TRANSA = v_TRANSE.id_TRANSA
	ENDPROC

	PROCEDURE Cb_tx_simplu3._cbbase1.LostFocus
		porec.id_semnatura = v_semnaturi.id_semnatura 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_grdhand AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 250
		Name = "frm_grdhand"
		Width = 316
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 192
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 124
		Lb_titlu_alb_b121.Caption = "Grupe de handicap"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 284
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 2, ;
		DeleteMark = .F., ;
		Height = 200, ;
		Left = 14, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		RecordSource = "v_nomhand", ;
		Top = 39, ;
		Width = 280, ;
		Column1.ControlSource = "denumire", ;
		Column1.Name = "Column1", ;
		Column1.Width = 164, ;
		Column2.ControlSource = "c_handicap", ;
		Column2.Name = "Column2", ;
		Column2.Width = 84
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Caption = "Denumire", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Caption = "Coef. handicap", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 225, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 195, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 254, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomgrp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomgrp.ca_baza1.cfiltru=lcFiltru
		ponomgrp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_nomhand
		Scatter Name loRec Blank
		*!*	DEBUG
		*!*	SUSPEND 
		Do Adauga_Modifica_Inregistrare With "grdhand",loRec,,"INSERT",,"addgrd"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_nomhand
		Scatter Name loRec
		Do Adauga_Modifica_Inregistrare With "grdhand",loRec,loRec.id_handicap,"UPDATE",,"modgrd"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_nomhand
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "grdhand",loRec.id_handicap
		
		this.actualizeaza_grid1()
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_grdhand_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_grdhand1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 112
		Name = "frm_grdhand_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 312
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 64
		Lb_titlu_alb_b121.Caption = "Grupa de handicap"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 5
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 345
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 3
		BUT_TERMIN1.Top = 1
		Gridsort1.Left = 9
		Gridsort1.Name = "Gridsort1"
		Gridsort1.Top = 35
		BUT_RENUNT1.Anchor = 9
		BUT_RENUNT1.Left = 315
		BUT_RENUNT1.Name = "BUT_RENUNT1"
		BUT_RENUNT1.TabIndex = 4
		BUT_RENUNT1.Top = 1
	*</PropValue>

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 37, ;
		TEXT_SIMPLU1.ControlSource = "porec.denumire", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Denumire", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 65, ;
		TEXT_SIMPLU1.ControlSource = "porec.c_handicap", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Coef. handicap", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_grdhand1' AS cus_odata_grdhand WITH ;
		Left = 348, ;
		Name = "Cus_odata_grdhand1", ;
		Top = 48
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		LOCAL PLRETURN
		
		lccontrol = UPPER(this.ActiveControl.BaseClass )
		IF   INLIST(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.Activecontrol.controlsource
			&lcval=thisform.ActiveControl.value
		ENDIF 	
		
		
		Do Case
		Case Empty(porec.denumire)
			Messagebox('Nu ati completat denumirea!',0+48,"Atentie")
			this.clb_tx_simplu1.text_simplu1.SetFocus()
			
			plreturn=.F.
		
		
		
		OTHERWISE
		
			PLRETURN=This.cus_odata_grdhand1.salvare(This.OREC,This.NID)
		
		ENDCASE 
		
		Return PLRETURN
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		
		this.cus_odata_grdhand1.cactiune = tcActiune
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_grilaco AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 426
		Name = "frm_grilaco"
		Width = 374
		_shape1.Anchor = 11
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 372
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 251
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 122
		Lb_titlu_alb_b121.Caption = "Grilă zile CO"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 341
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 5, ;
		DeleteMark = .F., ;
		Height = 369, ;
		Left = 12, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		RecordSource = "v_grilaco", ;
		Top = 39, ;
		Width = 348, ;
		Column1.ControlSource = "liminf", ;
		Column1.Name = "Column1", ;
		Column1.Width = 80, ;
		Column2.ControlSource = "limsup", ;
		Column2.Name = "Column2", ;
		Column2.Width = 86, ;
		Column3.ColumnOrder = 5, ;
		Column3.ControlSource = "zile", ;
		Column3.Name = "Column3", ;
		Column3.Width = 49, ;
		Column4.ColumnOrder = 3, ;
		Column4.ControlSource = "datai", ;
		Column4.Name = "Column4", ;
		Column4.Width = 47, ;
		Column5.ColumnOrder = 4, ;
		Column5.ControlSource = "datas", ;
		Column5.Name = "Column5", ;
		Column5.Width = 48
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Limita inf (ani)", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Limita sup (ani)", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr. zile", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column4.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data inc.", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column5.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data sf.", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column5.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 281, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 251, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 310, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomgrp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomgrp.ca_baza1.cfiltru=lcFiltru
		ponomgrp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_grilaco
		
		Scatter Name loRec Blank
		Do Adauga_Modifica_Inregistrare With "grilaco",loRec,,"INSERT",,"addco"
		 
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_grilaco
		Scatter Name loRec
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Do Adauga_Modifica_Inregistrare With "grilaco",loRec,loRec.id_grilaco,"UPDATE",,"modco"
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_grilaco
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "grilaco",loRec.id_grilaco
		This.actualizeaza_grid1()
	ENDPROC

	PROCEDURE inainte_de_do_termin
		Local lcCursor,lnLimInf,llReturn
		llReturn = .T.
		If Reccount('v_grilaco') > 0
			lcCursor = Select()
			*!*	modificare	ROADEFSALARII v 2.0.9 : am adaugat ISNULL(datas)
			Select liminf,limsup From v_grilaco WHERE ISNULL(datas) Order By liminf Into Cursor crscotemp
			lnLimSup = 0
			Select crscotemp
			Scan
				If lnLimSup <> liminf
					amessagebox("Nu este acoperit intervalul " + Alltrim(Str(lnLimSup)) + " - " + Alltrim(Str(liminf)) + " !",48,"Atentie")
					llReturn = .F.
					Exit
				Else
					lnLimSup = limsup
				Endif
			Endscan
			Use In ('crscotemp')
			Select (lcCursor)
		Endif
		RETURN llReturn
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_grilaco_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_grilaco1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_nr_intre1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lb_simplu1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 216
		Name = "frm_grilaco_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 312
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 64
		Lb_titlu_alb_b121.Caption = "Grilă CO"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 7
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 344
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 5
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		BUT_RENUNT1.Anchor = 9
		BUT_RENUNT1.Left = 315
		BUT_RENUNT1.Name = "BUT_RENUNT1"
		BUT_RENUNT1.TabIndex = 6
		BUT_RENUNT1.Top = 1
	*</PropValue>

	ADD OBJECT 'Clb_nr_intre1' AS clb_nr_intre WITH ;
		Height = 60, ;
		Left = 48, ;
		Name = "Clb_nr_intre1", ;
		TabIndex = 4, ;
		Top = 120, ;
		Width = 290, ;
		tx_n1.Alignment = 3, ;
		tx_n1.ControlSource = "porec.datai", ;
		tx_n1.Left = 128, ;
		tx_n1.Name = "tx_n1", ;
		tx_n1.Top = 28, ;
		tx_n1.Value = {}, ;
		Lb_simplu1.Caption = "Valabilă pentru salariații angajați în perioada", ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		tx_n2.Alignment = 3, ;
		tx_n2.ControlSource = "porec.datas", ;
		tx_n2.Left = 208, ;
		tx_n2.Name = "tx_n2", ;
		tx_n2.Top = 28, ;
		tx_n2.Value = {}
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 48, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 36, ;
		TEXT_SIMPLU1.ControlSource = "porec.liminf", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Limita inf.", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 48, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 64, ;
		TEXT_SIMPLU1.ControlSource = "porec.limsup", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Limita sup.", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu3' AS clb_tx_simplu WITH ;
		Left = 48, ;
		Name = "Clb_tx_simplu3", ;
		TabIndex = 3, ;
		Top = 92, ;
		TEXT_SIMPLU1.ControlSource = "porec.zile", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Nr. zile", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_grilaco1' AS cus_odata_grilaco WITH ;
		Left = 2, ;
		Name = "Cus_odata_grilaco1", ;
		Top = 65
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />

	ADD OBJECT 'Lb_simplu1' AS lb_simplu WITH ;
		AutoSize = .F., ;
		Caption = "    Data de sfârșit a perioadei se completează doar dacă se cunoaște. Altfel, se lasă necompletată.", ;
		Height = 36, ;
		Left = 36, ;
		Name = "Lb_simplu1", ;
		TabIndex = 8, ;
		Top = 180, ;
		Width = 313, ;
		WordWrap = .T.
		*< END OBJECT: ClassLib="lb.vcx" BaseClass="label" />
	
	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		*!*	Do Case
		*!*	Case Empty(porec.tip_contract)
		*!*		Messagebox('Nu ati completat formatia!',0+48,"Atentie")
		*!*		This.clb_tx_simplu1._cbbase1.SetFocus()
		*!*		PLRETURN=.F.
		*!*	Otherwise
		*!*	modificare	v 2.0.9
		*!*		PLRETURN=this.cus_odata_grilaco1.salvare(This.OREC,This.NID)
		PLRETURN = .F.
		Do Case
		Case Empty(porec.limsup)
			amessagebox("Nu ati completat limita superioara!",48,"Atentie")
			Thisform.clb_tx_simplu2.text_simplu1.SetFocus()
		Case porec.limsup < porec.liminf
			amessagebox("Limita superioara trebuie sa fie mai mare sau egala cu limita inferioara!",48,"Atentie")
			Thisform.clb_tx_simplu2.text_simplu1.SetFocus()
		Case Empty(porec.zile)
			amessagebox("Numarul de zile nu poate fi 0!",48,"Atentie")
			Thisform.clb_tx_simplu3.text_simplu1.SetFocus()
		Case Empty(porec.datai)
			amessagebox("Nu ati completat data de inceput!",48,"Atentie")
			Thisform.clb_nr_intre1.tx_n1.SetFocus()
		Case !Empty(porec.DataS) And porec.DataS < porec.datai
			amessagebox("Data de sfarsit nu poate fi mai mica decat data de inceput!",48,"Atentie")
			Thisform.clb_nr_intre1.tx_n2.SetFocus()
		Otherwise
			PLRETURN=This.cus_odata_grilaco1.salvare(This.OREC,This.NID)
		Endcase
		*!*	modificare	v 2.0.9	^
		*!*		ENDIF
		*!*	Endcase
		Return PLRETURN
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_grilaco1.cactiune = tcActiune
		 
	ENDPROC

	PROCEDURE Clb_nr_intre1.tx_n1.Valid
		*
	ENDPROC

	PROCEDURE Clb_nr_intre1.tx_n2.Valid
		*
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_grpmun AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 250
		Name = "frm_grpmun"
		Width = 323
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 204
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 120
		Lb_titlu_alb_b121.Caption = "Grupe de muncă"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 292
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 1, ;
		DeleteMark = .F., ;
		Height = 200, ;
		Left = 13, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		RecordSource = "v_nomgrp", ;
		Top = 39, ;
		Width = 295, ;
		Column1.ControlSource = "dengrupa", ;
		Column1.Name = "Column1", ;
		Column1.Width = 259
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Denumire", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 234, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 204, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 264, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomgrp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomgrp.ca_baza1.cfiltru=lcFiltru
		ponomgrp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_nomgrp
		Scatter Name loRec Blank
		*!*	DEBUG
		*!*	SUSPEND 
		Do Adauga_Modifica_Inregistrare With "grpmun",loRec,,"INSERT",,"addgrp"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_nomgrp
		Scatter Name loRec
		Do Adauga_Modifica_Inregistrare With "grpmun",loRec,loRec.id_cas,"UPDATE",,"modgrp"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_nomgrp
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "grpmun",loRec.id_cas
		
		this.actualizeaza_grid1()
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_grpmun_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_grpmun1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 90
		Name = "frm_grpmun_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 312
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 64
		Lb_titlu_alb_b121.Caption = "Grupa de muncă"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 5
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 344
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 3
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		BUT_RENUNT1.Anchor = 9
		BUT_RENUNT1.Left = 314
		BUT_RENUNT1.Name = "BUT_RENUNT1"
		BUT_RENUNT1.TabIndex = 4
		BUT_RENUNT1.Top = 1
	*</PropValue>

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 36, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 42, ;
		TEXT_SIMPLU1.ControlSource = "porec.dengrupa", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Denumire", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_grpmun1' AS cus_odata_grpmun WITH ;
		Left = 348, ;
		Name = "Cus_odata_grpmun1", ;
		Top = 48
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		LOCAL PLRETURN
		
		lccontrol = UPPER(this.ActiveControl.BaseClass )
		IF   INLIST(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.Activecontrol.controlsource
			&lcval=thisform.ActiveControl.value
		ENDIF 	
		
		
		Do Case
		Case Empty(porec.dengrupa)
			Messagebox('Nu ati completat denumire grupei de munca!',0+48,"Atentie")
			this.clb_tx_simplu1.text_simplu1.SetFocus()
			
			plreturn=.F.
		
		
		OTHERWISE
		
			PLRETURN=This.cus_odata_grpmun1.salvare(This.OREC,This.NID)
		
		ENDCASE 
		
		Return PLRETURN
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		
		this.cus_odata_grpmun1.cactiune = tcActiune
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_imp AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Name = "frm_imp"
		_shape1.Anchor = 11
		_shape1.Left = -12
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 252
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 122
		Lb_titlu_alb_b121.Caption = "Impozitar"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 343
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 4, ;
		DeleteMark = .F., ;
		Height = 206, ;
		Left = 28, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "v_imp", ;
		Top = 36, ;
		Width = 313, ;
		Column1.ControlSource = "inf", ;
		Column1.InputMask = (get_mask(16,Gnpa)), ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 58, ;
		Column2.ControlSource = "sup", ;
		Column2.InputMask = (get_mask(16,Gnpa)), ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 75, ;
		Column3.ColumnOrder = 4, ;
		Column3.ControlSource = "coef", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column4.ColumnOrder = 3, ;
		Column4.ControlSource = "sumainit", ;
		Column4.InputMask = (get_mask(16,Gnpa)), ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 71
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Caption = "Limita inf", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Caption = "Limita sup", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Caption = "Coeficient (0,xx)", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column4.Header1' AS header WITH ;
		Caption = "Suma init", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 283, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 254, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 314, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomgrp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomgrp.ca_baza1.cfiltru=lcFiltru
		ponomgrp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_imp
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Scatter Name loRec Blank
		Do Adauga_Modifica_Inregistrare With "imp",loRec,,"INSERT",,"addimp"
		 
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_imp
		Scatter Name loRec
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Do Adauga_Modifica_Inregistrare With "imp",loRec,loRec.id_impozitar,"UPDATE",,"modimp"
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_imp
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "imp",loRec.id_impozitar
		This.actualizeaza_grid1()
	ENDPROC

	PROCEDURE inainte_de_do_termin
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomgrp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomgrp.ca_baza1.cfiltru=lcFiltru
		ponomgrp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_imp_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_imp1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu4" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 175
		Name = "frm_imp_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 312
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 64
		Lb_titlu_alb_b121.Caption = "Impozitar"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 7
		Lb_titlu_alb_b121.Visible = .F.
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 345
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 5
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Anchor = 9
		But_renunt1.Left = 314
		But_renunt1.Name = "But_renunt1"
		But_renunt1.TabIndex = 6
		But_renunt1.Top = 1
	*</PropValue>

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 48, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 41, ;
		Text_simplu1.ControlSource = "porec.inf", ;
		Text_simplu1.InputMask = (get_mask(16,Gnpa)), ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Limita inf.", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 48, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 69, ;
		Text_simplu1.ControlSource = "porec.sup", ;
		Text_simplu1.InputMask = (get_mask(16,Gnpa)), ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Limita sup.", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu3' AS clb_tx_simplu WITH ;
		Left = 48, ;
		Name = "Clb_tx_simplu3", ;
		TabIndex = 3, ;
		Top = 97, ;
		Text_simplu1.ControlSource = "porec.sumainit", ;
		Text_simplu1.InputMask = (get_mask(16,Gnpa)), ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Suma init.", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu4' AS clb_tx_simplu WITH ;
		Left = 48, ;
		Name = "Clb_tx_simplu4", ;
		TabIndex = 4, ;
		Top = 125, ;
		Text_simplu1.ControlSource = "porec.coef", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Coef. (0,xx)", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_imp1' AS cus_odata_imp WITH ;
		Left = 252, ;
		Name = "Cus_odata_imp1", ;
		Top = 216
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		*!*	Do Case
		*!*	Case Empty(porec.tip_contract)
		*!*		Messagebox('Nu ati completat formatia!',0+48,"Atentie")
		*!*		This.clb_tx_simplu1._cbbase1.SetFocus()
		*!*		PLRETURN=.F.
		*!*	Otherwise
		
			PLRETURN=this.cus_odata_imp1.salvare(This.OREC,This.NID)
			 
			
		*!*		ENDIF
		*!*	Endcase
		Return PLRETURN
		
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_imp1.cactiune = tcActiune
		 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_limded AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 316
		Name = "frm_limded"
		Width = 285
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 157
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 129
		Lb_titlu_alb_b121.Caption = "Deduceri"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 255
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Left = 360
		But_renunt1.Name = "But_renunt1"
		But_renunt1.Top = 12
		But_renunt1.Visible = .F.
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 2, ;
		DeleteMark = .F., ;
		Height = 264, ;
		Left = 41, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		RecordSource = "v_deduceri", ;
		Top = 40, ;
		Width = 206, ;
		Column1.ControlSource = "nrpers", ;
		Column1.Name = "Column1", ;
		Column2.ControlSource = "suma", ;
		Column2.InputMask = (get_mask(16,Gnpa)), ;
		Column2.Name = "Column2", ;
		Column2.Width = 93
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nr. pers.", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Suma", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 192, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 161, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 223, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomgrp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomgrp.ca_baza1.cfiltru=lcFiltru
		ponomgrp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_deduceri
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Scatter Name loRec Blank
		Do Adauga_Modifica_Inregistrare With "limded",loRec,,"INSERT",,"addlim"
		 
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_deduceri
		Scatter Name loRec
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Do Adauga_Modifica_Inregistrare With "limded",loRec,loRec.id_deducere,"UPDATE",,"modlim"
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_deduceri
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "limded",loRec.id_deducere
		This.actualizeaza_grid1()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_limded_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_limded1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 125
		Name = "frm_limded_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 312
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 64
		Lb_titlu_alb_b121.Caption = "Deducere"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 344
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Anchor = 9
		But_renunt1.Left = 314
		But_renunt1.Name = "But_renunt1"
		But_renunt1.Top = 1
	*</PropValue>

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 41, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 43, ;
		Text_simplu1.ControlSource = "porec.nrpers", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Nr. persoane", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 41, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 71, ;
		Text_simplu1.ControlSource = "porec.suma", ;
		Text_simplu1.InputMask = (get_mask(16,Gnpa)), ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Suma:", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_limded1' AS cus_odata_limded WITH ;
		Left = 18, ;
		Name = "Cus_odata_limded1", ;
		Top = 65
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		*!*	Do Case
		*!*	Case Empty(porec.tip_contract)
		*!*		Messagebox('Nu ati completat formatia!',0+48,"Atentie")
		*!*		This.clb_tx_simplu1._cbbase1.SetFocus()
		*!*		PLRETURN=.F.
		*!*	Otherwise
		
			PLRETURN=this.cus_odata_limded1.salvare(This.OREC,This.NID)
			 
			
		*!*		ENDIF
		*!*	Endcase
		Return PLRETURN
		
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_limded1.cactiune = tcActiune
		 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_meserii AS formtermin OF "_frm_base.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_reface1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Gridextra1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: ndiferente
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 447
		Name = "frm_meserii"
		ndiferente = 0
		Width = 419
		_memberdata = <VFPData>
			<memberdata name="ndiferente" display="nDiferente"/>
		</VFPData>
		_shape1.Anchor = 10
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 420
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 298
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 122
		Lb_titlu_alb_b121.Caption = "Meserii"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 388
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 5, ;
		DeleteMark = .F., ;
		FontName = "Arial Narrow", ;
		Height = 396, ;
		Left = 19, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "v_meserii", ;
		Top = 36, ;
		Width = 389, ;
		Column1.ControlSource = "meserie", ;
		Column1.FontName = "Arial Narrow", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 143, ;
		Column2.ColumnOrder = 3, ;
		Column2.ControlSource = "cod_meserie", ;
		Column2.FontName = "Arial Narrow", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column3.ColumnOrder = 4, ;
		Column3.ControlSource = "zilesupl_co", ;
		Column3.FontName = "Arial Narrow", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 31, ;
		Column4.ColumnOrder = 5, ;
		Column4.ControlSource = "versiune_cor", ;
		Column4.FontName = "Arial Narrow", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Width = 67, ;
		Column5.ColumnOrder = 2, ;
		Column5.ControlSource = "inactiv", ;
		Column5.FontName = "Arial Narrow", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Sparse = .F., ;
		Column5.Width = 37
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Meserie", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod meserie", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Zile CO", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column4.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Revizie COR", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column5._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Left = 30, ;
		Name = "_checkbox1", ;
		ReadOnly = .T., ;
		Top = 23
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column5.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Inactiv", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 329, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 300, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_reface1' AS but_reface WITH ;
		Anchor = 9, ;
		Left = 270, ;
		Name = "But_reface1", ;
		ToolTipText = "Actualizare la ultima versiune COR", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 358, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Gridextra1' AS gridextra WITH ;
		gridexpression = Thisform._grdrow1, ;
		Left = 12, ;
		Name = "Gridextra1", ;
		Top = 156
		*< END OBJECT: ClassLib="..\utile\gridextras\gridextras.vcx" BaseClass="custom" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=poresp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		poResp.ca_baza1.cfiltru=lcFiltru
		poResp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_meserii
		Scatter Name loRec Blank
		*!*	modificare	v 2.0.3
		AddProperty(loRec,"tip_modificare",3)
		AddProperty(loRec,"dataconsemnare",{})
		*!*	modificare	v 2.0.3	^
		*!*	DEBUG
		*!*	SUSPEND 
		Do Adauga_Modifica_Inregistrare With "meserii",loRec,,"INSERT",,"addmes"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_meserii
		Scatter Name loRec
		*!*	modificare	v 2.0.3
		AddProperty(loRec,"tip_modificare",2)
		AddProperty(loRec,"dataconsemnare",{})
		*!*	modificare	v 2.0.3	^
		Do Adauga_Modifica_Inregistrare With "meserii",loRec,loRec.id_meseria,"UPDATE",,"modmes"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_reface
		Local lcSql, llFinalizata, lnTip, llSucces
		Private pniesire, poPers
		pniesire = 0
		llSucces = .T.		&&	modificare	v 2.0.6
		llFinalizata = .T.
		lnTip = 2	&&	1	-	commit	;	2	-	rollback
		_Screen.LockScreen = .T.
		Thisform._grdrow1.salveaza_grid()
		Thisform.do_deschide_tranzactie()
		*!*	modificare	v 2.0.6
		*!*	lcSql = [begin pack_def_salarii.activeaza_versiune_cor(?gnIdUtil); end;]
		*!*	If goExecutor.oExecuta(lcSql)
		If This.nDiferente = 1 Or gnScrieRegistru <> 1 	&&	manual
			*!*	daca am actualizare automata, nu mai apelez activeaza_actualizare_cor
			lcSql = [begin pack_def_salarii.activeaza_actualizare_cor(?gnIdUtil); end;]
			llSucces = goExecutor.oExecuta(lcSql)
		Endif
		IF llSucces
		*!*	modificare	v 2.0.6	^
			*!*	aleg data consemnarii si tipul modificarii
			Select v_meserii
			Scatter Name loRec
			AddProperty(loRec,"tip_modificare",2)
			AddProperty(loRec,"dataconsemnare",{})
			poPers = loRec
			*!*	modificare	v 2.0.5
			*!*		loFrm = Createobject("frm_salvare_opersonal",.T.)
			*!*		loFrm.Show(1)
			If gnScrieRegistru = 1
				loFrm = Createobject("frm_salvare_opersonal",.T.)
				loFrm.Show(1)
			Else
				gnButon = 1
				poPers.dataconsemnare = Null
			Endif
			*!*	modificare	v 2.0.5	^
			If gnButon = 1
				*!*	modificare	v 2.0.6
		*!*				*!*	citesc toate meseriile de pe contractele active in luna curenta
		*!*				poresp.ca_baza1.cfiltru=[sters = 0 and id_meseria in (select distinct id_meserie from sal_vstatplata where datalic is null) ] + ;
		*!*					[and versiune_cor <> (select versiune from sal_versiuni_cor where inactiv = 0 and sters = 0)]
				If This.nDiferente = 1 OR gnScrieRegistru <> 1 	&&	manual
					IF gnScrieRegistru = 1
						*!*	citesc toate meseriile care au fost transmise in ReGES ( de pe contractele active, suspendate si detasate )
						poresp.ca_baza1.cfiltru=[id_meseria in (select distinct id_meserie from sal_reges_contracte where sters = 0 and tip_modificare <> 1 ] + ;
							[and id_sal_ctr not in (select id_sal_ctr from sal_reges_stari_ctr where id_tip_stare = 1 and sters = 0 and tip_modificare <> 1) ] + ;
							[and versiune_cor <> (select versiune from sal_versiuni_cor where inactiv = 0 and sters = 0)) ]
					ELSE
						*!*	citesc toate meseriile folosite in anul curent
						poresp.ca_baza1.cfiltru = [id_meseria in (select id_meserie from sal_stat where sters = 0 and an = ?gnAn) and ] + ;
							[versiune_cor <> (select versiune from sal_versiuni_cor where inactiv = 0 and sters = 0)]
					ENDIF
				*!*	modificare	v 2.0.6	^
					poresp.ca_baza1.afisare()
					Select v_meserii
					Scan
						Scatter Name loRec
						lnVersiune = loRec.versiune_cor
						AddProperty(loRec,"tip_modificare",poPers.tip_modificare)
						AddProperty(loRec,"dataconsemnare",poPers.dataconsemnare)
						Do Adauga_Modifica_Inregistrare With "meserii",loRec,loRec.id_meseria,"UPDATE",,"modmes"
						If pniesire<>1
							*!*	daca apasa renunt
							llFinalizata = .F.
							amessagebox("Actualizarea codurilor COR a fost intrerupta si trebuie reluata de la inceput!",48,"Atentie")
							Exit
						Endif
						Select v_meserii
					Endscan
				*!*	modificare	v 2.0.6
				Else
					*!*	daca am tabela pentru conversie automata
					lcSql = [begin pack_personal.reges_actualizeaza_cor_aut(?gnLuna,?gnAn,] + ;
						[to_date('] + DTOC(poPers.dataconsemnare,1) + [','YYYYMMDD'),] + ;
						ALLTRIM(STR(poPers.tip_modificare)) + [,?gnIdUtil); end;]
					llFinalizata = goExecutor.oExecuta(lcSql)
				Endif
				*!*	modificare	v 2.0.6	^		
			Else
				llFinalizata = .F.
			Endif
			If llFinalizata
				*!*		modificare	v 2.0.6
				*!*				lnTip = 1
				*!*				Thisform.but_reface1.Visible = .F.
				lcSql = [begin pack_def_salarii.dezactiveaza_actualizare_cor(?gnIdUtil); end;]
				If goExecutor.oExecuta(lcSql)
					lnTip = 1
					Thisform.but_reface1.Visible = .F.
				Endif
				*!*		modificare	v 2.0.6	^
			Endif
			Thisform.do_inchide_tranzactie(lnTip)
			poresp.ca_baza1.cfiltru=[sters = 0]
			poresp.ca_baza1.afisare()
		Else
			Thisform.do_inchide_tranzactie(lnTip)
		Endif
		Thisform._grdrow1.incarca_grid()
		_Screen.LockScreen=.F.
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_meserii
		SCATTER NAME lorec
		*!*	modificare	v 2.0.3
		AddProperty(loRec,"tip_modificare",3)
		AddProperty(loRec,"dataconsemnare",{})
		*!*	modificare	v 2.0.3	^
		Do STERGE_INREGISTRARE With "meserii",loRec.id_meseria
		
		this.actualizeaza_grid1()
		
	ENDPROC

	PROCEDURE Init
		Lparameters tnDiferente
		DoDefault()
		*!*	modificare	v 2.0.6
		*!*	Thisform.but_reface1.Visible = Iif(tnDiferente=0,.T.,.F.)
		Thisform.nDiferente = tnDiferente
		Thisform.but_reface1.Visible = Iif(Thisform.nDiferente=0,.F.,.T.)
		*!*	modificare	v 2.0.6	^
		Thisform.gridextra1.Setup()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_meserii_nou AS formtermin OF "_frm_base.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_meserii1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ole_grupe" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_oleimagelist1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_versiune" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CMD_CAUTA1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: actualizeaza_tree
		*p: ccod_meserie_init
		*p: nid
		*p: nversiune_cor
		*p: nversiune_cor_init
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		ccod_meserie_init = 
		DoCreate = .T.
		Height = 585
		Name = "frm_meserii_nou"
		nid = .F.
		nversiune_cor = 0
		nversiune_cor_init = 0
		orec = .F.
		Width = 924
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 924
		_shape2.Height = 29
		_shape2.Left = 862
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 62
		Lb_titlu_alb_b121.Caption = "Meserii"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 9
		BUT_TERMIN1.Left = 893
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 7
		BUT_TERMIN1.Top = 1
		Gridsort1.Left = 516
		Gridsort1.Name = "Gridsort1"
		Gridsort1.Top = 132
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Inactiv", ;
		ControlSource = "porec.inactiv", ;
		Left = 330, ;
		Name = "_checkbox1", ;
		TabIndex = 6, ;
		Top = 155
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_oleimagelist1' AS _oleimagelist WITH ;
		Height = 37, ;
		Left = 456, ;
		Name = "_oleimagelist1", ;
		Top = 180, ;
		Width = 38
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="olecontrol" OLEObject="c:\windows\system32\mscomctl.ocx" Value="0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAEAAAAgAAAAEAAAD+////AAAAAAAAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/////v////7////+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////1IAbwBvAHQAIABFAG4AdAByAHkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAUA//////////8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADCtmAooAc0BAwAAAEABAAAAAAAAAwBPAGwAZQBPAGIAagBlAGMAdABEAGEAdABhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAgEDAAAAAgAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXAAAAAAAAAADAEEAYwBjAGUAcwBzAE8AYgBqAFMAaQB0AGUARABhAHQAYQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJgACAP///////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAABcAAAAAAAAAAMAQwBoAGEAbgBnAGUAZABQAHIAbwBwAHMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAIA////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAD0AAAAAAAAABAAAAAIAAAD+/////v////7///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8jfyQskYXREbFqAMDwKDYoIUM0EggAAADtAwAA7QMAAIB+4eYAAAYAIAAAAAAAAADAwMAA//8AAAHvzasAAAUAXAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAACQAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5MzY4MjY1RS04NUZFLTExZDEtOEJFMy0wMDAwRjg3NTREQTFEAEEAOABEADgARgAtADkARAA2AEEALQAxADAAMQBCAC0AQQABAACADAAAAEltYWdlSGVpZ2h0AAkAAABJCgAAAAAAAAALAAAASW1hZ2VXaWR0aAAJAAAASQoAAAAAAAAAAHMAMGcZAAYAAAD/////BQAAgAAAAAAAAAAAAAAAAC4AbwBjAHgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" />

	ADD OBJECT 'But_renunt1' AS but_renunt WITH ;
		Left = 864, ;
		Name = "But_renunt1", ;
		TabIndex = 8, ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 317, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 2, ;
		Top = 38, ;
		Text_simplu1.ControlSource = "porec.meserie", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Meseria:", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 317, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 3, ;
		Top = 66, ;
		Text_simplu1.ControlSource = "porec.cod_meserie", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Cod meserie:", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu3' AS clb_tx_simplu WITH ;
		Left = 317, ;
		Name = "Clb_tx_simplu3", ;
		TabIndex = 5, ;
		Top = 122, ;
		Text_simplu1.ControlSource = "porec.zilesupl_co", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Zile CO supl.:", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_versiune' AS clb_tx_simplu WITH ;
		Left = 317, ;
		Name = "Clb_tx_versiune", ;
		TabIndex = 4, ;
		Top = 94, ;
		Text_simplu1.ControlSource = "porec.versiune_cor", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Revizie COR", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'CMD_CAUTA1' AS cmd_cauta WITH ;
		Caption = "\<Caută după denumire", ;
		Height = 27, ;
		Left = 612, ;
		Name = "CMD_CAUTA1", ;
		Top = 39, ;
		Width = 168
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Cus_odata_meserii1' AS cus_odata_meserii WITH ;
		Left = 570, ;
		Name = "Cus_odata_meserii1", ;
		Top = 133
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />

	ADD OBJECT 'ole_grupe' AS _olecontrol WITH ;
		Anchor = 15, ;
		Height = 396, ;
		Left = 8, ;
		Name = "ole_grupe", ;
		TabIndex = 1, ;
		Top = 180, ;
		Width = 904
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="olecontrol" OLEObject="c:\windows\system32\mscomctl.ocx" Value="0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAEAAAAgAAAAEAAAD+////AAAAAAAAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/////v////7////+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////1IAbwBvAHQAIABFAG4AdAByAHkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAUA//////////8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBjlgooAc0BAwAAAAACAAAAAAAAAwBPAGwAZQBPAGIAagBlAGMAdABEAGEAdABhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAgEDAAAAAgAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAagAAAAAAAAADAEEAYwBjAGUAcwBzAE8AYgBqAFMAaQB0AGUARABhAHQAYQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJgACAP///////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAABcAAAAAAAAAAMAQwBoAGEAbgBnAGUAZABQAHIAbwBwAHMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAIA////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAO4AAAAAAAAABAAAAAIAAAD+////BQAAAP7///8GAAAABwAAAP7///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+2kEHHiYXREbFqAMDwKDYoIUM0EggAAABuXQAA7igAALE8wWoBAAYAIgAAAJwAAADtAwAACAAAAAEAAAAB782rXAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAACQAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5MzY4MjY1RS04NUZFLTExZDEtOEJFMy0wMDAwRjg3NTREQTFmAHQAIABXAGkAbgBkAG8AdwBzACAAUgBlAHAAbwByAHQAIAABAACADgAAAEhpZGVTZWxlY3Rpb24ABQAAAEwBAAAADAAAAEluZGVudGF0aW9uABEAAABODQAAAAcAAAAAAAAAAAAFAGAoHQAGAAAAAAAAAAUAAIA43xIAAQAAAC4AH97svQEABQCA3xIATgBUAFwAUwB5AHMAdABlAG0AMwAyAAAAQ0AKAAAATGluZVN0eWxlAAkAAABJCgAAAAAAAAANAAAATW91c2VQb2ludGVyAAkAAABJCgAAAAAAAAAOAAAAUGF0aFNlcGFyYXRvcgAKAAAASAAAAAABAAAALgYAAABTdHlsZQAJAAAASQoAAAAHAAAADAAAAE9MRURyYWdNb2RlAAkAAABJCgAAAAAAAAAMAAAAT0xFRHJvcE1vZGUACQAAAEkKAAAAAAAAABYAAAAAAAkEAAAAAAAAAAAAAA==" />
	
	PROCEDURE actualizeaza_tree
		Lparameters tcCod
		Select v_cor
		Locate For Alltrim(cod)=ALLTRIM(tcCod)
		If Found()
			Thisform.ole_grupe.Nodes(rown).Selected = .T.
			Thisform.ole_grupe.Nodes(rown).EnsureVisible()
			Thisform.ole_grupe.SetFocus()
		*!*		Thisform.ole_grupe.Refresh()
		Endif
		
	ENDPROC

	PROCEDURE Destroy
		IF USED('v_cor')
			USE IN v_cor
		ENDIF 
		DODEFAULT()	
	ENDPROC

	PROCEDURE do_cauta
		Local loCauta
		lcSelect = [select cod,rown,UPPER(denumire) as denumire,versiune from v_cor]
		lcFiltru = []
		lcSchema = [cod c(12),rown n(10),denumire c(255),versiune n(10)]
		lcOrder = [rown]
		lcColoana = [denumire,cod]
		lcTitlu = [Cautati cod COR dupa meserie]
		lcTitluColoana = [Denumire,Cod COR]
		*!*	modificare	v 2.0.6
		lcFiltruOriginal = [!exists (select b.* from v_cor b where b.parentid = v_cor.id_cor)]
		*!*	lcFiltruOriginal = [LEN(ALLTRIM(cod))=6]
		*!*	modificare	v 2.0.6	^
		loCauta = cauta_alfa_vfp(lcSelect,lcFiltru,lcSchema,lcOrder,lcColoana,lcTitlu,lcTitluColoana,[],.F.,lcFiltruOriginal,4,Alltrim(porec.meserie))
		If gnButon <> 2
			porec.cod_meserie = loCauta.cod
			porec.versiune_cor = loCauta.versiune
			Thisform.clb_tx_simplu2.Refresh()
			Thisform.clb_tx_versiune.Refresh()
			Thisform.actualizeaza_tree(porec.cod_meserie)
		Endif
	ENDPROC

	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		Do Case
			Case Empty(porec.meserie)
				aMessagebox('Nu ati completat meseria!',0+48,"Atentie")
				This.clb_tx_simplu1.text_simplu1.SetFocus()
				PLRETURN=.F.
			Case Empty(porec.versiune_cor)
				aMessagebox('Nu ati completat revizia COR!',48,"Atentie")
				Thisform.clb_tx_versiune.text_simplu1.SetFocus()
				PLRETURN = .F.
			CASE Thisform.nversiune_cor = porec.versiune_cor and !Empty(Nvl(porec.dataconsemnare,{})) And This.cus_odata_meserii1.cactiune=[UPDATE] 
				*!*	e actualizare de COR de la o versiune la alta
				aMessagebox('Nu ati modificat revizia COR!'+CRLF+'Faceti dublu click pe linia corespunzatoare din lista sau completati manual in campul "Revizie COR"!',48,"Atentie")
				Thisform.clb_tx_versiune.text_simplu1.SetFocus()
				PLRETURN = .F.
			Otherwise
				*!*	modificare	v 2.0.3
				If gnEvaluareRevisal5 = 0 And gnScrieRegistru = 1 ;
					And Empty(Nvl(porec.dataconsemnare,{})) And This.cus_odata_meserii1.cactiune=[UPDATE] ;
					; &&	modificare v 2.0.7
					AND (NVL(porec.versiune_cor,0) <> Thisform.nversiune_cor_init OR ;
					NVL(porec.cod_meserie,[]) <> Thisform.ccod_meserie_init)	
					*!*	modificare v 2.0.7	^
					Private popers
					popers = porec
					loFrm = Createobject("frm_salvare_opersonal",.T.)
					loFrm.Show(1)
					If gnButon = 1
						PLRETURN=This.cus_odata_meserii1.salvare(This.OREC,This.NID)
						*!*	modificare	v 2.0.7
						If !plReturn
							porec.dataconsemnare = {}
						Endif
						*!*	modificare	v 2.0.7	^
					Endif
				Else
					*!*	modificare	v 2.0.3	^
					PLRETURN=This.cus_odata_meserii1.salvare(This.OREC,This.NID)
					*!*	modificare	v 2.0.3
				Endif
				*!*	modificare	v 2.0.3	^
		
		Endcase
		Return PLRETURN
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		Thisform.nversiune_cor = porec.versiune_cor
		update_cor() && update_server
		Dimension a(10)
		
		Select v_cor
		With Thisform.ole_grupe.Nodes
			Scan
				lcNivel = parentid
				lcCheie = 'A'+Alltrim(Str(id_cor))
				lcText=Alltrim(cod)+' : '+Alltrim(denumire)
				*!*	modificare	ROADEFSALARII v 2.0.8
				Try
				*!*	modificare	ROADEFSALARII v 2.0.8	^
					If Isnull(lcNivel)
						.Add(,,lcCheie,lcText)				&&	1
					Else
						lcCod = 'A'+Alltrim(Str(lcNivel))
						.Add(lcCod,4,lcCheie,lcText)	&&	1
					Endif
				*!*	modificare	ROADEFSALARII v 2.0.8
				Catch To loEroare
					amessagebox("Eroare la "+lcText+" !",16,"Eroare")
				Endtry
				*!*	modificare	ROADEFSALARII v 2.0.8	^
				*!*			Thisform.ole_grupe.Nodes.Item(rownum).Tag=ALLTRIM(cod)
				Select v_cor
			Endscan
		Endwith
		
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		This.cus_odata_meserii1.cactiune = tcActiune
		*!*	modificare	v 2.0.7
		Thisform.nversiune_cor_init = Nvl(porec.versiune_cor,0)
		Thisform.ccod_meserie_init = Nvl(porec.cod_meserie,[])
		*!*	modificare	v 2.0.7	^
		*!*	modificare	v 2.0.1
		If This.cus_odata_meserii1.cactiune = [UPDATE]
			Thisform.actualizeaza_tree(porec.cod_meserie)
		Endif
		*!*	modificare	v 2.0.1	^
		
	ENDPROC

	PROCEDURE Clb_tx_simplu2.Text_simplu1.InteractiveChange
		Thisform.actualizeaza_tree(This.Value)
		*!*	modificare	v 2.0.6
		This.SetFocus()
		This.SelLength = 0
		This.SelStart = Len(Alltrim(This.Value))
		*!*	modificare	v 2.0.6	^
		
	ENDPROC

	PROCEDURE ole_grupe.DblClick
		*** ActiveX Control Event ***
		
	ENDPROC

	PROCEDURE ole_grupe.NodeClick
		*** ActiveX Control Event ***
		Lparameters Node
		lnCheie=Val(Substr(Node.Key,2))
		Select v_cor
		Locate For id_cor=lnCheie
		If Found()
			porec.cod_meserie=Alltrim(cod)
			porec.versiune_cor = versiune
			Thisform.clb_tx_simplu2.Refresh
			Thisform.clb_tx_versiune.Refresh()
		Endif
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_modlic_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CUS_ODATA_MODLIC1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 77
		Name = "frm_modlic_nou"
		nid = .F.
		orec = .F.
		Width = 373
		_shape1.Name = "_shape1"
		_shape2.Height = 29
		_shape2.Left = 311
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 63
		Lb_titlu_alb_b121.Caption = "Mod lichidare"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 6
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 4
		GRIDSORT1.Name = "GRIDSORT1"
		But_renunt1.Name = "But_renunt1"
		But_renunt1.TabIndex = 5
	*</PropValue>

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 45, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 38, ;
		Text_simplu1.ControlSource = "porec.modlic", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Mod lichidare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'CUS_ODATA_MODLIC1' AS cus_odata_modlic WITH ;
		Left = 13, ;
		Name = "CUS_ODATA_MODLIC1", ;
		Top = 66
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		Do Case
		Case Empty(porec.modlic)
			Messagebox('Nu ati completat modul lichidarii!',0+48,"Atentie")
			This.clb_tx_simplu1._cbbase1.SetFocus()
			PLRETURN=.F.
		Otherwise
		
			PLRETURN=this.cus_odata_modlic1.salvare(This.OREC,This.NID)
			
		*!*		ENDIF
		Endcase
		Return PLRETURN
		
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_modlic1.cactiune = tcActiune
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_nom_limbi_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_nom_limbi1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 101
		Name = "frm_nom_limbi_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_SHAPE1.Anchor = 11
		_SHAPE1.Name = "_SHAPE1"
		_SHAPE2.Anchor = 9
		_SHAPE2.Left = 303
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		LB_TITLU_ALB_B121.Caption = "Limba straina noua"
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		LB_TITLU_ALB_B121.TabIndex = 5
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 343
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 3
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		BUT_RENUNT1.Anchor = 9
		BUT_RENUNT1.Left = 310
		BUT_RENUNT1.Name = "BUT_RENUNT1"
		BUT_RENUNT1.TabIndex = 4
		BUT_RENUNT1.Top = 1
	*</PropValue>

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 41, ;
		TEXT_SIMPLU1.ControlSource = "porec.denumire", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Limba straina", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_nom_limbi1' AS cus_odata_nom_limbi WITH ;
		Left = 16, ;
		Name = "Cus_odata_nom_limbi1", ;
		Top = 70
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		LOCAL PLRETURN
		
		lccontrol = UPPER(this.ActiveControl.BaseClass )
		IF   INLIST(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.Activecontrol.controlsource
			&lcval=thisform.ActiveControl.value
		ENDIF 	
		
		
		Do Case
		Case Empty(porec.denumire)
			Messagebox('Nu ati completat denumirea!',0+48,"Atentie")
			this.clb_tx_simplu1.text_simplu1.SetFocus()
			
			plreturn=.F.
		
		OTHERWISE
					PLRETURN=This.cus_odata_nom_limbi1.salvare(This.OREC,This.NID)
		
		ENDCASE 
		
		Return PLRETURN
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_nom_limbi1.cactiune = tcActiune
		 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_nomcm AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column6.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column7.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column7.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column8.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column8.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column8.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column9.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column9.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column9.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column10.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column10.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column10.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column11.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column11.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column11.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 390
		Name = "frm_nomcm"
		Width = 583
		_shape1.Anchor = 11
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 636
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 458
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 125
		Lb_titlu_alb_b121.Caption = "Concedii medicale"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 551
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 11, ;
		DeleteMark = .F., ;
		FontName = "Arial Narrow", ;
		Height = 343, ;
		Left = 4, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "v_nomtipcm", ;
		Top = 35, ;
		Width = 568, ;
		Column1.ColumnOrder = 2, ;
		Column1.ControlSource = "conc_med", ;
		Column1.FontName = "Arial Narrow", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 126, ;
		Column2.ColumnOrder = 3, ;
		Column2.ControlSource = "coef", ;
		Column2.FontName = "Arial Narrow", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 33, ;
		Column3.ColumnOrder = 4, ;
		Column3.ControlSource = "plbass", ;
		Column3.CurrentControl = "Check1", ;
		Column3.FontName = "Arial Narrow", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Sparse = .F., ;
		Column3.Width = 44, ;
		Column4.ColumnOrder = 5, ;
		Column4.ControlSource = "plang", ;
		Column4.CurrentControl = "Check1", ;
		Column4.FontName = "Arial Narrow", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Sparse = .F., ;
		Column4.Width = 29, ;
		Column5.ColumnOrder = 6, ;
		Column5.ControlSource = "cuvechime", ;
		Column5.CurrentControl = "Check1", ;
		Column5.FontName = "Arial Narrow", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Sparse = .F., ;
		Column5.Width = 53, ;
		Column6.ColumnOrder = 1, ;
		Column6.ControlSource = "ordine", ;
		Column6.FontName = "Arial Narrow", ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .T., ;
		Column6.Width = 29, ;
		Column7.ControlSource = "ingrijire", ;
		Column7.CurrentControl = "Check1", ;
		Column7.FontName = "Arial Narrow", ;
		Column7.Name = "Column7", ;
		Column7.ReadOnly = .T., ;
		Column7.Sparse = .F., ;
		Column8.ControlSource = "cas", ;
		Column8.CurrentControl = "Check1", ;
		Column8.FontName = "Arial Narrow", ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .T., ;
		Column8.Sparse = .F., ;
		Column8.Width = 41, ;
		Column9.ControlSource = "impozit", ;
		Column9.CurrentControl = "Check1", ;
		Column9.FontName = "Arial Narrow", ;
		Column9.Name = "Column9", ;
		Column9.ReadOnly = .T., ;
		Column9.Sparse = .F., ;
		Column9.Width = 46, ;
		Column10.ControlSource = "sanatate", ;
		Column10.CurrentControl = "Check1", ;
		Column10.FontName = "Arial Narrow", ;
		Column10.Name = "Column10", ;
		Column10.ReadOnly = .T., ;
		Column10.Sparse = .F., ;
		Column10.Width = 52, ;
		Column11.ControlSource = "somaj", ;
		Column11.CurrentControl = "Check1", ;
		Column11.FontName = "Arial Narrow", ;
		Column11.Name = "Column11", ;
		Column11.ReadOnly = .T., ;
		Column11.Sparse = .F., ;
		Column11.Width = 46
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Caption = "Denumire CM", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column10.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 0, ;
		Name = "Check1", ;
		Top = 96, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column10.Header1' AS header WITH ;
		Caption = "Pl.Sanatate", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column10.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column11.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 0, ;
		Name = "Check1", ;
		Top = 84, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column11.Header1' AS header WITH ;
		Caption = "Pl. Somaj", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column11.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Caption = "Coef.", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		FontName = "Arial Narrow", ;
		Height = 17, ;
		Left = 28, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 96, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Caption = "Pl. BASS", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column4.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		FontName = "Arial Narrow", ;
		Height = 17, ;
		Left = 12, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 84, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column4.Header1' AS header WITH ;
		Caption = "Pl. FS", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column5.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		FontName = "Arial Narrow", ;
		Height = 17, ;
		Left = 60, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 96, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column5.Header1' AS header WITH ;
		Caption = "Din vechime", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column5.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column6.Header1' AS header WITH ;
		Caption = "Ordine", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column6.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column7.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		FontName = "Arial Narrow", ;
		Height = 17, ;
		Left = 31, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 60, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column7.Header1' AS header WITH ;
		Caption = "Ingrijire copil 2 ani", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column7.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column8.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 46, ;
		Name = "Check1", ;
		Top = 84, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column8.Header1' AS header WITH ;
		Caption = "Pl. CAS", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column8.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column9.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 30, ;
		Name = "Check1", ;
		Top = 84, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column9.Header1' AS header WITH ;
		Caption = "Pl.Impozit", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column9.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 491, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 460, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 521, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomgrp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomgrp.ca_baza1.cfiltru=lcFiltru
		ponomgrp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_nomtipcm
		Scatter Name loRec Blank
		*!*	DEBUG
		*!*	SUSPEND 
		Do Adauga_Modifica_Inregistrare With "nomcm",loRec,,"INSERT",,"addcm"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_nomtipcm
		Scatter Name loRec
		Do Adauga_Modifica_Inregistrare With "nomcm",loRec,loRec.id_cm,"UPDATE",,"modcm"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_nomtipcm
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "nomcm",loRec.id_cm
		
		this.actualizeaza_grid1()
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_nomcm_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_nomcm1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox8" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 280
		Name = "frm_nomcm_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Left = 303
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		Lb_titlu_alb_b121.Caption = "Tip concediu medical"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 14
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 343
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 12
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Anchor = 9
		But_renunt1.Left = 310
		But_renunt1.Name = "But_renunt1"
		But_renunt1.TabIndex = 13
		But_renunt1.Top = 1
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Se plătește din BASS", ;
		ControlSource = "porec.plBass", ;
		Left = 53, ;
		Name = "_checkbox1", ;
		TabIndex = 4, ;
		Top = 127
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_checkbox2' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Se plătește din FS", ;
		ControlSource = "porec.plang", ;
		Left = 53, ;
		Name = "_checkbox2", ;
		TabIndex = 5, ;
		Top = 144
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_checkbox3' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Se calculează și din sporul de vechime", ;
		ControlSource = "porec.cuvechime", ;
		Left = 53, ;
		Name = "_checkbox3", ;
		TabIndex = 6, ;
		Top = 162
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_checkbox4' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Concediu de îngrijire copil până la 2 ani", ;
		ControlSource = "porec.ingrijire", ;
		Left = 53, ;
		Name = "_checkbox4", ;
		TabIndex = 7, ;
		Top = 180
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_checkbox5' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Se calculează CAS", ;
		ControlSource = "porec.cas", ;
		Left = 53, ;
		Name = "_checkbox5", ;
		TabIndex = 8, ;
		Top = 198
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_checkbox6' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Se calculează impozit", ;
		ControlSource = "porec.impozit", ;
		Left = 53, ;
		Name = "_checkbox6", ;
		TabIndex = 9, ;
		Top = 216
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_checkbox7' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Se calculează sănătate", ;
		ControlSource = "porec.sanatate", ;
		Left = 53, ;
		Name = "_checkbox7", ;
		TabIndex = 10, ;
		Top = 235
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_checkbox8' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Se calculează șomaj", ;
		ControlSource = "porec.somaj", ;
		Left = 53, ;
		Name = "_checkbox8", ;
		TabIndex = 11, ;
		Top = 254
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 36, ;
		Text_simplu1.ControlSource = "porec.ordine", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Ordine", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 64, ;
		Text_simplu1.ControlSource = "porec.conc_med", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Denumire", ;
		Lb_simplu1.FontName = "Arial Narrow", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu3' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_tx_simplu3", ;
		TabIndex = 3, ;
		Top = 92, ;
		Text_simplu1.ControlSource = "porec.coef", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Coeficient", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_nomcm1' AS cus_odata_nomcm WITH ;
		Left = 20, ;
		Name = "Cus_odata_nomcm1", ;
		Top = 111
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		LOCAL PLRETURN
		
		lccontrol = UPPER(this.ActiveControl.BaseClass )
		IF   INLIST(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.Activecontrol.controlsource
			&lcval=thisform.ActiveControl.value
		ENDIF 	
		
		
		Do Case
		Case Empty(porec.conc_med)
			Messagebox('Nu ati completat concediul!',0+48,"Atentie")
			this.clb_tx_simplu2.text_simplu1.SetFocus()
			
			plreturn=.F.
		
		OTHERWISE
			PLRETURN=This.cus_odata_nomcm1.salvare(This.OREC,This.NID)
		
		ENDCASE 
		
		Return PLRETURN
		
		
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_nomcm1.cactiune = tcActiune
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_nomore AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column6.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column6.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column7.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column7.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column8.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column8.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 447
		Name = "frm_nomore"
		Width = 692
		_shape1.Anchor = 11
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 696
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 563
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 130
		Lb_titlu_alb_b121.Caption = "Nomenclator ore"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Height = 27
		BUT_TERMIN1.Left = 662
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 8, ;
		DeleteMark = .F., ;
		Height = 396, ;
		Left = 5, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "v_nomore", ;
		Top = 38, ;
		Width = 681, ;
		Column1.ControlSource = "ordine", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 39, ;
		Column2.ControlSource = "comentariu", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 197, ;
		Column3.ControlSource = "ore", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 49, ;
		Column4.ControlSource = "inactiv", ;
		Column4.CurrentControl = "Check1", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Sparse = .F., ;
		Column4.Width = 38, ;
		Column5.ControlSource = "tabel", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Width = 104, ;
		Column6.ControlSource = "coloana1", ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .T., ;
		Column6.Width = 81, ;
		Column7.ControlSource = "coloana2", ;
		Column7.Name = "Column7", ;
		Column7.ReadOnly = .T., ;
		Column7.Width = 80, ;
		Column8.ControlSource = "totalzile", ;
		Column8.Name = "Column8", ;
		Column8.ReadOnly = .T., ;
		Column8.Sparse = .F., ;
		Column8.Width = 54
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ordine", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Tip ora", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Abrev.", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column4.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 6, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 71, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column4.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Inactiv", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column4.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column5.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Tabel", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column5.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column6.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Coloana 1", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column6.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column7.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Coloana 2", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column7.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column8.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 13, ;
		Name = "Check1", ;
		Top = 23, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column8.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Total zile", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 599, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 567, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 631, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomgrp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomgrp.ca_baza1.cfiltru=lcFiltru
		ponomgrp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_nomore
		
		Scatter Name loRec Blank
		loRec.totalzile = 1 
		Do Adauga_Modifica_Inregistrare With "nomore",loRec,,"INSERT",,"addora"
		 
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_nomore
		Scatter Name loRec
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Do Adauga_Modifica_Inregistrare With "nomore",loRec,loRec.id_nomore,"UPDATE",,"modora"
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_nomore
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "nomore",loRec.id_nomore
		This.actualizeaza_grid1()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_nomore_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_nomore1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox2" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 261
		Name = "frm_nomore_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 312
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 64
		Lb_titlu_alb_b121.Caption = "Ore"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 11
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 345
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 9
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Anchor = 9
		But_renunt1.Left = 314
		But_renunt1.Name = "But_renunt1"
		But_renunt1.TabIndex = 10
		But_renunt1.Top = 1
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Inactiv", ;
		ControlSource = "porec.inactiv", ;
		Left = 30, ;
		Name = "_checkbox1", ;
		TabIndex = 8, ;
		Top = 237
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_checkbox2' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Total zile", ;
		ControlSource = "porec.totalzile", ;
		Left = 30, ;
		Name = "_checkbox2", ;
		TabIndex = 7, ;
		Top = 216
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 30, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 44, ;
		Text_simplu1.ControlSource = "porec.ordine", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Ordine", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 30, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 72, ;
		Text_simplu1.ControlSource = "porec.comentariu", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Tip oră", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu3' AS clb_tx_simplu WITH ;
		Left = 30, ;
		Name = "Clb_tx_simplu3", ;
		TabIndex = 3, ;
		Top = 100, ;
		Text_simplu1.ControlSource = "porec.ore", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Abreviere", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu4' AS clb_tx_simplu WITH ;
		Left = 30, ;
		Name = "Clb_tx_simplu4", ;
		TabIndex = 4, ;
		Top = 128, ;
		Text_simplu1.ControlSource = "porec.tabel", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Tabel", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu5' AS clb_tx_simplu WITH ;
		Left = 30, ;
		Name = "Clb_tx_simplu5", ;
		TabIndex = 5, ;
		Top = 156, ;
		Text_simplu1.ControlSource = "porec.coloana1", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Coloana 1", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu6' AS clb_tx_simplu WITH ;
		Left = 30, ;
		Name = "Clb_tx_simplu6", ;
		TabIndex = 6, ;
		Top = 184, ;
		Text_simplu1.ControlSource = "porec.coloana2", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Coloana 2", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_nomore1' AS cus_odata_nomore WITH ;
		Left = 336, ;
		Name = "Cus_odata_nomore1", ;
		Top = 132
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		*!*	Do Case
		*!*	Case Empty(porec.tip_contract)
		*!*		Messagebox('Nu ati completat formatia!',0+48,"Atentie")
		*!*		This.clb_tx_simplu1._cbbase1.SetFocus()
		*!*		PLRETURN=.F.
		*!*	Otherwise
		
			PLRETURN=this.cus_odata_nomore1.salvare(This.OREC,This.NID)
			 
			
		*!*		ENDIF
		*!*	Endcase
		Return PLRETURN
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_nomore1.cactiune = tcActiune
		 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_nompop_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CUS_ODATA_NOMPOP1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 179
		Name = "frm_nompop_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 305
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 72
		Lb_titlu_alb_b121.Caption = "Definire poprire"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 7
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 343
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 5
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Anchor = 9
		But_renunt1.Left = 310
		But_renunt1.Name = "But_renunt1"
		But_renunt1.TabIndex = 6
		But_renunt1.Top = 1
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Sumă fixă", ;
		ControlSource = "porec.sumafixa", ;
		Left = 45, ;
		Name = "_checkbox1", ;
		TabIndex = 3, ;
		Top = 100
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_checkbox3' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Permanent", ;
		ControlSource = "porec.permanent", ;
		Left = 45, ;
		Name = "_checkbox3", ;
		TabIndex = 2, ;
		Top = 81
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Cb_tx_simplu1' AS cb_tx_simplu WITH ;
		Left = 39, ;
		Name = "Cb_tx_simplu1", ;
		TabIndex = 4, ;
		Top = 121, ;
		_cbbase1.ControlSource = "torec.nume_camp", ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "v_calcdin.nume_camp", ;
		_cbbase1.RowSourceType = 2, ;
		_lbbase1.Caption = "Se calculează din", ;
		_lbbase1.Left = 3, ;
		_lbbase1.Name = "_lbbase1", ;
		_lbbase1.Top = 6
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 39, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 48, ;
		Text_simplu1.ControlSource = "torec.denumire", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Denumire poprire", ;
		Lb_simplu1.Left = 2, ;
		Lb_simplu1.Name = "Lb_simplu1", ;
		Lb_simplu1.Top = 6
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'CUS_ODATA_NOMPOP1' AS cus_odata_nompop WITH ;
		Left = 12, ;
		Name = "CUS_ODATA_NOMPOP1", ;
		Top = 48
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		Do Case
		Case Empty(porec.denumire)
			Messagebox('Nu ati completat denumirea popririi!',0+48,"Atentie")
			This.clb_tx_simplu1._cbbase1.SetFocus()
			PLRETURN=.F.
		Otherwise
		
			PLRETURN=this.cus_odata_nompop1.salvare(This.OREC,This.NID)
		
		*!*		ENDIF
		Endcase
		Return PLRETURN
		
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_nompop1.cactiune = tcActiune
	ENDPROC

	PROCEDURE Cb_tx_simplu1._cbbase1.LostFocus
		porec.id_calcdin = v_calcdin.id_calcdin
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_nompopriri AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 460
		Name = "frm_nompopriri"
		Width = 490
		_shape1.Anchor = 11
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 492
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 360
		_shape2.Name = "_shape2"
		_shape2.Top = 1
		_shape2.Width = 131
		Lb_titlu_alb_b121.Caption = "Popriri"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 1
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 459
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 2
		BUT_TERMIN1.Top = 2
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 4, ;
		DeleteMark = .F., ;
		Height = 405, ;
		Left = 11, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "v_nompop", ;
		TabIndex = 3, ;
		Top = 39, ;
		Width = 468, ;
		Column1.ControlSource = "denumire", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 150, ;
		Column2.ControlSource = "permanent", ;
		Column2.CurrentControl = "Check1", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Sparse = .F., ;
		Column3.ControlSource = "nume_camp", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 132, ;
		Column4.ControlSource = "sumafixa", ;
		Column4.CurrentControl = "Check1", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Sparse = .F.
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Poprire", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		ControlSource = "permanent", ;
		Height = 17, ;
		Left = 19, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 107, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Permanent", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Se calc. din:", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		Alignment = 3, ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column4.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 62, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		Top = 119, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column4.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Suma fixa", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 396, ;
		Name = "But_modifica1", ;
		TabIndex = 5, ;
		Top = 2, ;
		Width = 29
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 364, ;
		Name = "But_nou1", ;
		TabIndex = 4, ;
		Top = 2
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 427, ;
		Name = "But_sterge1", ;
		TabIndex = 6, ;
		Top = 2
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponompop.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponompop.ca_baza1.cfiltru=lcFiltru
		ponompop.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
			thisform._grdrow1.SetFocus()
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		Do update_calcdin In update_roadef_sal.prg
		pniesire=0
		Select v_nompop
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Scatter Name loRec Blank
		Do Adauga_Modifica_Inregistrare With "nompop",loRec,,"INSERT",,"addpop"
		IF USED('v_calcdin')
			USE IN v_calcdin
		ENDIF 
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		Do update_calcdin In update_roadef_sal.prg
		pniesire=0
		Select v_nompop
		Scatter Name loRec
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Do Adauga_Modifica_Inregistrare With "nompop",loRec,loRec.id_popriri,"UPDATE",,"modpop"
		IF USED('v_calcdin')
			USE IN v_calcdin
		ENDIF 
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_nompop
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "nomspor",loRec.id_popriri
		This.actualizeaza_grid1()
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_nomtichete AS frm_termin OF "..\..\..\roasalspec\comun\clase\_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 197
		Name = "frm_nomtichete"
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Left = 324
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		Lb_titlu_alb_b121.Caption = "Tichete"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 345
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 3, ;
		DeleteMark = .F., ;
		FontName = "Arial Narrow", ;
		Height = 137, ;
		Left = 20, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "vnom_tichete", ;
		Top = 40, ;
		Width = 336, ;
		Column1.ControlSource = "denumire", ;
		Column1.FontName = "Arial Narrow", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 217, ;
		Column2.ControlSource = "valoare", ;
		Column2.FontName = "Arial Narrow", ;
		Column2.Format = "r", ;
		Column2.InputMask = "99.99", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 50, ;
		Column3.ControlSource = "inactiv", ;
		Column3.CurrentControl = "Check1", ;
		Column3.FontName = "Arial Narrow", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Sparse = .F., ;
		Column3.Width = 32
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Denumire", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Valoare", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 18, ;
		Name = "Check1", ;
		Top = 43, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Inactiv", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial Narrow", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 285, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 255, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 315, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomtic.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomtic.ca_baza1.cfiltru=lcFiltru
		ponomtic.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select vnom_tichete
		Scatter Name loRec Blank
		
		*!*	DEBUG
		*!*	SUSPEND 
		Do Adauga_Modifica_Inregistrare With "nomtichete",loRec,,"INSERT",,"addtic"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select vnom_tichete
		Scatter Name loRec
		
		Do Adauga_Modifica_Inregistrare With "nomtichete",loRec,loRec.id,"UPDATE",,"modtic"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT vnom_tichete
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "nomtichete",loRec.id
		this.actualizeaza_grid1()
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_nomtichete_nou AS frm_termin_renunt OF "..\..\..\roasalspec\comun\clase\_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_nomtichete1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 124
		Name = "frm_nomtichete_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 312
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 64
		Lb_titlu_alb_b121.Caption = "Tichete"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 346
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Anchor = 9
		But_renunt1.Left = 315
		But_renunt1.Name = "But_renunt1"
		But_renunt1.Top = 1
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Inactiv", ;
		ControlSource = "porec.inactiv", ;
		Height = 17, ;
		Left = 288, ;
		Name = "_checkbox1", ;
		TabIndex = 5, ;
		TabStop = .F., ;
		Top = 104, ;
		Width = 52
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 50, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 39, ;
		Text_simplu1.ControlSource = "porec.denumire", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Denumire", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 50, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 67, ;
		Text_simplu1.ControlSource = "porec.valoare", ;
		Text_simplu1.Format = "!Kr", ;
		Text_simplu1.InputMask = (get_mask(8,Gnpa)), ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Valoare", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_nomtichete1' AS cus_odata_nomtichete WITH ;
		Left = 14, ;
		Name = "Cus_odata_nomtichete1", ;
		Top = 79
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		Do Case
		Case Empty(porec.denumire)
			Messagebox('Nu ati completat denumirea tichetelor!',0+48,"Atentie")
			This.clb_tx_simplu1._cbbase1.SetFocus()
			PLRETURN=.F.
		Otherwise
		
			PLRETURN=this.cus_odata_nomtichete1.salvare(This.OREC,This.NID)
			
		*!*		ENDIF
		Endcase
		Return PLRETURN
		
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_nomtichete1.cactiune = tcActiune
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_nomture AS frm_termin OF "..\..\..\roasalspec\comun\clase\_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 265
		Name = "frm_nomture"
		Width = 440
		_shape1.Anchor = 11
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 443
		_shape2.Anchor = 9
		_shape2.Left = 376
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		Lb_titlu_alb_b121.Caption = "Tichete"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 1
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 404
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 3
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 3, ;
		DeleteMark = .F., ;
		FontName = "Arial Narrow", ;
		Height = 217, ;
		Left = 12, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "vnom_ture", ;
		TabIndex = 2, ;
		Top = 40, ;
		Width = 416, ;
		Column1.ControlSource = "denumire", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 211, ;
		Column2.ControlSource = "tura", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 68, ;
		Column3.ControlSource = "orastart", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 113
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Denumire", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Prescurtare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ora inceput", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		FontName = "Arial", ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		caction = do_modifica, ;
		Left = 343, ;
		Name = "But_modifica1", ;
		TabIndex = 5, ;
		Top = 1, ;
		Visible = .T.
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 312, ;
		Name = "But_nou1", ;
		TabIndex = 4, ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 374, ;
		Name = "But_sterge1", ;
		TabIndex = 6, ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomture.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomture.ca_baza1.cfiltru=lcFiltru
		ponomture.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select vnom_ture
		Scatter Name loRec Blank
		
		*!*	DEBUG
		*!*	SUSPEND 
		Do Adauga_Modifica_Inregistrare With "nomture",loRec,,"INSERT",,"addtura"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select vnom_ture
		Scatter Name loRec
		
		Do Adauga_Modifica_Inregistrare With "nomture",loRec,loRec.id_tura,"UPDATE",,"modture"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT vnom_ture
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "nomture",loRec.id
		this.actualizeaza_grid1()
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_nomture_nou AS frm_termin_renunt OF "..\..\..\roasalspec\comun\clase\_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_nomture1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu3" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 135
		Name = "frm_nomture_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 312
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 64
		Lb_titlu_alb_b121.Caption = "Ture de lucru"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 6
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 346
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 4
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Anchor = 9
		But_renunt1.Left = 315
		But_renunt1.Name = "But_renunt1"
		But_renunt1.TabIndex = 5
		But_renunt1.Top = 1
	*</PropValue>

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 50, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 39, ;
		Text_simplu1.ControlSource = "porec.denumire", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Denumire", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 50, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 67, ;
		Text_simplu1.ControlSource = "porec.tura", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.Left = 190, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 95, ;
		Lb_simplu1.Caption = "Prescurtare (minim 2 caractere)", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu3' AS clb_tx_simplu WITH ;
		Left = 50, ;
		Name = "Clb_tx_simplu3", ;
		TabIndex = 3, ;
		Top = 95, ;
		Text_simplu1.ControlSource = "porec.orastart", ;
		Text_simplu1.Format = "!K", ;
		Text_simplu1.Height = 23, ;
		Text_simplu1.InputMask = "XX:XX", ;
		Text_simplu1.Left = 190, ;
		Text_simplu1.Name = "Text_simplu1", ;
		Text_simplu1.Top = 3, ;
		Text_simplu1.Width = 95, ;
		Lb_simplu1.Caption = "Ora inceput:", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_nomture1' AS cus_odata_nomture WITH ;
		Left = 9, ;
		Name = "Cus_odata_nomture1", ;
		Top = 79
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE Activate
		IF ALLTRIM(this.cus_odata_nomture1.cactiune) = 'UPDATE'
			this.clb_tx_simplu1.text_simplu1.ReadOnly= .T.
			this.clb_tx_simplu2.text_simplu1.ReadOnly= .T.
			this.clb_tx_simplu3.text_simplu1.SetFocus
			
		ELSE 
			this.clb_tx_simplu1.text_simplu1.ReadOnly= .f.
			this.clb_tx_simplu2.text_simplu1.ReadOnly= .f.
		ENDIF 
	ENDPROC

	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		Do Case
		Case Empty(porec.denumire)
			Messagebox('Nu ati completat denumirea turei!',0+48,"Atentie")
			This.clb_tx_simplu1.text_simplu1.SetFocus()
			PLRETURN=.F.
		Case LEN(ALLTRIM(porec.tura))<2
			Messagebox('Prescutarea trebuie sa aiba cel putin DOUA caractere!',0+48,"Atentie")
			This.clb_tx_simplu2.text_simplu1.SetFocus()
			PLRETURN=.F.	
		Case Empty(porec.orastart)
			Messagebox('Nu ati completat ora de inceput!',0+48,"Atentie")
			This.clb_tx_simplu3.text_simplu1.SetFocus()
			PLRETURN=.F.
		Otherwise
		
			PLRETURN=this.cus_odata_nomture1.salvare(This.OREC,This.NID)
			
		*!*		ENDIF
		Endcase
		Return PLRETURN
		
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_nomture1.cactiune = tcActiune
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_resp_nou AS formtermin OF "_frm_base.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_resp1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox3" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 185
		Name = "frm_resp_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 310
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 65
		Lb_titlu_alb_b121.Caption = "Responsabil"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 8
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 344
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 7
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Inactiv", ;
		ControlSource = "porec.inactiv", ;
		Left = 54, ;
		Name = "_checkbox1", ;
		TabIndex = 6, ;
		Top = 160
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_checkbox2' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Ales declarații", ;
		ControlSource = "porec.ales_decl", ;
		Left = 54, ;
		Name = "_checkbox2", ;
		TabIndex = 4, ;
		Top = 128
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_checkbox3' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Ales documente resurse umane", ;
		ControlSource = "porec.ales_doc", ;
		Left = 54, ;
		Name = "_checkbox3", ;
		TabIndex = 5, ;
		Top = 144
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'But_renunt1' AS but_renunt WITH ;
		Anchor = 9, ;
		Left = 313, ;
		Name = "But_renunt1", ;
		TabIndex = 9, ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 43, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 40, ;
		Text_simplu1.ControlSource = "porec.nume", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Nume", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 43, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 68, ;
		Text_simplu1.ControlSource = "porec.prenume", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Prenume", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu3' AS clb_tx_simplu WITH ;
		Left = 43, ;
		Name = "Clb_tx_simplu3", ;
		TabIndex = 3, ;
		Top = 96, ;
		Text_simplu1.ControlSource = "porec.functia", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Funcția", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_resp1' AS cus_odata_resp WITH ;
		Left = 18, ;
		Name = "Cus_odata_resp1", ;
		Top = 147
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		LOCAL PLRETURN
		
		lccontrol = UPPER(this.ActiveControl.BaseClass )
		IF   INLIST(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.Activecontrol.controlsource
			&lcval=thisform.ActiveControl.value
		ENDIF 	
		
		
		Do Case
		Case Empty(porec.nume)
			Messagebox('Nu ati completat responsabilui!',0+48,"Atentie")
			this.clb_tx_simplu1.text_simplu1.SetFocus()
			
			plreturn=.F.
		
		OTHERWISE
					PLRETURN=This.cus_odata_resp1.salvare(This.OREC,This.NID)
		
		ENDCASE 
		
		Return PLRETURN
		
		
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_resp1.cactiune = tcActiune
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_resp_sal AS formtermin OF "_frm_base.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column4.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column5.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column6.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column6._checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 174
		Name = "frm_resp_sal"
		Width = 576
		_shape1.Anchor = 11
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 576
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 453
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 124
		Lb_titlu_alb_b121.Caption = "Responsabil"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 545
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 6, ;
		DeleteMark = .F., ;
		Height = 128, ;
		Left = 6, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "v_resp", ;
		Top = 36, ;
		Width = 558, ;
		Column1.ControlSource = "nume", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 123, ;
		Column2.ControlSource = "prenume", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 117, ;
		Column3.ControlSource = "functia", ;
		Column3.Name = "Column3", ;
		Column3.ReadOnly = .T., ;
		Column3.Width = 124, ;
		Column4.ControlSource = "ales_decl", ;
		Column4.CurrentControl = "Check1", ;
		Column4.Name = "Column4", ;
		Column4.ReadOnly = .T., ;
		Column4.Sparse = .F., ;
		Column4.Width = 53, ;
		Column5.ColumnOrder = 6, ;
		Column5.ControlSource = "Inactiv", ;
		Column5.CurrentControl = "Check1", ;
		Column5.Name = "Column5", ;
		Column5.ReadOnly = .T., ;
		Column5.Sparse = .F., ;
		Column5.Width = 38, ;
		Column6.ColumnOrder = 5, ;
		Column6.ControlSource = "ales_doc", ;
		Column6.Name = "Column6", ;
		Column6.ReadOnly = .T., ;
		Column6.Sparse = .F., ;
		Column6.Width = 55
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Nume", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Prenume", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Functia", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column4.Check1' AS checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Centered = .T., ;
		Height = 17, ;
		Left = 24, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		Top = 35, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column4.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ales decl.", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column5.Check1' AS checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Centered = .T., ;
		Height = 17, ;
		Left = 27, ;
		Name = "Check1", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		Top = 47, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column5.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Inactiv", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column6._checkbox1' AS _checkbox WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Centered = .T., ;
		Left = 36, ;
		Name = "_checkbox1", ;
		Top = 23
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column6.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ales doc.", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 487, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 457, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 516, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=poresp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		poResp.ca_baza1.cfiltru=lcFiltru
		poResp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_resp
		Scatter Name loRec Blank
		*!*	DEBUG
		*!*	SUSPEND 
		Do Adauga_Modifica_Inregistrare With "resp",loRec,,"INSERT",,"addresp"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_resp
		Scatter Name loRec
		Do Adauga_Modifica_Inregistrare With "resp",loRec,loRec.id_sresp,"UPDATE",,"modresp"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_Resp
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "resp",loRec.id_sresp
		
		this.actualizeaza_grid1()
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_salcoef AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_shape8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_shape3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_shape4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_shape5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_shape7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_shape6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lbSomAng" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txSomAng" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lbSanAng" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txSanAng" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lbCasAng" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txCasAng" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lblim1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txlim1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lblim2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txlim2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lbSomSoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txSomSoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lbSanSoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txSanSoc" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lbfaambp" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txfaambp" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txbase8" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txbase7" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txbase6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txbase5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lbCM" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txCm" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lbsalmin" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txsalmin" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lbsalmed" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txsalmed" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase14" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase13" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lbNrzile" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txNrZileF" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txNrzile" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txbase1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txbase2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txbase3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txbase4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txbase9" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="ck_coefautomat" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase12" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tx_coresarb" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase11" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tx_corew" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase10" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tx_corenoapte" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase15" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="txdiurnaneimp" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_lbbase16" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_txbase10" UniqueID="" Timestamp="" />

	*<PropValue>
		BorderStyle = 3
		DoCreate = .T.
		Height = 416
		Name = "frm_salcoef"
		Width = 650
		_shape1.Anchor = 11
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 648
		_shape1.ZOrderSet = 6
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 585
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 65
		_shape2.ZOrderSet = 8
		Lb_titlu_alb_b121.Caption = "Setare coeficienți lunari"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 32
		Lb_titlu_alb_b121.ZOrderSet = 9
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 619
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 25
		BUT_TERMIN1.Top = 1
		BUT_TERMIN1.ZOrderSet = 52
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Anchor = 9
		But_renunt1.Left = 587
		But_renunt1.Name = "But_renunt1"
		But_renunt1.TabIndex = 31
		But_renunt1.Top = 1
		But_renunt1.ZOrderSet = 53
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Se incadreaza in OUG 114/2018", ;
		ControlSource = "pocoef.oug114_2018", ;
		Height = 18, ;
		Left = 276, ;
		Name = "_checkbox1", ;
		TabIndex = 27, ;
		Top = 348, ;
		Width = 206, ;
		WordWrap = .T., ;
		ZOrderSet = 54
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT '_lbbase1' AS _lbbase WITH ;
		Caption = "Baza de calcul pentru concediu de îngrijirea copilului", ;
		Height = 50, ;
		Left = 4, ;
		Name = "_lbbase1", ;
		TabIndex = 50, ;
		Top = 268, ;
		Width = 128, ;
		WordWrap = .T., ;
		ZOrderSet = 42
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase10' AS _lbbase WITH ;
		Caption = "Ore noapte", ;
		FontName = "Arial Narrow", ;
		Left = 514, ;
		Name = "_lbbase10", ;
		TabIndex = 40, ;
		Top = 104, ;
		ZOrderSet = 55
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase11' AS _lbbase WITH ;
		Caption = "Ore weekend", ;
		FontName = "Arial Narrow", ;
		Left = 514, ;
		Name = "_lbbase11", ;
		TabIndex = 39, ;
		Top = 128, ;
		ZOrderSet = 55
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase12' AS _lbbase WITH ;
		Caption = "Ore sărbăt.", ;
		FontName = "Arial Narrow", ;
		Left = 514, ;
		Name = "_lbbase12", ;
		TabIndex = 42, ;
		Top = 152, ;
		ZOrderSet = 55
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase13' AS _lbbase WITH ;
		Caption = "( cu FNUASS )", ;
		Height = 18, ;
		Left = 353, ;
		Name = "_lbbase13", ;
		TabIndex = 60, ;
		Top = 270, ;
		Width = 89, ;
		ZOrderSet = 40
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase14' AS _lbbase WITH ;
		AutoSize = .T., ;
		Caption = "( cu FAAMBP )", ;
		Height = 18, ;
		Left = 353, ;
		Name = "_lbbase14", ;
		TabIndex = 59, ;
		Top = 293, ;
		Width = 91, ;
		ZOrderSet = 40
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase15' AS _lbbase WITH ;
		Caption = "Diurna neimpozabila /zi", ;
		Left = 9, ;
		Name = "_lbbase15", ;
		TabIndex = 56, ;
		Top = 238, ;
		ZOrderSet = 38
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase16' AS _lbbase WITH ;
		Caption = "Salariu minim brut studii superioare:", ;
		Left = 12, ;
		Name = "_lbbase16", ;
		TabIndex = 54, ;
		Top = 386, ;
		ZOrderSet = 36
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase2' AS _lbbase WITH ;
		Caption = "Coef. CAS gr.1 muncă", ;
		Left = 280, ;
		Name = "_lbbase2", ;
		TabIndex = 49, ;
		Top = 167, ;
		ZOrderSet = 44
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase3' AS _lbbase WITH ;
		Caption = "Coef. CAS gr.2 muncă", ;
		Left = 280, ;
		Name = "_lbbase3", ;
		TabIndex = 48, ;
		Top = 191, ;
		ZOrderSet = 46
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase4' AS _lbbase WITH ;
		Caption = "Coef. CAS gr.3 muncă", ;
		Left = 279, ;
		Name = "_lbbase4", ;
		TabIndex = 47, ;
		Top = 215, ;
		ZOrderSet = 48
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase5' AS _lbbase WITH ;
		Caption = "Cota FNUASS:", ;
		Left = 279, ;
		Name = "_lbbase5", ;
		TabIndex = 45, ;
		Top = 239, ;
		ZOrderSet = 32
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase6' AS _lbbase WITH ;
		AutoSize = .F., ;
		Caption = "Brut primă de vacanță", ;
		Height = 18, ;
		Left = 9, ;
		Name = "_lbbase6", ;
		TabIndex = 51, ;
		Top = 322, ;
		Width = 142, ;
		WordWrap = .T., ;
		ZOrderSet = 30
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase7' AS _lbbase WITH ;
		AutoSize = .F., ;
		Caption = "Net primă de vacanță", ;
		Height = 18, ;
		Left = 9, ;
		Name = "_lbbase7", ;
		TabIndex = 52, ;
		Top = 346, ;
		Width = 143, ;
		WordWrap = .T., ;
		ZOrderSet = 28
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase8' AS _lbbase WITH ;
		Caption = "Coef. din brut CO = Avans", ;
		Left = 276, ;
		Name = "_lbbase8", ;
		TabIndex = 46, ;
		Top = 324, ;
		ZOrderSet = 26
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_lbbase9' AS _lbbase WITH ;
		Caption = "C. fond garantare", ;
		Left = 281, ;
		Name = "_lbbase9", ;
		TabIndex = 38, ;
		Top = 73, ;
		ZOrderSet = 50
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT '_shape3' AS _shape WITH ;
		BackStyle = 0, ;
		Height = 84, ;
		Left = 3, ;
		Name = "_shape3", ;
		SpecialEffect = 0, ;
		Top = 40, ;
		Width = 269, ;
		ZOrderSet = 1
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="shape" />

	ADD OBJECT '_shape4' AS _shape WITH ;
		BackStyle = 0, ;
		Height = 224, ;
		Left = 270, ;
		Name = "_shape4", ;
		SpecialEffect = 0, ;
		Top = 40, ;
		Width = 243, ;
		ZOrderSet = 2
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="shape" />

	ADD OBJECT '_shape5' AS _shape WITH ;
		BackStyle = 0, ;
		Height = 142, ;
		Left = 3, ;
		Name = "_shape5", ;
		SpecialEffect = 0, ;
		Top = 122, ;
		Width = 269, ;
		ZOrderSet = 3
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="shape" />

	ADD OBJECT '_shape6' AS _shape WITH ;
		BackStyle = 0, ;
		Height = 57, ;
		Left = 3, ;
		Name = "_shape6", ;
		SpecialEffect = 0, ;
		Top = 262, ;
		Width = 510, ;
		ZOrderSet = 5
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="shape" />

	ADD OBJECT '_shape7' AS _shape WITH ;
		BackStyle = 0, ;
		Height = 57, ;
		Left = 3, ;
		Name = "_shape7", ;
		SpecialEffect = 0, ;
		Top = 317, ;
		Width = 510, ;
		ZOrderSet = 4
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="shape" />

	ADD OBJECT '_shape8' AS _shape WITH ;
		BackStyle = 0, ;
		Height = 334, ;
		Left = 511, ;
		Name = "_shape8", ;
		SpecialEffect = 0, ;
		Top = 40, ;
		Width = 137, ;
		ZOrderSet = 0
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="shape" />

	ADD OBJECT '_txbase1' AS _txbase WITH ;
		ControlSource = "pocoef.BAZA_INGR", ;
		Height = 23, ;
		InputMask = (get_mask(14,Gnps)), ;
		Left = 137, ;
		Name = "_txbase1", ;
		TabIndex = 9, ;
		Top = 281, ;
		Width = 101, ;
		ZOrderSet = 43
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT '_txbase10' AS _txbase WITH ;
		ControlSource = "pocoef.salminstudii", ;
		Height = 23, ;
		InputMask = (get_mask(14,Gnps)), ;
		Left = 235, ;
		Name = "_txbase10", ;
		TabIndex = 12, ;
		Top = 384, ;
		Width = 120, ;
		ZOrderSet = 37
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT '_txbase2' AS _txbase WITH ;
		ControlSource = "pocoef.c_cas1", ;
		Height = 23, ;
		Left = 438, ;
		Name = "_txbase2", ;
		TabIndex = 18, ;
		Top = 167, ;
		Width = 67, ;
		ZOrderSet = 45
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT '_txbase3' AS _txbase WITH ;
		ControlSource = "pocoef.c_cas2", ;
		Height = 23, ;
		Left = 438, ;
		Name = "_txbase3", ;
		TabIndex = 19, ;
		Top = 191, ;
		Width = 67, ;
		ZOrderSet = 47
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT '_txbase4' AS _txbase WITH ;
		ControlSource = "pocoef.c_cas3", ;
		Height = 23, ;
		Left = 438, ;
		Name = "_txbase4", ;
		TabIndex = 20, ;
		Top = 215, ;
		Width = 67, ;
		ZOrderSet = 49
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT '_txbase5' AS _txbase WITH ;
		ControlSource = "pocoef.FD_FNUASS", ;
		Height = 23, ;
		Left = 438, ;
		Name = "_txbase5", ;
		TabIndex = 21, ;
		Top = 239, ;
		Width = 67, ;
		ZOrderSet = 33
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT '_txbase6' AS _txbase WITH ;
		ControlSource = "pocoef.brutprimaco", ;
		Height = 23, ;
		InputMask = (get_mask(14,Gnps)), ;
		Left = 156, ;
		Name = "_txbase6", ;
		TabIndex = 10, ;
		Top = 322, ;
		Width = 101, ;
		ZOrderSet = 31
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT '_txbase7' AS _txbase WITH ;
		ControlSource = "pocoef.netprimaco", ;
		Height = 23, ;
		InputMask = (get_mask(14,Gnps)), ;
		Left = 156, ;
		Name = "_txbase7", ;
		TabIndex = 11, ;
		Top = 346, ;
		Width = 101, ;
		ZOrderSet = 29
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT '_txbase8' AS _txbase WITH ;
		ControlSource = "pocoef.coefavco", ;
		Height = 23, ;
		InputMask = "9.9999", ;
		Left = 439, ;
		Name = "_txbase8", ;
		TabIndex = 24, ;
		Top = 322, ;
		Width = 67, ;
		ZOrderSet = 27
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT '_txbase9' AS _txbase WITH ;
		ControlSource = "pocoef.C_FDGARANT", ;
		Height = 23, ;
		Left = 438, ;
		Name = "_txbase9", ;
		TabIndex = 14, ;
		Top = 71, ;
		Width = 67, ;
		ZOrderSet = 51
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'ck_coefautomat' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Se folosesc coef. de mai jos ptr. pontaje", ;
		ControlSource = "pocoef.fol_cstandard", ;
		Left = 514, ;
		Name = "ck_coefautomat", ;
		TabIndex = 26, ;
		Top = 44, ;
		Width = 121, ;
		WordWrap = .T., ;
		ZOrderSet = 54
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'lbCasAng' AS _lbbase WITH ;
		Caption = "Coef. CAS personal", ;
		Left = 9, ;
		Name = "lbCasAng", ;
		TabIndex = 35, ;
		Top = 97, ;
		ZOrderSet = 14
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT 'lbCM' AS _lbbase WITH ;
		Caption = "C. comision cărți muncă", ;
		Left = 280, ;
		Name = "lbCM", ;
		TabIndex = 53, ;
		Top = 143, ;
		ZOrderSet = 34
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT 'lbfaambp' AS _lbbase WITH ;
		Caption = "C. fond risc și accidente", ;
		Left = 280, ;
		Name = "lbfaambp", ;
		TabIndex = 44, ;
		Top = 121, ;
		ZOrderSet = 24
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT 'lblim1' AS _lbbase WITH ;
		Caption = "Limita 1 deducere:", ;
		Left = 9, ;
		Name = "lblim1", ;
		TabIndex = 36, ;
		Top = 129, ;
		ZOrderSet = 16
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT 'lblim2' AS _lbbase WITH ;
		Caption = "Limita 2 deducere:", ;
		Left = 9, ;
		Name = "lblim2", ;
		TabIndex = 37, ;
		Top = 153, ;
		ZOrderSet = 18
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT 'lbNrzile' AS _lbbase WITH ;
		Caption = "Nr. maxim zile CM plătite de angajator", ;
		Height = 50, ;
		Left = 263, ;
		Name = "lbNrzile", ;
		TabIndex = 58, ;
		Top = 265, ;
		Width = 86, ;
		WordWrap = .T., ;
		ZOrderSet = 40
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT 'lbsalmed' AS _lbbase WITH ;
		Caption = "Salariu mediu brut:", ;
		Left = 9, ;
		Name = "lbsalmed", ;
		TabIndex = 57, ;
		Top = 209, ;
		ZOrderSet = 38
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT 'lbsalmin' AS _lbbase WITH ;
		Caption = "Salariu minim brut:", ;
		Left = 9, ;
		Name = "lbsalmin", ;
		TabIndex = 55, ;
		Top = 185, ;
		ZOrderSet = 36
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT 'lbSanAng' AS _lbbase WITH ;
		Caption = "Coef. sănătate personal", ;
		Left = 9, ;
		Name = "lbSanAng", ;
		TabIndex = 34, ;
		Top = 73, ;
		ZOrderSet = 12
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT 'lbSanSoc' AS _lbbase WITH ;
		Caption = "C. sănătate societate", ;
		Left = 280, ;
		Name = "lbSanSoc", ;
		TabIndex = 43, ;
		Top = 97, ;
		ZOrderSet = 22
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT 'lbSomAng' AS _lbbase WITH ;
		Caption = "Coef. șomaj personal", ;
		Left = 9, ;
		Name = "lbSomAng", ;
		TabIndex = 33, ;
		Top = 48, ;
		ZOrderSet = 10
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT 'lbSomSoc' AS _lbbase WITH ;
		Caption = "C. șomaj societate", ;
		Left = 280, ;
		Name = "lbSomSoc", ;
		TabIndex = 41, ;
		Top = 49, ;
		ZOrderSet = 20
		*< END OBJECT: ClassLib="_lb_base.vcx" BaseClass="label" />

	ADD OBJECT 'tx_corenoapte' AS _txbase WITH ;
		Alignment = 1, ;
		ControlSource = "pocoef.c_orenoapte", ;
		Height = 23, ;
		InputMask = (get_mask(6,3)), ;
		Left = 595, ;
		Name = "tx_corenoapte", ;
		ReadOnly = .T., ;
		TabIndex = 28, ;
		Top = 102, ;
		Width = 48, ;
		ZOrderSet = 56
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'tx_coresarb' AS _txbase WITH ;
		Alignment = 1, ;
		ControlSource = "pocoef.c_oresupl", ;
		Height = 23, ;
		InputMask = (get_mask(6,3)), ;
		Left = 595, ;
		Name = "tx_coresarb", ;
		ReadOnly = .T., ;
		TabIndex = 30, ;
		Top = 150, ;
		Width = 48, ;
		ZOrderSet = 56
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'tx_corew' AS _txbase WITH ;
		Alignment = 1, ;
		ControlSource = "pocoef.c_orew", ;
		Height = 23, ;
		InputMask = (get_mask(6,3)), ;
		Left = 595, ;
		Name = "tx_corew", ;
		ReadOnly = .T., ;
		TabIndex = 29, ;
		Top = 126, ;
		Width = 48, ;
		ZOrderSet = 56
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'txCasAng' AS _txbase WITH ;
		ControlSource = "pocoef.c_casp", ;
		Height = 23, ;
		Left = 162, ;
		Name = "txCasAng", ;
		TabIndex = 3, ;
		Top = 95, ;
		Width = 67, ;
		ZOrderSet = 15
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'txCm' AS _txbase WITH ;
		ControlSource = "pocoef.c_munca", ;
		Height = 23, ;
		Left = 438, ;
		Name = "txCm", ;
		TabIndex = 17, ;
		Top = 143, ;
		Width = 67, ;
		ZOrderSet = 35
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'txdiurnaneimp' AS _txbase WITH ;
		Alignment = 1, ;
		ControlSource = "pocoef.diurnaneimp", ;
		Height = 23, ;
		InputMask = (get_mask(14,2)), ;
		Left = 162, ;
		Name = "txdiurnaneimp", ;
		TabIndex = 8, ;
		Top = 236, ;
		Width = 94, ;
		ZOrderSet = 39
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'txfaambp' AS _txbase WITH ;
		ControlSource = "pocoef.c_faambp", ;
		Height = 23, ;
		Left = 438, ;
		Name = "txfaambp", ;
		TabIndex = 16, ;
		Top = 119, ;
		Width = 67, ;
		ZOrderSet = 25
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'txlim1' AS _txbase WITH ;
		ControlSource = "pocoef.dedl1", ;
		Height = 23, ;
		InputMask = (get_mask(14,Gnps)), ;
		Left = 162, ;
		Name = "txlim1", ;
		TabIndex = 4, ;
		Top = 127, ;
		Width = 94, ;
		ZOrderSet = 17
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'txlim2' AS _txbase WITH ;
		ControlSource = "pocoef.dedl2", ;
		Height = 23, ;
		InputMask = (get_mask(14,Gnps)), ;
		Left = 162, ;
		Name = "txlim2", ;
		TabIndex = 5, ;
		Top = 151, ;
		Width = 94, ;
		ZOrderSet = 19
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'txNrzile' AS _txbase WITH ;
		ControlSource = "pocoef.ZILECMPLANG", ;
		Height = 23, ;
		Left = 449, ;
		Name = "txNrzile", ;
		TabIndex = 22, ;
		Top = 267, ;
		Width = 55, ;
		ZOrderSet = 41
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'txNrZileF' AS _txbase WITH ;
		ControlSource = "pocoef.ZILECMPLANGF", ;
		Height = 23, ;
		Left = 449, ;
		Name = "txNrZileF", ;
		TabIndex = 23, ;
		Top = 291, ;
		Width = 55, ;
		ZOrderSet = 41
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'txsalmed' AS _txbase WITH ;
		ControlSource = "pocoef.salmed", ;
		Height = 23, ;
		InputMask = (get_mask(14,Gnps)), ;
		Left = 162, ;
		Name = "txsalmed", ;
		TabIndex = 7, ;
		Top = 207, ;
		Width = 94, ;
		ZOrderSet = 39
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'txsalmin' AS _txbase WITH ;
		ControlSource = "pocoef.salmin", ;
		Height = 23, ;
		InputMask = (get_mask(14,Gnps)), ;
		Left = 162, ;
		Name = "txsalmin", ;
		TabIndex = 6, ;
		Top = 183, ;
		Width = 94, ;
		ZOrderSet = 37
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'txSanAng' AS _txbase WITH ;
		ControlSource = "pocoef.c_medp", ;
		Height = 23, ;
		Left = 162, ;
		Name = "txSanAng", ;
		TabIndex = 2, ;
		Top = 71, ;
		Width = 67, ;
		ZOrderSet = 13
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'txSanSoc' AS _txbase WITH ;
		ControlSource = "pocoef.c_meds", ;
		Height = 23, ;
		Left = 438, ;
		Name = "txSanSoc", ;
		TabIndex = 15, ;
		Top = 95, ;
		Width = 67, ;
		ZOrderSet = 23
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'txSomAng' AS _txbase WITH ;
		ControlSource = "pocoef.c_somp", ;
		Height = 23, ;
		Left = 162, ;
		Name = "txSomAng", ;
		TabIndex = 1, ;
		Top = 46, ;
		Width = 67, ;
		ZOrderSet = 11
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />

	ADD OBJECT 'txSomSoc' AS _txbase WITH ;
		ControlSource = "pocoef.c_soms", ;
		Height = 23, ;
		Left = 438, ;
		Name = "txSomSoc", ;
		TabIndex = 13, ;
		Top = 47, ;
		Width = 67, ;
		ZOrderSet = 21
		*< END OBJECT: ClassLib="_tx_base.vcx" BaseClass="textbox" />
	
	PROCEDURE Init
		DODEFAULT()
		If Thisform.ck_coefautomat.Value = 1
			Thisform.tx_corenoapte.ReadOnly = .F.
			Thisform.tx_coresarb.ReadOnly = .F.
			Thisform.tx_corew.ReadOnly = .F.
		Else
			Thisform.tx_corenoapte.ReadOnly = .T.
			Thisform.tx_coresarb.ReadOnly = .T.
			Thisform.tx_corew.ReadOnly = .T.
		ENDIF
		
		IF gnAn*12+GnLuna >= 2018*12+1
			thisform.lbsomang.Visible=.f.
			thisform.txsomAng.Visible = .f.
			thisform._lbbase1.Visible= .F.
			thisform._txbase1.Visible= .F.
			thisform.lbsomSoc.Caption='Contrib asiguratorie munca'
			thisform._lbbase9.Visible= .F.
			thisform._txbase9.Visible= .F.
			thisform.lbsansoc.Visible= .F.
			thisform.txsansoc.Visible= .F.
			thisform.lbfaambp.Visible= .F.
			thisform.txfaambp.Visible= .F.
			thisform.lbcm.Visible= .F.
			thisform.txcm.Visible= .F.
			thisform._lbbase2.Visible= .F.
			thisform._txbase2.Visible =.f.
			thisform._lbbase3.Visible= .F.
			thisform._txbase3.Visible= .F.
			thisform._lbbase4.Visible= .F.
			thisform._txbase4.Visible= .F.
			thisform._lbbase5.Visible= .F.
			thisform._txbase5.Visible= .F.
			
		ENDIF 
		
	ENDPROC

	PROCEDURE ck_coefautomat.InteractiveChange
		If This.Value = 1
			Thisform.tx_corenoapte.ReadOnly = .F.
			Thisform.tx_coresarb.ReadOnly = .F.
			Thisform.tx_corew.ReadOnly = .F.
		Else
			Thisform.tx_corenoapte.ReadOnly = .T.
			Thisform.tx_corenoapte.Value = 0
			Thisform.tx_coresarb.ReadOnly = .T.
			Thisform.tx_coresarb.Value = 0
			Thisform.tx_corew.ReadOnly = .T.
			Thisform.tx_corew.Value = 0
		Endif
	ENDPROC

	PROCEDURE ck_coefautomat.ProgrammaticChange
		This.InteractiveChange()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_sarbatori_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_sarbatori1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 115
		Name = "frm_sarbatori_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 312
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 65
		Lb_titlu_alb_b121.Caption = "Sărbători"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 5
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 345
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 3
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		BUT_RENUNT1.Anchor = 9
		BUT_RENUNT1.Left = 315
		BUT_RENUNT1.Name = "BUT_RENUNT1"
		BUT_RENUNT1.TabIndex = 4
		BUT_RENUNT1.Top = 1
	*</PropValue>

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 45, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 44, ;
		TEXT_SIMPLU1.ControlSource = "porec.data", ;
		TEXT_SIMPLU1.Format = "kd", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Data", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 45, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 72, ;
		TEXT_SIMPLU1.ControlSource = "porec.sarbatoare", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Sărbătoare", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_sarbatori1' AS cus_odata_sarbatori WITH ;
		Left = 344, ;
		Name = "Cus_odata_sarbatori1", ;
		Top = 36
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		Do Case
			Case Empty(porec.Data)
				aMessagebox('Nu ati completat data sarbatorii!',0+48,"Atentie")
				This.clb_tx_simplu1.text_simplu1.SetFocus()
				PLRETURN=.F.
			*!*	modificare	v 2.0.5
			CASE YEAR(porec.data) < gnAn
				amessagebox("Nu puteti introduce o data dintr-un an anterior!",48,"Atentie")
				This.clb_tx_simplu1.text_simplu1.SetFocus()
				plreturn = .F.
			CASE YEAR(porec.data) = gnAn+1 AND gnLuna <> 12
				amessagebox('Pentru a introduce o data din anul '+ALLTRIM(STR(gnAn+1,4)) + ;
					', trebuie sa intrati in luna decembrie din anul '+ALLTRIM(STR(gnAn,4)) + '!',48,"Atentie")
				This.clb_tx_simplu1.text_simplu1.SetFocus()
				plreturn = .F.
			CASE YEAR(porec.data) > gnAn+1
				amessagebox('Nu puteti introduce o data dintr-un an mai mare decat '+ALLTRIM(STR(gnAn+1,4))+'!',48,"Atentie")
				This.clb_tx_simplu1.text_simplu1.SetFocus()
				plreturn = .F.
			*!*	modificare	v 2.0.5	^
			Otherwise
				PLRETURN=This.cus_odata_sarbatori1.salvare(This.OREC,This.NID)
		Endcase
		Return PLRETURN
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_sarbatori1.cactiune = tcActiune
		 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_tabvechimi AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 250
		Name = "frm_tabvechimi"
		Width = 323
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 198
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 124
		Lb_titlu_alb_b121.Caption = "Grilă sporuri de vechime"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 290
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 11, ;
		ColumnCount = 3, ;
		DeleteMark = .F., ;
		Height = 206, ;
		Left = 9, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		RecordSource = "v_tabvechimi", ;
		Top = 36, ;
		Width = 305, ;
		Column1.ControlSource = "lim_inf", ;
		Column1.Name = "Column1", ;
		Column1.Width = 93, ;
		Column2.ControlSource = "lim_sup", ;
		Column2.Name = "Column2", ;
		Column2.Width = 101, ;
		Column3.ControlSource = "coef_vechi", ;
		Column3.Name = "Column3"
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Limita inferioara (ani)", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Limita superioara (ani)", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Coeficient (0,xx)", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 230, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 200, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 260, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomgrp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomgrp.ca_baza1.cfiltru=lcFiltru
		ponomgrp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_tabvechimi
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Scatter Name loRec Blank
		Do Adauga_Modifica_Inregistrare With "tabvechimi",loRec,,"INSERT",,"addvech"
		 
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_tabvechimi
		Scatter Name loRec
		*!*	pcNume = loRec.nume
		*!*	pcPrenume = loRec.prenume
		Do Adauga_Modifica_Inregistrare With "tabvechimi",loRec,loRec.id_tabvechime,"UPDATE",,"modvech"
		
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_tabvechimi
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "tabvechime",loRec.id_tabvechime
		This.actualizeaza_grid1()
	ENDPROC

	PROCEDURE inainte_de_do_termin
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomgrp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomgrp.ca_baza1.cfiltru=lcFiltru
		ponomgrp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_tabvechimi_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_tabvechime1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 147
		Name = "frm_tabvechimi_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 312
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 64
		Lb_titlu_alb_b121.Caption = "Grilă vechimi"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 6
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 345
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 4
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		BUT_RENUNT1.Anchor = 9
		BUT_RENUNT1.Left = 314
		BUT_RENUNT1.Name = "BUT_RENUNT1"
		BUT_RENUNT1.TabIndex = 5
		BUT_RENUNT1.Top = 1
	*</PropValue>

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 45, ;
		TEXT_SIMPLU1.ControlSource = "porec.lim_inf", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Limita inf.", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 73, ;
		TEXT_SIMPLU1.ControlSource = "porec.lim_sup", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Limita sup.", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu3' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_tx_simplu3", ;
		TabIndex = 3, ;
		Top = 101, ;
		TEXT_SIMPLU1.ControlSource = "porec.coef_vechi", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Coef. (0,xx)", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_tabvechime1' AS cus_odata_tabvechime WITH ;
		Left = 15, ;
		Name = "Cus_odata_tabvechime1", ;
		Top = 57
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		*!*	Do Case
		*!*	Case Empty(porec.tip_contract)
		*!*		Messagebox('Nu ati completat formatia!',0+48,"Atentie")
		*!*		This.clb_tx_simplu1._cbbase1.SetFocus()
		*!*		PLRETURN=.F.
		*!*	Otherwise
		
			PLRETURN=this.cus_odata_tabvechime1.salvare(This.OREC,This.NID)
			 
			
		*!*		ENDIF
		*!*	Endcase
		Return PLRETURN
		
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_tabvechime1.cactiune = tcActiune
		 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_tipctr AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Name = "frm_tipctr"
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 254
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 122
		Lb_titlu_alb_b121.Caption = "Tipuri de contract"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 344
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 3, ;
		DeleteMark = .F., ;
		Height = 200, ;
		Left = 22, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		RecordSource = "v_tipctr", ;
		Top = 39, ;
		Width = 335, ;
		Column1.ControlSource = "tip_contract", ;
		Column1.Name = "Column1", ;
		Column1.Width = 228, ;
		Column2.ControlSource = "ore", ;
		Column2.Name = "Column2", ;
		Column2.Width = 35, ;
		Column3.ControlSource = "inactiv", ;
		Column3.Name = "Column3", ;
		Column3.Width = 38
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Tip contract", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Ore/zi", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Inactiv", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 286, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 257, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 314, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=potipctr.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		potipctr.ca_baza1.cfiltru=lcFiltru
		potipctr.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
			thisform._grdrow1.SetFocus()
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		Do update_ore In update_roadef_sal.prg
		*!*	SELECT V_TRANSE
		*!*	BROWSE 
		pniesire=0
		Select v_tipctr
		Scatter Name loRec Blank
		Do Adauga_Modifica_Inregistrare With "tipctr",loRec,,"INSERT",,"addtip"
		
		IF USED('v_nomore')
			USE IN v_nomore
		ENDIF 
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		Do update_ore In update_roadef_sal.prg
		
		pniesire=0
		Select v_tipctr
		Scatter Name loRec 
		Do Adauga_Modifica_Inregistrare With "tipctr",loRec,loRec.id_tipctr,"UPDATE",,"modtip"
		
		IF USED('v_nomore')
			USE IN v_nomore
		ENDIF 
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_tipctr
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "tipctr",loRec.id_tipctr
		This.actualizeaza_grid1()
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_tipctr_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_tipctr1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cb_tx_simplu1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 133
		Name = "frm_tipctr_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 312
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 64
		Lb_titlu_alb_b121.Caption = "Tip contract"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 6
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 344
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 4
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		But_renunt1.Anchor = 9
		But_renunt1.Left = 314
		But_renunt1.Name = "But_renunt1"
		But_renunt1.TabIndex = 5
		But_renunt1.Top = 1
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Inactiv", ;
		ControlSource = "porec.inactiv", ;
		Left = 45, ;
		Name = "_checkbox1", ;
		TabIndex = 3, ;
		Top = 104
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Cb_tx_simplu1' AS cb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Cb_tx_simplu1", ;
		TabIndex = 2, ;
		Top = 69, ;
		_cbbase1.ControlSource = "porec.ore", ;
		_cbbase1.Name = "_cbbase1", ;
		_cbbase1.RowSource = "v_nomore.ore", ;
		_cbbase1.RowSourceType = 2, ;
		_lbbase1.Caption = "Ore / zi", ;
		_lbbase1.Name = "_lbbase1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 41, ;
		Text_simplu1.ControlSource = "porec.tip_contract", ;
		Text_simplu1.Name = "Text_simplu1", ;
		Lb_simplu1.Caption = "Tip contract", ;
		Lb_simplu1.Name = "Lb_simplu1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_tipctr1' AS cus_odata_tipctr WITH ;
		Left = 324, ;
		Name = "Cus_odata_tipctr1", ;
		Top = 108
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		Local PLRETURN
		
		lccontrol = Upper(This.ActiveControl.BaseClass )
		If   Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.ActiveControl.ControlSource
			&lcval=Thisform.ActiveControl.Value
		Endif
		
		Do Case
		Case Empty(porec.tip_contract)
			Messagebox('Nu ati completat formatia!',0+48,"Atentie")
			This.clb_tx_simplu1._cbbase1.SetFocus()
			PLRETURN=.F.
		Otherwise
		
			PLRETURN=this.cus_odata_tipctr1.salvare(This.OREC,This.NID)
			
		*!*		ENDIF
		Endcase
		Return PLRETURN
		
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_tipctr1.cactiune = tcActiune
	ENDPROC

	PROCEDURE Cb_tx_simplu1._cbbase1.LostFocus
		porec.id_ore = v_nomore.id_nomore
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_tipintret AS frm_termin OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column3.Check1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 250
		Name = "frm_tipintret"
		Width = 335
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 208
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 128
		Lb_titlu_alb_b121.Caption = "Tipuri întreținere persoane"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 304
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 3, ;
		DeleteMark = .F., ;
		Left = 6, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		RecordSource = "v_nomintret", ;
		Top = 41, ;
		Column1.ControlSource = "calitate", ;
		Column1.Name = "Column1", ;
		Column1.Width = 136, ;
		Column2.ControlSource = "c_ded", ;
		Column2.Name = "Column2", ;
		Column2.Width = 87, ;
		Column3.ControlSource = "coasigurat", ;
		Column3.CurrentControl = "Check1", ;
		Column3.Name = "Column3", ;
		Column3.Sparse = .F., ;
		Column3.Width = 60
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Calitate", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Coef. deducere", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column3.Check1' AS checkbox WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Height = 17, ;
		Left = 46, ;
		Name = "Check1", ;
		Top = 54, ;
		Width = 60
		*< END OBJECT: BaseClass="checkbox" />

	ADD OBJECT '_grdrow1.Column3.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Coasigurat", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column3.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1"
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Height = 27, ;
		Left = 243, ;
		Name = "But_modifica1", ;
		Top = 1, ;
		Width = 29
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 212, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 273, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=ponomgrp.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		ponomgrp.ca_baza1.cfiltru=lcFiltru
		ponomgrp.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_nomintret
		Scatter Name loRec Blank
		*!*	DEBUG
		*!*	SUSPEND 
		Do Adauga_Modifica_Inregistrare With "tipintret",loRec,,"INSERT",,"addintret"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_nomintret
		Scatter Name loRec
		Do Adauga_Modifica_Inregistrare With "tipintret",loRec,loRec.id_dedsupl,"UPDATE",,"modintret"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_nomintret
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "tipintret",loRec.id_dedsupl
		
		this.actualizeaza_grid1()
		
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_tipintret_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Clb_tx_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CUS_ODATA_TIPINTRET1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 141
		Name = "frm_tipintret_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_shape1.Anchor = 11
		_shape1.Name = "_shape1"
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 312
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 64
		Lb_titlu_alb_b121.Caption = "Tip întreținere"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 6
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 345
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 4
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		BUT_RENUNT1.Anchor = 9
		BUT_RENUNT1.Left = 315
		BUT_RENUNT1.Name = "BUT_RENUNT1"
		BUT_RENUNT1.TabIndex = 5
		BUT_RENUNT1.Top = 1
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Coasigurat", ;
		ControlSource = "porec.coasigurat", ;
		Left = 42, ;
		Name = "_checkbox1", ;
		TabIndex = 3, ;
		Top = 105
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 41, ;
		TEXT_SIMPLU1.ControlSource = "porec.calitate", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Calitatea:", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_tx_simplu2", ;
		TabIndex = 2, ;
		Top = 69, ;
		TEXT_SIMPLU1.ControlSource = "porec.c_ded", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Coef. deducere;", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'CUS_ODATA_TIPINTRET1' AS cus_odata_tipintret WITH ;
		Left = 21, ;
		Name = "CUS_ODATA_TIPINTRET1", ;
		Top = 66
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		LOCAL PLRETURN
		
		lccontrol = UPPER(this.ActiveControl.BaseClass )
		IF   INLIST(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.Activecontrol.controlsource
			&lcval=thisform.ActiveControl.value
		ENDIF 	
		
		
		Do Case
		Case Empty(porec.calitate)
			Messagebox('Nu ati completat calitatea!',0+48,"Atentie")
			this.clb_tx_simplu1.text_simplu1.SetFocus()
			
			plreturn=.F.
		
		OTHERWISE
		
			PLRETURN=This.cus_odata_tipintret1.salvare(This.OREC,This.NID)
		ENDCASE 
		
		Return PLRETURN
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_tipintret1.cactiune = tcActiune
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_transe AS formtermin OF "_frm_base.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />

	*<PropValue>
		BorderStyle = 3
		DoCreate = .T.
		Height = 331
		Name = "frm_transe"
		Width = 309
		_SHAPE1.Anchor = 11
		_SHAPE1.Name = "_SHAPE1"
		_SHAPE2.Anchor = 9
		_SHAPE2.Height = 29
		_SHAPE2.Left = 187
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		_SHAPE2.Width = 124
		LB_TITLU_ALB_B121.Caption = "Tranșe"
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 278
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 2, ;
		DeleteMark = .F., ;
		Height = 282, ;
		Left = 7, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "v_transe", ;
		Top = 42, ;
		Width = 293, ;
		Column1.ControlSource = "transa", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 198, ;
		Column2.ControlSource = "inactiv", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 37
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Transa", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Inactiv", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SelectedBackColor = 100,185,255
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 219, ;
		Name = "But_modifica1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 189, ;
		Name = "But_nou1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 249, ;
		Name = "But_sterge1", ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=potransa.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		potransa.ca_baza1.cfiltru=lcFiltru
		potransa.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_transe
		Scatter Name loRec Blank
		*!*	DEBUG
		*!*	SUSPEND 
		Do Adauga_Modifica_Inregistrare With "transe",loRec,,"INSERT",,"addtra"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_transe
		Scatter Name loRec
		Do Adauga_Modifica_Inregistrare With "transe",loRec,loRec.id_transa,"UPDATE",,"modtr"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_transe
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "transe",loRec.id_transa
		
		this.actualizeaza_grid1()
		
	ENDPROC

	PROCEDURE Init
		DODEFAULT()
		IF gnSAL_SPECIAL = 4 AND gnIdProgram = 9
			thisform.lb_titlu_alb_b121.Caption = 'Activitati'
			thisform._grdrow1.column1.header1.Caption = 'Activitate'
		ENDIF 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_transe_nou AS frm_termin_renunt OF "_frm_child.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Clb_tx_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Cus_odata_transe1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_checkbox1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*p: nid
		*p: orec
	*</DefinedPropArrayMethod>

	*<PropValue>
		DoCreate = .T.
		Height = 101
		Name = "frm_transe_nou"
		nid = .F.
		orec = .F.
		Width = 375
		_SHAPE1.Anchor = 11
		_SHAPE1.Name = "_SHAPE1"
		_SHAPE2.Anchor = 9
		_SHAPE2.Left = 303
		_SHAPE2.Name = "_SHAPE2"
		_SHAPE2.Top = 0
		LB_TITLU_ALB_B121.Caption = "Tranșa"
		LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
		LB_TITLU_ALB_B121.TabIndex = 5
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 343
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 3
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
		BUT_RENUNT1.Anchor = 9
		BUT_RENUNT1.Left = 310
		BUT_RENUNT1.Name = "BUT_RENUNT1"
		BUT_RENUNT1.TabIndex = 4
		BUT_RENUNT1.Top = 1
	*</PropValue>

	ADD OBJECT '_checkbox1' AS _checkbox WITH ;
		Alignment = 0, ;
		Caption = "Inactiv", ;
		ControlSource = "porec.inactiv", ;
		Left = 47, ;
		Name = "_checkbox1", ;
		TabIndex = 2, ;
		Top = 77
		*< END OBJECT: ClassLib="_baza.vcx" BaseClass="checkbox" />

	ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
		Left = 42, ;
		Name = "Clb_tx_simplu1", ;
		TabIndex = 1, ;
		Top = 41, ;
		TEXT_SIMPLU1.ControlSource = "porec.transa", ;
		TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
		LB_SIMPLU1.Caption = "Tranșa", ;
		LB_SIMPLU1.Name = "LB_SIMPLU1"
		*< END OBJECT: ClassLib="lb_tx.vcx" BaseClass="container" />

	ADD OBJECT 'Cus_odata_transe1' AS cus_odata_transe WITH ;
		Left = 14, ;
		Name = "Cus_odata_transe1", ;
		Top = 43
		*< END OBJECT: ClassLib="onom_sal.vcx" BaseClass="custom" />
	
	PROCEDURE inainte_de_do_termin
		LOCAL PLRETURN
		
		lccontrol = UPPER(this.ActiveControl.BaseClass )
		IF   INLIST(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
			lcval=This.Activecontrol.controlsource
			&lcval=thisform.ActiveControl.value
		ENDIF 	
		
		
		Do Case
		Case Empty(porec.transa)
			Messagebox('Nu ati completat numele transei!',0+48,"Atentie")
			this.clb_tx_simplu1.text_simplu1.SetFocus()
			
			plreturn=.F.
		
		OTHERWISE
					PLRETURN=This.cus_odata_transe1.salvare(This.OREC,This.NID)
		
		ENDCASE 
		
		Return PLRETURN
		
		
	ENDPROC

	PROCEDURE Init
		Lparameters toRec, tnId, tcActiune
		
		DoDefault()
		
		This.orec= toRec
		This.nid = tnId
		this.cus_odata_transe1.cactiune = tcActiune
		 
		IF gnSAL_SPECIAL = 4 AND gnIdProgram = 9
			thisform.lb_titlu_alb_b121.Caption='Activitate'
		 thisform.clb_tx_simplu1.lB_SIMPLU1.Caption='Denumire'
		ENDIF 
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_zileluc AS formtermin OF "_frm_base.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Lb_simplu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lb_simplu2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="_grdrow1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lb_simplu3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lb_simplu4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lb_simplu5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text5" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="BUT_RENUNT1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Lb_simplu6" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text6" UniqueID="" Timestamp="" />

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 500
		Name = "frm_zileluc"
		Width = 464
		_shape1.Anchor = 11
		_shape1.Height = 29
		_shape1.Left = 0
		_shape1.Name = "_shape1"
		_shape1.Top = 0
		_shape1.Width = 468
		_shape2.Anchor = 9
		_shape2.Height = 29
		_shape2.Left = 398
		_shape2.Name = "_shape2"
		_shape2.Top = 0
		_shape2.Width = 67
		Lb_titlu_alb_b121.Caption = "Ore / zile lucrătoare"
		Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
		Lb_titlu_alb_b121.TabIndex = 7
		BUT_TERMIN1.Anchor = 9
		BUT_TERMIN1.Left = 433
		BUT_TERMIN1.Name = "BUT_TERMIN1"
		BUT_TERMIN1.TabIndex = 5
		BUT_TERMIN1.Top = 1
		Gridsort1.Name = "Gridsort1"
	*</PropValue>

	ADD OBJECT '_grdrow1' AS _grdrow WITH ;
		Anchor = 15, ;
		ColumnCount = 2, ;
		DeleteMark = .F., ;
		Height = 432, ;
		Left = 12, ;
		Name = "_grdrow1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "v_sarbat", ;
		TabIndex = 12, ;
		Top = 60, ;
		Width = 288, ;
		Column1.ControlSource = "data", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column2.ControlSource = "sarbatoare", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 177
		*< END OBJECT: ClassLib="_grd_base.vcx" BaseClass="grid" />

	ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Data", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column1.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT '_grdrow1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Sarbatoare", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT '_grdrow1.Column2.Text1' AS textbox WITH ;
		BackColor = 255,255,255, ;
		BorderStyle = 0, ;
		ForeColor = 0,0,0, ;
		Margin = 0, ;
		Name = "Text1", ;
		ReadOnly = .T.
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
		Anchor = 9, ;
		Left = 241, ;
		Name = "But_modifica1", ;
		TabIndex = 18, ;
		Top = 30
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_nou1' AS but_nou WITH ;
		Anchor = 9, ;
		Left = 210, ;
		Name = "But_nou1", ;
		TabIndex = 17, ;
		Top = 30
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'BUT_RENUNT1' AS but_renunt WITH ;
		Anchor = 9, ;
		Left = 402, ;
		Name = "BUT_RENUNT1", ;
		TabIndex = 6, ;
		Top = 1
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
		Anchor = 9, ;
		Left = 271, ;
		Name = "But_sterge1", ;
		TabIndex = 19, ;
		Top = 30
		*< END OBJECT: ClassLib="cmd_butoane.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Lb_simplu1' AS lb_simplu WITH ;
		Anchor = 9, ;
		Caption = "Luna", ;
		FontBold = .T., ;
		Left = 309, ;
		Name = "Lb_simplu1", ;
		TabIndex = 8, ;
		Top = 70
		*< END OBJECT: ClassLib="lb.vcx" BaseClass="label" />

	ADD OBJECT 'Lb_simplu2' AS lb_simplu WITH ;
		Anchor = 9, ;
		Caption = "Anul", ;
		FontBold = .T., ;
		Left = 386, ;
		Name = "Lb_simplu2", ;
		TabIndex = 9, ;
		Top = 70
		*< END OBJECT: ClassLib="lb.vcx" BaseClass="label" />

	ADD OBJECT 'Lb_simplu3' AS lb_simplu WITH ;
		Anchor = 9, ;
		Caption = "Zile lucrătoare:", ;
		Left = 310, ;
		Name = "Lb_simplu3", ;
		TabIndex = 13, ;
		Top = 100
		*< END OBJECT: ClassLib="lb.vcx" BaseClass="label" />

	ADD OBJECT 'Lb_simplu4' AS lb_simplu WITH ;
		Anchor = 9, ;
		Caption = "Ore lucrătoare:", ;
		Left = 310, ;
		Name = "Lb_simplu4", ;
		TabIndex = 14, ;
		Top = 124
		*< END OBJECT: ClassLib="lb.vcx" BaseClass="label" />

	ADD OBJECT 'Lb_simplu5' AS lb_simplu WITH ;
		Anchor = 9, ;
		Caption = "Ore stas:", ;
		Left = 310, ;
		Name = "Lb_simplu5", ;
		TabIndex = 15, ;
		Top = 148
		*< END OBJECT: ClassLib="lb.vcx" BaseClass="label" />

	ADD OBJECT 'Lb_simplu6' AS lb_simplu WITH ;
		Anchor = 9, ;
		Caption = "Ore supl. / lună:", ;
		Left = 310, ;
		Name = "Lb_simplu6", ;
		TabIndex = 16, ;
		Top = 171
		*< END OBJECT: ClassLib="lb.vcx" BaseClass="label" />

	ADD OBJECT 'Text1' AS textbox WITH ;
		Anchor = 9, ;
		BorderStyle = 0, ;
		ControlSource = "gnluna", ;
		DisabledBackColor = 255,255,255, ;
		FontBold = .T., ;
		Left = 340, ;
		Name = "Text1", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 10, ;
		Top = 68, ;
		Width = 24
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text2' AS textbox WITH ;
		Anchor = 9, ;
		BorderStyle = 0, ;
		ControlSource = "gnan", ;
		DisabledBackColor = 255,255,255, ;
		FontBold = .T., ;
		Left = 417, ;
		Name = "Text2", ;
		ReadOnly = .T., ;
		SpecialEffect = 1, ;
		TabIndex = 11, ;
		Top = 68, ;
		Width = 36
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text3' AS textbox WITH ;
		Anchor = 9, ;
		ControlSource = "pnzileluc", ;
		Format = "k", ;
		Height = 23, ;
		Left = 396, ;
		Name = "Text3", ;
		TabIndex = 1, ;
		Top = 95, ;
		Width = 48
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text4' AS textbox WITH ;
		Anchor = 9, ;
		ControlSource = "pnoreluc", ;
		Format = "k", ;
		Height = 23, ;
		Left = 396, ;
		Name = "Text4", ;
		TabIndex = 2, ;
		Top = 120, ;
		Width = 48
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text5' AS textbox WITH ;
		Anchor = 9, ;
		ControlSource = "pnorestas", ;
		Format = "k", ;
		Height = 23, ;
		Left = 396, ;
		Name = "Text5", ;
		TabIndex = 3, ;
		Top = 145, ;
		Width = 48
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text6' AS textbox WITH ;
		Anchor = 9, ;
		ControlSource = "pnoresupluna", ;
		Format = "k", ;
		Height = 23, ;
		Left = 396, ;
		Name = "Text6", ;
		TabIndex = 4, ;
		Top = 168, ;
		Width = 48
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE actualizeaza_grid1
		LPARAMETERS pcFiltru
		LOCAL lcFiltru
		lcFiltru=pcFiltru
		IF EMPTY(lcFiltru)
			lcFiltru=posarbat.ca_baza1.cfiltru
		ENDIF
		save_grid_tag(thisform._grdrow1)
		posarbat.ca_baza1.cfiltru=lcFiltru
		posarbat.ca_baza1.afisare()
		restore_grid_tag(thisform._grdrow1)
		*!*	IF RECCOUNT('v_delegati')>0
			thisform._grdrow1.SetFocus()
		*!*	ELSE
		*!*		thisform.lb_delegati.SetFocus()
		*!*	ENDIF
		
	ENDPROC

	PROCEDURE do_adauga
		Private pniesire
		pniesire=0
		Select v_sarbat
		Scatter Name loRec Blank
		
		Do Adauga_Modifica_Inregistrare With "sarbatori",loRec,,"INSERT",,"addsarbat"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
	ENDPROC

	PROCEDURE do_modifica
		Private pniesire
		pniesire=0
		Select v_sarbat
		Scatter Name loRec
		
		Do Adauga_Modifica_Inregistrare With "sarbatori",loRec,loRec.id_sarbat,"UPDATE",,"modsarbat"
		If pniesire=1
			This.actualizeaza_grid1()
		Endif
		
		
	ENDPROC

	PROCEDURE do_sterge
		SELECT v_sarbat
		SCATTER NAME lorec
		Do STERGE_INREGISTRARE With "sarbatori",loRec.id_sarbat
		
		this.actualizeaza_grid1()
		
	ENDPROC

	PROCEDURE Init
		*!*	modificare	v 2.0.5
		DoDefault()
		Thisform._grdrow1.SetAll("DynamicForeColor","IIF(YEAR(data)=gnAn,RGB(0,0,0),RGB(0,0,255))","Column")
		*!*	modificare	v 2.0.5	^
	ENDPROC

	PROCEDURE Text3.LostFocus
		pnOreluc = pnZileluc * 8
		thisform.tEXT4.Refresh 
	ENDPROC

ENDDEFINE
