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

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Pageframe1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Command3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CMDTERMIN1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Command2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Command1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column2.Text1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: dezactiv
		*p: e1
		*p: e2
		*p: e3
	*</DefinedPropArrayMethod>

	*<PropValue>
		AutoCenter = .T.
		Caption = ""
		Closable = .F.
		ControlBox = .F.
		DoCreate = .T.
		HalfHeightCaption = .T.
		Height = 212
		MaxButton = .F.
		MinButton = .F.
		Movable = .F.
		Name = "cautalf"
		ShowTips = .T.
		Width = 341
		WindowState = 0
		WindowType = 1
	*</PropValue>

	ADD OBJECT 'CMDTERMIN1' AS cmdtermin WITH ;
		Height = 24, ;
		Left = 231, ;
		Name = "CMDTERMIN1", ;
		TabIndex = 3, ;
		Top = 178, ;
		Width = 80
		*< END OBJECT: ClassLib="..\..\cont2003\clase\ferestrebaza.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Command1' AS commandbutton WITH ;
		AutoSize = .F., ;
		Caption = "", ;
		FontBold = .T., ;
		Height = 24, ;
		Left = 23, ;
		Name = "Command1", ;
		Picture = ..\..\cont2003\grafice\new.bmp, ;
		StatusBarText = "Nume nou", ;
		TabIndex = 6, ;
		ToolTipText = "Nume nou", ;
		Top = 178, ;
		Width = 30
		*< END OBJECT: BaseClass="commandbutton" />

	ADD OBJECT 'Command2' AS commandbutton WITH ;
		Caption = "", ;
		FontBold = .T., ;
		Height = 24, ;
		Left = 85, ;
		Name = "Command2", ;
		Picture = ..\..\cont2003\grafice\edit1.bmp, ;
		StatusBarText = "Modificare", ;
		TabIndex = 4, ;
		ToolTipText = "Modificare", ;
		Top = 178, ;
		Width = 30
		*< END OBJECT: BaseClass="commandbutton" />

	ADD OBJECT 'Command3' AS commandbutton WITH ;
		Caption = "", ;
		FontBold = .T., ;
		Height = 24, ;
		Left = 54, ;
		Name = "Command3", ;
		Picture = ..\..\cont2003\grafice\delete.bmp, ;
		StatusBarText = "Stergere", ;
		TabIndex = 5, ;
		ToolTipText = "Stergere", ;
		Top = 178, ;
		Width = 30
		*< END OBJECT: BaseClass="commandbutton" />

	ADD OBJECT 'Grid1' AS grid WITH ;
		AllowHeaderSizing = .F., ;
		AllowRowSizing = .F., ;
		BackColor = 255,255,255, ;
		ColumnCount = 2, ;
		DeleteMark = .F., ;
		GridLineColor = 255,255,255, ;
		Height = 108, ;
		Left = 12, ;
		Name = "Grid1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "", ;
		ScrollBars = 2, ;
		TabIndex = 2, ;
		Top = 68, ;
		Width = 315, ;
		Column1.BackColor = 255,255,255, ;
		Column1.ControlSource = "", ;
		Column1.Format = "!", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 209, ;
		Column2.BackColor = 255,255,255, ;
		Column2.ControlSource = "", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Visible = .T., ;
		Column2.Width = 73
		*< END OBJECT: BaseClass="grid" />

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

	ADD OBJECT 'Grid1.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 'Grid1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Pageframe1' AS pageframe WITH ;
		ActivePage = 27, ;
		ErasePage = .T., ;
		Height = 214, ;
		Left = 3, ;
		Name = "Pageframe1", ;
		PageCount = 27, ;
		TabIndex = 1, ;
		Tabs = .T., ;
		TabStretch = 0, ;
		TabStyle = 0, ;
		Top = 2, ;
		Width = 336, ;
		Page1.Caption = "A", ;
		Page1.Name = "Page1", ;
		Page2.Caption = "B", ;
		Page2.Name = "Page2", ;
		Page3.Caption = "C", ;
		Page3.Name = "Page3", ;
		Page4.Caption = "D", ;
		Page4.Name = "Page4", ;
		Page5.Caption = "E", ;
		Page5.Name = "Page5", ;
		Page6.Caption = "F", ;
		Page6.Name = "Page6", ;
		Page7.Caption = "G", ;
		Page7.Name = "Page7", ;
		Page8.Caption = "H", ;
		Page8.Name = "Page8", ;
		Page9.Caption = "I", ;
		Page9.Name = "Page9", ;
		Page10.Caption = "J", ;
		Page10.Name = "Page10", ;
		Page11.Caption = "K", ;
		Page11.Name = "Page11", ;
		Page12.Caption = "L", ;
		Page12.Name = "Page12", ;
		Page13.Caption = "M", ;
		Page13.Name = "Page13", ;
		Page14.Caption = "N", ;
		Page14.Name = "Page14", ;
		Page15.Caption = "O", ;
		Page15.Name = "Page15", ;
		Page16.Caption = "P", ;
		Page16.Name = "Page16", ;
		Page17.Caption = "Q", ;
		Page17.Name = "Page17", ;
		Page18.Caption = "R", ;
		Page18.Name = "Page18", ;
		Page19.Caption = "S", ;
		Page19.Name = "Page19", ;
		Page20.Caption = "T", ;
		Page20.Name = "Page20", ;
		Page21.Caption = "U", ;
		Page21.Name = "Page21", ;
		Page22.Caption = "V", ;
		Page22.Name = "Page22", ;
		Page23.Caption = "W", ;
		Page23.Name = "Page23", ;
		Page24.Caption = "X", ;
		Page24.Name = "Page24", ;
		Page25.Caption = "Y", ;
		Page25.Name = "Page25", ;
		Page26.Caption = "Z", ;
		Page26.Name = "Page26", ;
		Page27.Caption = " ", ;
		Page27.Name = "Page27"
		*< END OBJECT: BaseClass="pageframe" />

	ADD OBJECT 'Shape1' AS shape WITH ;
		Height = 143, ;
		Left = 7, ;
		Name = "Shape1", ;
		SpecialEffect = 0, ;
		Top = 63, ;
		Width = 325
		*< END OBJECT: BaseClass="shape" />
	
	PROCEDURE dezactiv
		PARAMETERS L
		THISFORM.CMDTERMIN1.ENABLED=L
		if !L 
			THISFORM.COMMAND1.ENABLED=L
			THISFORM.COMMAND2.ENABLED=L
			THISFORM.COMMAND3.ENABLED=L
		ELSE
			THISFORM.COMMAND1.ENABLED=THIS.E1
			THISFORM.COMMAND2.ENABLED=THIS.E2
			THISFORM.COMMAND3.ENABLED=THIS.E3
		ENDIF
			
		
	ENDPROC

	PROCEDURE Show
		LPARAMETERS nStyle
		local c,n1,n2,n3,N4
		
		c=THISFORM.CAPTION
		n1='NUMELE FURNIZORULUI'
		n2='NUMELE CLIENTULUI'
		n3='MODIFICARI FURNIZORI'
		N4='MODIFICARI CLIENTI'
		
		lcTabel = ALLTRIM(thisform.grid1.RecordSource )
		LcCol = lcTabel + '.cod_fiscal'
		
		*!*	IF INLIST(c,n1,n2,n3,N4,'NUMELE GESTIUNII') OR TYPE(lcCol) # 'U'
		*!*		thisform.grid1.column2.visible=.t.
		*!*	endif
		
		do case
			*case inlist(c,n1,n3,n2,n4)
			CASE TYPE(lcCol) # 'U'
			  thisform.grid1.column2.controlsource='cod_fiscal'
			case c='NUMELE GESTIUNII'
			  thisform.grid1.column2.controlsource='GEST'
			  thisform.grid1.column2.HEADER1.CAPTION='Indicativ'
		
		endcase
		
		
		if !inlist(c,'FELUL DOCUMENTULUI',n3,N4)
			THIS.COMMAND3.ENABLED=.F.
			THIS.COMMAND2.ENABLED=.F.
		ENDIF
		*if inlist(c,n3,N4,'NUMELE LUCRARII')
		*	THIS.COMMAND1.ENABLED=.F.
		*ENDIF
		
		THIS.e1=THIS.COMMAND1.ENABLED
		THIS.e2=THIS.COMMAND2.ENABLED
		THIS.e3=THIS.COMMAND3.ENABLED
		
	ENDPROC

	PROCEDURE CMDTERMIN1.KeyPress
		LPARAMETERS nKeyCode, nShiftAltCtrl
		IF INKEY()=13 THEN
			THIS.CLICK
		ENDIF
	ENDPROC

	PROCEDURE CMDTERMIN1.Valid
		
		
		scatter memvar
		
		
	ENDPROC

	PROCEDURE CMDTERMIN1.When
		if eof() then 
			go top
		endif
		*
	ENDPROC

	PROCEDURE Command1.Click
		
		THISFORM.DEZACTIV(.F.)
		LOCAL c,CS
		c=THISFORM.CAPTION
		CS='onm.text1.controlsource="M.'+THISFORM.GRID1.COLUMN1.CONTROLSOURCE+'"'
		
		PcControlS = 'M.'+THISFORM.GRID1.COLUMN1.CONTROLSOURCE
		
		lcTabel = ALLTRIM(THISFORM.GRID1.RECORDSOURCE )
		LcCol = lcTabel + '.cod_fiscal'
		
		APPE BLANK
		*!*	IF INLIST(c,'NUMELE FURNIZORULUI','NUMELE CLIENTULUI')
		IF TYPE(LcCol) # 'U'
			ONM=CREATEOBJECT("NOUMODI_CODF")
			ONM.CAPTION='NUME NOU'
			ONM.text1.CONTROLSOURCE = PcControlS
			ONM.text2.CONTROLSOURCE = 'm.cod_fiscal'
			ONM.SHOW(1)
			IF BUTON = 1
				SELECT (lcTabel)
				APPEND BLANK 
				GATHER MEMVAR 
			ENDIF 
		ELSE
			IF LIKE('*GEST*',c)
				O=CREA('AFGEST')
				O.SHOW(1)
				IF BUTON = 1
					SELECT NUMEGEST
					SCATTER FIELDS NUMEGEST MEMVAR 
				ENDIF 
			ELSE
				ONM=CREATEOBJECT("NOUMODI")
				ONM.CAPTION='NUME NOU'
				&CS
				ONM.SHOW(1)
				IF BUTON = 1
					SELECT (NUMEBAZA)
					APPEND BLANK
					GATHER FIELDS &NUMECIMP MEMVAR 
				ENDIF 
			ENDIF 
			IF BUTON = 1
				SELECT (lcTabel)
				APPEND BLANK
				GATHER FIELDS &NUMECIMP MEMVAR 
			ENDIF 
		ENDIF
		THISFORM.DEZACTIV(.T.)
		SELECT (lcTabel)
		
		THISFORM.PAGEFRAME1.REFRESH
		
	ENDPROC

	PROCEDURE Command2.Click
		local CS,c
		CS='onm.text1.controlsource="M.'+THISFORM.GRID1.COLUMN1.CONTROLSOURCE+'"'
		c=thisform.caption
		lcsel = thisform.grid1.RecordSource 
		lcTabel = ALLTRIM(thisform.grid1.RecordSource )
		LcCol = lcTabel + '.cod_fiscal'
		SELECT (lcSel)
		lcsalv = &numecimp
		
		THISFORM.DEZACTIV(.F.)
		
		DO CASE
		 	CASE TYPE(LcCol) # 'U'
			ONM=CREATEOBJECT("NOUMODI_CODF")
			onm.caption='MODIFICARE'
			ONM.LABEL1.CAPTION="Modificati:"
			onm.text1.controlsource = numecimp
			onm.text2.controlsource='m.cod_fiscal'
			ONM.SHOW(1)
			
		  CASE INLIST(C,'MODIFICARI FURNIZORI','MODIFICARI CLIENTI')
			ONM=CREATEOBJECT("modianalit")
			onm.caption='MODIFICARE'
			onm.text1.controlsource='M.NUME'
			onm.text2.controlsource='m.cod_fiscal'
			ONM.SHOW(1)
		
		  OTHERWISE
			ONM=CREATEOBJECT("NOUMODI")
			onm.caption='MODIFICARE'
			&CS
			ONM.LABEL1.CAPTION="Modificati:"
			ONM.SHOW(1)
		
		ENDCASE
		
		IF buton = 1
			SELECT (NUMEBAZA)
			lccond = numecimp + ' =  ALLTRIM(lcsalv)'
			LOCATE FOR &lccond
			IF FOUND()
				GATHER FIELDS &numecimp MEMVAR 
				do mesaj with 'Modificarea s-a efectuat',''
			ENDIF 
		ENDIF 
		SELECT tnomenclator
		go bottom
		
		THISFORM.DEZACTIV(.T.)
		THISFORM.PAGEFRAME1.REFRESH
		
		
	ENDPROC

	PROCEDURE Command3.Click
		local CS
		CS='onm.text1.controlsource="M.'+THISFORM.GRID1.COLUMN1.CONTROLSOURCE+'"'
		
		THISFORM.DEZACTIV(.F.)
		
		ONM=CREATEOBJECT("NOUMODI")
		onm.caption='STERGERE'
		ONM.LABEL1.CAPTION="Stergeti:"
		&CS
		ONM.TEXT1.READONLY=.T.
		ONM.SHOW(1)
		IF buton = 1
			SELECT (NUMEBAZA)
			lccond = numecimp + ' = m.' + ALLTRIM(numecimp)
			LOCATE FOR &lccond
			IF FOUND()
				DELETE 
			ENDIF 
		ENDIF 
		
		SELECT tnomenclator
		go bottom
		
		THISFORM.DEZACTIV(.T.)
		THISFORM.PAGEFRAME1.REFRESH
	ENDPROC

	PROCEDURE Grid1.Column1.Text1.KeyPress
		LPARAMETERS nKey, nShiftAltCtrl
		LOCAL NP,T
		
			if nkey==13 then
				scatter memvar
				THISFORM.release
			endif
			
			IF nkey>=97 AND NKEY<=122
				S=UPPER(CHR(NKEY))
				NP=ALLTRIM(STR(NKEY-96))
				T='THISFORM.PAGEFRAME1.ACTIVEPAGE='+NP
				&T
				THISFORM.PAGEFRAME1.REFRESH
			ENDIF
			
			IF nkey>=65 AND NKEY<=90
				S=UPPER(CHR(NKEY))
				NP=ALLTRIM(STR(NKEY-64))
				T='THISFORM.PAGEFRAME1.ACTIVEPAGE='+NP
				&T
				THISFORM.PAGEFRAME1.REFRESH
			ENDIF
			
			IF nkey==32
				S=' '
				THISFORM.PAGEFRAME1.ACTIVEPAGE=27
				THISFORM.PAGEFRAME1.REFRESH
			ENDIF
	ENDPROC

	PROCEDURE Grid1.Init
		LOCAL LB
		CIMP=ALLTRIM(THISFORM.GRID1.COLUMN1.CONTROLSOURCE)
		*!*	L="SET FILTER TO !deleted() and left(" + CIMP + ",2)#'  '"
		*!*	&L
		
	ENDPROC

	PROCEDURE Pageframe1.Init
		PUBLIC S
		S=" "
		
	ENDPROC

	PROCEDURE Pageframe1.Page1.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page10.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page11.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page12.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page13.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page14.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page15.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page16.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page17.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page18.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page19.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page2.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page20.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page21.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page22.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page23.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page24.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page25.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page26.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page27.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page3.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page4.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page5.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page6.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page7.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page8.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page9.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Refresh
		LOCAL L,L1
		CIMP=ALLTRIM(THISFORM.GRID1.COLUMN1.CONTROLSOURCE)
		L="SET FILTER TO !deleted() and left("+CIMP+",5)#space(5)"
		L1=L+" AND upper(left("+CIMP+",1))==upper(S)"
		
		IF S==" " THEN
			&L
			ELSE
			&L1
		ENDIF
		GO TOP
		thisform.grid1.setfocus
	ENDPROC

ENDDEFINE

DEFINE CLASS cautalf_ AS form 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Pageframe1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Bandabloc1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Command3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Command2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Command1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CMDTERMIN1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Titlufrumos1" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: dezactiv
		*p: capt
		*p: e1
		*p: e2
		*p: e3
	*</DefinedPropArrayMethod>

	*<PropValue>
		AutoCenter = .T.
		BackColor = 255,255,255
		BorderStyle = 1
		capt =  
		Caption = ""
		Closable = .F.
		ControlBox = .F.
		DoCreate = .T.
		HalfHeightCaption = .F.
		Height = 289
		MaxButton = .F.
		MinButton = .F.
		Movable = .F.
		Name = "cautalf"
		ShowTips = .T.
		Width = 339
		WindowState = 0
		WindowType = 1
	*</PropValue>

	ADD OBJECT 'Bandabloc1' AS bandabloc WITH ;
		Height = 32, ;
		Left = 0, ;
		Name = "Bandabloc1", ;
		Top = 0, ;
		Width = 337, ;
		Banda21.Name = "Banda21", ;
		Blocbuton1.Height = 32, ;
		Blocbuton1.Left = 300, ;
		Blocbuton1.Name = "Blocbuton1", ;
		Blocbuton1.Top = 0, ;
		Blocbuton1.Width = 32
		*< END OBJECT: ClassLib="..\..\comun\clase\baza.vcx" BaseClass="container" />

	ADD OBJECT 'CMDTERMIN1' AS cmdtermin WITH ;
		Height = 29, ;
		Left = 301, ;
		Name = "CMDTERMIN1", ;
		Picture = ..\..\comun\grafice\terminat1.bmp, ;
		SpecialEffect = 2, ;
		TabIndex = 3, ;
		Top = 2, ;
		Width = 30, ;
		IMBUTON1.Height = 29, ;
		IMBUTON1.Name = "IMBUTON1", ;
		IMBUTON1.Width = 27, ;
		COMMAND1.Name = "COMMAND1"
		*< END OBJECT: ClassLib="ferestrebaza.vcx" BaseClass="container" />

	ADD OBJECT 'Command1' AS commandbutton WITH ;
		AutoSize = .F., ;
		Caption = "", ;
		FontBold = .T., ;
		Height = 29, ;
		Left = 9, ;
		Name = "Command1", ;
		Picture = ..\..\comun\grafice\nou1.bmp, ;
		SpecialEffect = 2, ;
		StatusBarText = "Nume nou", ;
		TabIndex = 6, ;
		ToolTipText = "Nume nou", ;
		Top = 251, ;
		Width = 30
		*< END OBJECT: BaseClass="commandbutton" />

	ADD OBJECT 'Command2' AS commandbutton WITH ;
		Caption = "", ;
		FontBold = .T., ;
		Height = 29, ;
		Left = 70, ;
		Name = "Command2", ;
		Picture = ..\..\comun\grafice\modifica1.bmp, ;
		SpecialEffect = 2, ;
		StatusBarText = "Modificare", ;
		TabIndex = 4, ;
		ToolTipText = "Modificare", ;
		Top = 251, ;
		Width = 30
		*< END OBJECT: BaseClass="commandbutton" />

	ADD OBJECT 'Command3' AS commandbutton WITH ;
		Caption = "", ;
		FontBold = .T., ;
		Height = 29, ;
		Left = 40, ;
		Name = "Command3", ;
		Picture = ..\..\comun\grafice\sterge1.bmp, ;
		SpecialEffect = 2, ;
		StatusBarText = "Stergere", ;
		TabIndex = 5, ;
		ToolTipText = "Stergere", ;
		Top = 251, ;
		Width = 30
		*< END OBJECT: BaseClass="commandbutton" />

	ADD OBJECT 'Grid1' AS grid WITH ;
		AllowHeaderSizing = .F., ;
		AllowRowSizing = .F., ;
		BackColor = 255,255,255, ;
		ColumnCount = 2, ;
		DeleteMark = .F., ;
		GridLineColor = 255,255,255, ;
		Height = 147, ;
		Left = 12, ;
		Name = "Grid1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		RecordSource = "", ;
		ScrollBars = 2, ;
		TabIndex = 2, ;
		Top = 96, ;
		Width = 315, ;
		Column1.BackColor = 255,255,255, ;
		Column1.ControlSource = "", ;
		Column1.Format = "!", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 209, ;
		Column2.BackColor = 255,255,255, ;
		Column2.ControlSource = "", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Visible = .F., ;
		Column2.Width = 73
		*< END OBJECT: BaseClass="grid" />

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

	ADD OBJECT 'Grid1.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 'Grid1.Column2.Header1' AS header WITH ;
		Alignment = 2, ;
		Caption = "Cod fiscal", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

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

	ADD OBJECT 'Pageframe1' AS pageframe WITH ;
		ActivePage = 27, ;
		ErasePage = .T., ;
		Height = 255, ;
		Left = 2, ;
		Name = "Pageframe1", ;
		PageCount = 27, ;
		TabIndex = 1, ;
		Tabs = .T., ;
		TabStretch = 0, ;
		TabStyle = 0, ;
		Top = 33, ;
		Width = 336, ;
		Page1.BackColor = 255,255,255, ;
		Page1.Caption = "A", ;
		Page1.Name = "Page1", ;
		Page2.BackColor = 255,255,255, ;
		Page2.Caption = "B", ;
		Page2.Name = "Page2", ;
		Page3.BackColor = 255,255,255, ;
		Page3.Caption = "C", ;
		Page3.Name = "Page3", ;
		Page4.BackColor = 255,255,255, ;
		Page4.Caption = "D", ;
		Page4.Name = "Page4", ;
		Page5.BackColor = 255,255,255, ;
		Page5.Caption = "E", ;
		Page5.Name = "Page5", ;
		Page6.BackColor = 255,255,255, ;
		Page6.Caption = "F", ;
		Page6.Name = "Page6", ;
		Page7.BackColor = 255,255,255, ;
		Page7.Caption = "G", ;
		Page7.Name = "Page7", ;
		Page8.BackColor = 255,255,255, ;
		Page8.Caption = "H", ;
		Page8.Name = "Page8", ;
		Page9.BackColor = 255,255,255, ;
		Page9.Caption = "I", ;
		Page9.Name = "Page9", ;
		Page10.BackColor = 255,255,255, ;
		Page10.Caption = "J", ;
		Page10.Name = "Page10", ;
		Page11.BackColor = 255,255,255, ;
		Page11.Caption = "K", ;
		Page11.Name = "Page11", ;
		Page12.BackColor = 255,255,255, ;
		Page12.Caption = "L", ;
		Page12.Name = "Page12", ;
		Page13.BackColor = 255,255,255, ;
		Page13.Caption = "M", ;
		Page13.Name = "Page13", ;
		Page14.BackColor = 255,255,255, ;
		Page14.Caption = "N", ;
		Page14.Name = "Page14", ;
		Page15.BackColor = 255,255,255, ;
		Page15.Caption = "O", ;
		Page15.Name = "Page15", ;
		Page16.BackColor = 255,255,255, ;
		Page16.Caption = "P", ;
		Page16.Name = "Page16", ;
		Page17.BackColor = 255,255,255, ;
		Page17.Caption = "Q", ;
		Page17.Name = "Page17", ;
		Page18.BackColor = 255,255,255, ;
		Page18.Caption = "R", ;
		Page18.Name = "Page18", ;
		Page19.BackColor = 255,255,255, ;
		Page19.Caption = "S", ;
		Page19.Name = "Page19", ;
		Page20.BackColor = 255,255,255, ;
		Page20.Caption = "T", ;
		Page20.Name = "Page20", ;
		Page21.BackColor = 255,255,255, ;
		Page21.Caption = "U", ;
		Page21.Name = "Page21", ;
		Page22.BackColor = 255,255,255, ;
		Page22.Caption = "V", ;
		Page22.Name = "Page22", ;
		Page23.BackColor = 255,255,255, ;
		Page23.Caption = "W", ;
		Page23.Name = "Page23", ;
		Page24.BackColor = 255,255,255, ;
		Page24.Caption = "X", ;
		Page24.Name = "Page24", ;
		Page25.BackColor = 255,255,255, ;
		Page25.Caption = "Y", ;
		Page25.Name = "Page25", ;
		Page26.BackColor = 255,255,255, ;
		Page26.Caption = "Z", ;
		Page26.Name = "Page26", ;
		Page27.BackColor = 255,255,255, ;
		Page27.Caption = " ", ;
		Page27.Name = "Page27"
		*< END OBJECT: BaseClass="pageframe" />

	ADD OBJECT 'Shape1' AS shape WITH ;
		BackStyle = 0, ;
		Height = 158, ;
		Left = 7, ;
		Name = "Shape1", ;
		SpecialEffect = 0, ;
		Top = 91, ;
		Width = 325
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Titlufrumos1' AS titlufrumos WITH ;
		Caption = "", ;
		Height = 32, ;
		Left = 6, ;
		Name = "Titlufrumos1", ;
		Top = 4, ;
		Width = 261
		*< END OBJECT: ClassLib="..\..\comun\clase\baza.vcx" BaseClass="label" />
	
	PROCEDURE dezactiv
		PARAMETERS L
		THISFORM.CMDTERMIN1.ENABLED=L
		if !L 
		*!*		THISFORM.COMMAND1.ENABLED=L
		*!*		THISFORM.COMMAND2.ENABLED=L
		*!*		THISFORM.COMMAND3.ENABLED=L
			THISFORM.COMMAND1.visible=L
			THISFORM.COMMAND2.visible=L
			THISFORM.COMMAND3.visible=L
		ELSE
			THISFORM.COMMAND1.visible=THIS.E1
			THISFORM.COMMAND2.visible=THIS.E2
			THISFORM.COMMAND3.visible=THIS.E3
		ENDIF
			
		
	ENDPROC

	PROCEDURE Show
		LPARAMETERS nStyle
		local c,n1,n2,n3,N4
		*c=THISFORM.CAPTION
		c=UPPER(THISFORM.CAPT)
		n1='NUMELE FURNIZORULUI'
		n2='NUMELE CLIENTULUI'
		n3='MODIFICARI FURNIZORI'
		N4='MODIFICARI CLIENTI'
		thisform.titlufrumos1.Caption=c
		
		
		IF INLIST(UPPER(c),n1,n2,n3,N4,'NUMELE GESTIUNII','NUMELE SECTIEI')
			thisform.grid1.column2.visible=.t.
		endif
		
		do case
			case inlist(c,n1,n3,n2,n4)
			  thisform.grid1.column2.controlsource='cod_fiscal'
			case c='NUMELE GESTIUNII'
			  thisform.grid1.column2.controlsource='GEST'
			  thisform.grid1.column2.HEADER1.CAPTION='Indicativ'
			case c='NUMELE SECTIEI'
			  thisform.grid1.column2.controlsource='ID_SECTIE'
			  thisform.grid1.column2.HEADER1.CAPTION='Indicativ'
		endcase
		
		*	case inlist(c,n2,n4)
		*	  thisform.grid1.column2.controlsource='cod_fiscal'
		
		if !inlist(c,'FELUL DOCUMENTULUI',n3,N4)
			THIS.COMMAND3.visible=.F.
			THIS.COMMAND2.visible=.F.
		ENDIF
		*if inlist(c,n3,N4,'NUMELE LUCRARII')
		*	THIS.COMMAND1.ENABLED=.F.
		*ENDIF
		
		THIS.e1=THIS.COMMAND1.visible
		THIS.e2=THIS.COMMAND2.visible
		THIS.e3=THIS.COMMAND3.visible
	ENDPROC

	PROCEDURE Command1.Click
		THISFORM.DEZACTIV(.F.)
		local c,CS
		c=UPPER(THISFORM.CAPT)
		CS='onm.text1.controlsource="M.'+THISFORM.GRID1.COLUMN1.CONTROLSOURCE+'"'
		
		APPE BLANK
		IF INLIST(c,'NUMELE FURNIZORULUI','NUMELE CLIENTULUI')
			ONM=CREATEOBJECT("NOUMODI_CODF")
			onm.caption='NUME NOU'
			onm.text1.controlsource='M.NUME'
		*	if c=='NUMELE FURNIZORULUI'
				onm.text2.controlsource='m.cod_fiscal'
		*	endif
		*	if c=='NUMELE CLIENTULUI'
		*		onm.text2.controlsource='m.cod_fiscal'
		*	endif
			ONM.SHOW(1)
		
		   ELSE
		   if like('*GEST*',C)
		   	O=CREA('AFGEST')
		   	O.SHOW(1)
		   ENDIF
			ONM=CREATEOBJECT("NOUMODI")
			onm.caption='NUME NOU'
			&CS
			ONM.SHOW(1)
		ENDIF
		THISFORM.DEZACTIV(.T.)
		THISFORM.PAGEFRAME1.REFRESH
	ENDPROC

	PROCEDURE Command2.Click
		local CS,c
		CS='onm.text1.controlsource="M.'+THISFORM.GRID1.COLUMN1.CONTROLSOURCE+'"'
		c=UPPER(thisform.caption)
		
		THISFORM.DEZACTIV(.F.)
		
		DO CASE
		  CASE INLIST(C,'NUMELE FURNIZORULUI','NUMELE CLIENTULUI')
			ONM=CREATEOBJECT("NOUMODI_CODF")
			onm.caption='MODIFICARE'
			ONM.LABEL1.CAPTION="Modificati:"
			onm.text1.controlsource='M.NUME'
			if INLIST(C,'NUMELE FURNIZORULUI')
				onm.text2.controlsource='m.cod_fiscal'
			endif
			ONM.SHOW(1)
			
		  CASE INLIST(C,'MODIFICARI FURNIZORI','MODIFICARI CLIENTI')
			ONM=CREATEOBJECT("modianalit")
			onm.caption='MODIFICARE'
		*	onm.text1.controlsource='M.NUME'
			if INLIST(C,'MODIFICARI FURNIZORI','MODIFICARI CLIENTI')
				onm.text2.controlsource='m.cod_fiscal'
			endif
		*	if INLIST(C,'MODIFICARI CLIENTI')
		*		onm.text2.controlsource='m.cod_fisc'
		*	endif
		
			ONM.SHOW(1)
		
		*	SCATTER MEMVAR
		*	codnou=m.cod_fiscal
			if buton==1
				THISFORM.RELEASE
				do mesaj with 'Modificarea s-a efectuat',''
			endif
			
		  OTHERWISE
			ONM=CREATEOBJECT("NOUMODI")
			onm.caption='MODIFICARE'
			&CS
			ONM.LABEL1.CAPTION="Modificati:"
			ONM.SHOW(1)
		
		ENDCASE
		
		THISFORM.DEZACTIV(.T.)
		THISFORM.PAGEFRAME1.REFRESH
		
		
	ENDPROC

	PROCEDURE Command3.Click
		local CS
		CS='onm.text1.controlsource="M.'+THISFORM.GRID1.COLUMN1.CONTROLSOURCE+'"'
		
		THISFORM.DEZACTIV(.F.)
		
		ONM=CREATEOBJECT("NOUMODI")
		onm.caption='STERGERE'
		ONM.LABEL1.CAPTION="Stergeti:"
		&CS
		ONM.TEXT1.READONLY=.T.
		ONM.SHOW(1)
		go bottom
		
		THISFORM.DEZACTIV(.T.)
		THISFORM.PAGEFRAME1.REFRESH
	ENDPROC

	PROCEDURE Grid1.Column1.Text1.KeyPress
		LPARAMETERS nKey, nShiftAltCtrl
		LOCAL NP,T
		
			if nkey==13 then
				scatter memvar
				THISFORM.release
			endif
			
			IF nkey>=97 AND NKEY<=122
				S=UPPER(CHR(NKEY))
				NP=ALLTRIM(STR(NKEY-96))
				T='THISFORM.PAGEFRAME1.ACTIVEPAGE='+NP
				&T
				THISFORM.PAGEFRAME1.REFRESH
			ENDIF
			
			IF nkey>=65 AND NKEY<=90
				S=UPPER(CHR(NKEY))
				NP=ALLTRIM(STR(NKEY-64))
				T='THISFORM.PAGEFRAME1.ACTIVEPAGE='+NP
				&T
				THISFORM.PAGEFRAME1.REFRESH
			ENDIF
			
			IF nkey==32
				S=' '
				THISFORM.PAGEFRAME1.ACTIVEPAGE=27
				THISFORM.PAGEFRAME1.REFRESH
			ENDIF
	ENDPROC

	PROCEDURE Grid1.Init
		LOCAL L
		CIMP=THISFORM.GRID1.COLUMN1.CONTROLSOURCE
		L="SET FILTER TO !deleted() and left("+CIMP+",2)#'  '"
		&L
		
	ENDPROC

	PROCEDURE Pageframe1.Init
		PUBLIC S
		S=" "
		
	ENDPROC

	PROCEDURE Pageframe1.Page1.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page10.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page11.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page12.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page13.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page14.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page15.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page16.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page17.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page18.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page19.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page2.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page20.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page21.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page22.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page23.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page24.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page25.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page26.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page27.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page3.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page4.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page5.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page6.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page7.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page8.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Page9.Click
		S=THIS.CAPTION
		THISFORM.REFRESH
	ENDPROC

	PROCEDURE Pageframe1.Refresh
		LOCAL L,L1
		CIMP=THISFORM.GRID1.COLUMN1.CONTROLSOURCE
		L="SET FILTER TO !deleted() and left("+CIMP+",5)#space(5)"
		L1=L+" AND upper(left("+CIMP+",1))==upper(S)"
		
		IF S==" " THEN
			&L
			ELSE
			&L1
		ENDIF
		GO TOP
		thisform.grid1.setfocus
	ENDPROC

ENDDEFINE

DEFINE CLASS cautalfa AS cautalf OF "caut.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

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

	*<PropValue>
		DoCreate = .T.
		Height = 257
		KeyPreview = .T.
		Name = "cautalfa"
		Width = 341
		Pageframe1.ErasePage = .T.
		Pageframe1.Height = 250
		Pageframe1.Left = 3
		Pageframe1.Name = "Pageframe1"
		Pageframe1.Page1.Name = "Page1"
		Pageframe1.Page10.Name = "Page10"
		Pageframe1.Page11.Name = "Page11"
		Pageframe1.Page12.Name = "Page12"
		Pageframe1.Page13.Name = "Page13"
		Pageframe1.Page14.Name = "Page14"
		Pageframe1.Page15.Name = "Page15"
		Pageframe1.Page16.Name = "Page16"
		Pageframe1.Page17.Name = "Page17"
		Pageframe1.Page18.Name = "Page18"
		Pageframe1.Page19.Name = "Page19"
		Pageframe1.Page2.Name = "Page2"
		Pageframe1.Page20.Name = "Page20"
		Pageframe1.Page21.Name = "Page21"
		Pageframe1.Page22.Name = "Page22"
		Pageframe1.Page23.Name = "Page23"
		Pageframe1.Page24.Name = "Page24"
		Pageframe1.Page25.Name = "Page25"
		Pageframe1.Page26.Name = "Page26"
		Pageframe1.Page27.Name = "Page27"
		Pageframe1.Page3.Name = "Page3"
		Pageframe1.Page4.Name = "Page4"
		Pageframe1.Page5.Name = "Page5"
		Pageframe1.Page6.Name = "Page6"
		Pageframe1.Page7.Name = "Page7"
		Pageframe1.Page8.Name = "Page8"
		Pageframe1.Page9.Name = "Page9"
		Pageframe1.TabIndex = 3
		Pageframe1.Top = 2
		Pageframe1.Width = 336
		Shape1.Height = 182
		Shape1.Left = 7
		Shape1.Name = "Shape1"
		Shape1.Top = 60
		Shape1.Width = 325
		Command3.Left = 54
		Command3.Name = "Command3"
		Command3.TabIndex = 6
		Command3.Top = 211
		CMDTERMIN1.Left = 231
		CMDTERMIN1.Name = "CMDTERMIN1"
		CMDTERMIN1.TabIndex = 4
		CMDTERMIN1.Top = 211
		Command2.Left = 85
		Command2.Name = "Command2"
		Command2.TabIndex = 5
		Command2.Top = 211
		Command1.Left = 23
		Command1.Name = "Command1"
		Command1.TabIndex = 7
		Command1.ToolTipText = "Nume nou CTRL+N"
		Command1.Top = 211
		Grid1.Column1.Header1.Name = "Header1"
		Grid1.Column1.Name = "Column1"
		Grid1.Column1.Text1.Name = "Text1"
		Grid1.Column2.Header1.Name = "Header1"
		Grid1.Column2.Name = "Column2"
		Grid1.Column2.Text1.Name = "Text1"
		Grid1.Left = 12
		Grid1.Name = "Grid1"
		Grid1.TabIndex = 2
		Grid1.Top = 99
	*</PropValue>

	ADD OBJECT 'CMDRENUNT1' AS cmdrenunt WITH ;
		Height = 24, ;
		Left = 144, ;
		Name = "CMDRENUNT1", ;
		Top = 211, ;
		Visible = .F.
		*< END OBJECT: ClassLib="..\..\cont2003\clase\ferestrebaza.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Label1' AS label WITH ;
		Caption = "Tastati primele litere:", ;
		Height = 17, ;
		Left = 16, ;
		Name = "Label1", ;
		TabIndex = 8, ;
		Top = 74, ;
		Width = 120, ;
		WordWrap = .T.
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'tex' AS textbox WITH ;
		Alignment = 0, ;
		ControlSource = "tex", ;
		Format = "!t", ;
		Height = 23, ;
		Left = 145, ;
		Name = "tex", ;
		TabIndex = 1, ;
		Top = 70, ;
		Width = 180
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE Init
		SET ESCAPE On
		
	ENDPROC

	PROCEDURE KeyPress
		LPARAMETERS nKeyCode, nShiftAltCtrl
		
		IF NKEYCODE=14&&ALT+N
		THISFORM.COMMAND1.CLICK
		ENDIF
		
		
	ENDPROC

	PROCEDURE Release
		SET ESCAPE OFF
		
		
	ENDPROC

	PROCEDURE CMDRENUNT1.Valid
		buton=2
	ENDPROC

	PROCEDURE CMDTERMIN1.Valid
		buton=1
	ENDPROC

	PROCEDURE Command1.Click
		dodefault()
		*!*	IF buton=1
		*!*		VARIAB='M.'+THISFORM.GRID1.COLUMN1.CONTROLSOURCE
		*!*		*WAIT WINDOW VARIAB
		*!*		*TEX1=&VARIAB
		*!*		TEX=&VARIAB
		*!*	ELSE 
		*!*		*TEX1=''
		*!*		TEX=''
		*!*	ENDIF 
		thisform.tex.SetFocus 
		*THISFORM.GRID1.REFRESH
		
	ENDPROC

	PROCEDURE Pageframe1.Init
		PUBLIC S,TEX1
		S=" "
		tex=''
		TEX1=''
		
	ENDPROC

	PROCEDURE Pageframe1.Refresh
		LOCAL L,L1,T
		
		CIMP=THISFORM.GRID1.COLUMN1.CONTROLSOURCE
		
		IF EMPTY(tex)
			T=THISFORM.GRID1.RECORDSOURCE
			L="SET FILTER TO !deleted() and left("+M.CIMP+",5)#space(5)"
			L1=L+" AND upper(left("+M.CIMP+",1))==upper(S)"
		
			SELE &T
			IF S==" " THEN
				&L
			ELSE
				&L1
			ENDIF
		
		ELSE
			L='set filter to UPPER(LEFT('+M.CIMP+',LEN(tex)))==upper(tex)'
			&L
		ENDIF
		
		GO TOP
		THISFORM.GRID1.REFRESH
		
	ENDPROC

	PROCEDURE tex.InteractiveChange
		TEX = UPPER(ALLTRIM(this.Value))
		thisform.pageframe1.refresh
	ENDPROC

	PROCEDURE tex.KeyPress
		LPARAMETERS nKeyCode, nShiftAltCtrl
		
		*!*	DO CASE
		*!*	CASE (NKEYCODE>=48 AND NKEYCODE<=57) OR (NKEYCODE>=65 AND NKEYCODE<=90) OR (NKEYCODE>=97 AND NKEYCODE<=122) OR NKEYCODE=32 OR NKEYCODE=46
		*!*		TEX1=upper(TEX1+CHR(NKEYCODE))
		*!*		TEX=TEX1
		*!*	CASE NKEYCODE=127 && or NKEYCODE=7
		*!*		TEX1=LEFT(tex,LEN(tex)-1)
		*!*		TEX=TEX1
		*!*	CASE NKEYCODE=7
		*!*		TEX1=''
		*!*		TEX=TEX1
		*!*		THIS.REFRESH
		*!*	CASE NKEYCODE=13
		*!*		TEX=TEX1
		*!*		THIS.REFRESH
		*!*	ENDCASE
		
		*!*	thisform.pageframe1.refresh
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cautalfa_ AS cautalf OF "caut.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

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

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		Height = 294
		KeyPreview = .T.
		Name = "cautalfa"
		Width = 340
		Pageframe1.ErasePage = .T.
		Pageframe1.Height = 262
		Pageframe1.Left = 3
		Pageframe1.Name = "Pageframe1"
		Pageframe1.Page1.Name = "Page1"
		Pageframe1.Page10.Name = "Page10"
		Pageframe1.Page11.Name = "Page11"
		Pageframe1.Page12.Name = "Page12"
		Pageframe1.Page13.Name = "Page13"
		Pageframe1.Page14.Name = "Page14"
		Pageframe1.Page15.Name = "Page15"
		Pageframe1.Page16.Name = "Page16"
		Pageframe1.Page17.Name = "Page17"
		Pageframe1.Page18.Name = "Page18"
		Pageframe1.Page19.Name = "Page19"
		Pageframe1.Page2.Name = "Page2"
		Pageframe1.Page20.Name = "Page20"
		Pageframe1.Page21.Name = "Page21"
		Pageframe1.Page22.Name = "Page22"
		Pageframe1.Page23.Name = "Page23"
		Pageframe1.Page24.Name = "Page24"
		Pageframe1.Page25.Name = "Page25"
		Pageframe1.Page26.Name = "Page26"
		Pageframe1.Page27.Name = "Page27"
		Pageframe1.Page3.Name = "Page3"
		Pageframe1.Page4.Name = "Page4"
		Pageframe1.Page5.Name = "Page5"
		Pageframe1.Page6.Name = "Page6"
		Pageframe1.Page7.Name = "Page7"
		Pageframe1.Page8.Name = "Page8"
		Pageframe1.Page9.Name = "Page9"
		Pageframe1.TabIndex = 3
		Pageframe1.Top = 32
		Pageframe1.Width = 336
		Pageframe1.ZOrderSet = 0
		Shape1.Height = 199
		Shape1.Left = 7
		Shape1.Name = "Shape1"
		Shape1.Top = 92
		Shape1.Width = 325
		Shape1.ZOrderSet = 1
		Grid1.Column1.Header1.Name = "Header1"
		Grid1.Column1.Name = "Column1"
		Grid1.Column1.Text1.Name = "Text1"
		Grid1.Column2.Header1.Name = "Header1"
		Grid1.Column2.Name = "Column2"
		Grid1.Column2.Text1.Name = "Text1"
		Grid1.Height = 129
		Grid1.Left = 12
		Grid1.Name = "Grid1"
		Grid1.TabIndex = 2
		Grid1.Top = 128
		Grid1.Width = 315
		Grid1.ZOrderSet = 2
		Bandabloc1.Banda21.Name = "Banda21"
		Bandabloc1.Blocbuton1.Height = 32
		Bandabloc1.Blocbuton1.Left = 268
		Bandabloc1.Blocbuton1.Name = "Blocbuton1"
		Bandabloc1.Blocbuton1.Top = 0
		Bandabloc1.Blocbuton1.Visible = .F.
		Bandabloc1.Blocbuton1.Width = 62
		Bandabloc1.Height = 32
		Bandabloc1.Left = 0
		Bandabloc1.Name = "Bandabloc1"
		Bandabloc1.Top = 0
		Bandabloc1.Width = 336
		Bandabloc1.ZOrderSet = 3
		Command3.Left = 42
		Command3.Name = "Command3"
		Command3.Top = 258
		Command3.ZOrderSet = 4
		Command2.Left = 72
		Command2.Name = "Command2"
		Command2.Top = 258
		Command2.ZOrderSet = 5
		Command1.Left = 11
		Command1.Name = "Command1"
		Command1.Top = 258
		Command1.ZOrderSet = 6
		CMDTERMIN1.COMMAND1.Name = "COMMAND1"
		CMDTERMIN1.IMBUTON1.Height = 29
		CMDTERMIN1.IMBUTON1.Name = "IMBUTON1"
		CMDTERMIN1.IMBUTON1.Width = 27
		CMDTERMIN1.Name = "CMDTERMIN1"
		CMDTERMIN1.Top = 1
		CMDTERMIN1.ZOrderSet = 7
		Titlufrumos1.Caption = "aaa"
		Titlufrumos1.Height = 32
		Titlufrumos1.Left = 3
		Titlufrumos1.Name = "Titlufrumos1"
		Titlufrumos1.Top = 1
		Titlufrumos1.Width = 261
		Titlufrumos1.ZOrderSet = 11
	*</PropValue>

	ADD OBJECT 'CMDRENUNT1' AS cmdrenunt WITH ;
		Left = 271, ;
		Name = "CMDRENUNT1", ;
		Top = 1, ;
		ZOrderSet = 10, ;
		IMBUTON1.Height = 26, ;
		IMBUTON1.Name = "IMBUTON1", ;
		IMBUTON1.Width = 26, ;
		COMMAND1.Name = "COMMAND1"
		*< END OBJECT: ClassLib="ferestrebaza.vcx" BaseClass="container" />

	ADD OBJECT 'Label1' AS label WITH ;
		BackStyle = 0, ;
		Caption = "Tastati primele litere:", ;
		FontName = "Comic Sans MS", ;
		FontSize = 8, ;
		Height = 17, ;
		Left = 16, ;
		Name = "Label1", ;
		TabIndex = 8, ;
		Top = 106, ;
		Width = 120, ;
		WordWrap = .T., ;
		ZOrderSet = 9
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'tex' AS textbox WITH ;
		Alignment = 0, ;
		ControlSource = "tex", ;
		Format = "!", ;
		Height = 23, ;
		Left = 145, ;
		Name = "tex", ;
		TabIndex = 1, ;
		Top = 102, ;
		Width = 180, ;
		ZOrderSet = 8
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE Init
		SET ESCAPE On
		
	ENDPROC

	PROCEDURE KeyPress
		LPARAMETERS nKeyCode, nShiftAltCtrl
		IF NKEYCODE=14&&ALT+N
		THISFORM.COMMAND1.CLICK
		ENDIF
		
	ENDPROC

	PROCEDURE Release
		SET ESCAPE OFF
	ENDPROC

	PROCEDURE Pageframe1.Init
		PUBLIC S,TEX1,cimp,tex
		S=" "
		tex=''
		TEX1=''
	ENDPROC

	PROCEDURE Pageframe1.Refresh
		LOCAL L,L1,T
		
		if empty(tex)
		CIMP=THISFORM.GRID1.COLUMN1.CONTROLSOURCE
		T=THISFORM.GRID1.RECORDSOURCE
		L="SET FILTER TO !deleted() and left("+CIMP+",5)#space(5)"
		L1=L+" AND upper(left("+CIMP+",1))==upper(S)"
		
		SELE &T
		IF S==" " THEN
			&L
			ELSE
			&L1
		ENDIF
		
		else
		l='set filter to UPPER(LEFT('+cimp+',LEN(tex)))==upper(tex)'
		&l
		endif
		
		GO TOP
		thisform.grid1.refresh
	ENDPROC

	PROCEDURE tex.KeyPress
		LPARAMETERS nKeyCode, nShiftAltCtrl
		DO CASE
		CASE (NKEYCODE>=48 AND NKEYCODE<=57) OR (NKEYCODE>=65 AND NKEYCODE<=90) OR (NKEYCODE>=97 AND NKEYCODE<=122) OR NKEYCODE=32
			TEX1=upper(TEX1+CHR(NKEYCODE))
			TEX=TEX1
		CASE NKEYCODE=7 OR NKEYCODE=127
			TEX1=''
			TEX=TEX1
			THIS.REFRESH
		CASE NKEYCODE=13
			TEX=TEX1
			THIS.REFRESH
		ENDCASE
		
		
		thisform.pageframe1.refresh
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cautcont AS cautintre OF "caut.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Combo3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Combo1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CMDRENUNT1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 145
		Name = "cautcont"
		Width = 320
		SHAPE1.Height = 67
		SHAPE1.Left = 18
		SHAPE1.Name = "SHAPE1"
		SHAPE1.Top = 8
		SHAPE1.Width = 284
		SHAPE1.ZOrderSet = 0
		Label1.Left = 37
		Label1.Name = "Label1"
		Label1.TabIndex = 6
		Label1.Top = 18
		Label1.ZOrderSet = 1
		Text1.Left = 576
		Text1.Name = "Text1"
		Text1.TabIndex = 4
		Text1.Top = 12
		Text1.Visible = .F.
		Text1.ZOrderSet = 2
		LABEL2.Left = 37
		LABEL2.Name = "LABEL2"
		LABEL2.TabIndex = 7
		LABEL2.Top = 48
		LABEL2.ZOrderSet = 3
		Text2.Left = 576
		Text2.Name = "Text2"
		Text2.TabIndex = 5
		Text2.Top = 40
		Text2.Visible = .F.
		Text2.ZOrderSet = 4
		Terminat1.Command1.Name = "Command1"
		Terminat1.Imbuton1.Height = 27
		Terminat1.Imbuton1.Name = "Imbuton1"
		Terminat1.Imbuton1.Width = 30
		Terminat1.Left = 276
		Terminat1.Name = "Terminat1"
		Terminat1.Top = 108
	*</PropValue>

	ADD OBJECT 'CMDRENUNT1' AS cmdrenunt WITH ;
		Left = 240, ;
		Name = "CMDRENUNT1", ;
		Top = 108
		*< END OBJECT: ClassLib="ferestrebaza.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Combo1' AS combobox WITH ;
		ControlSource = "m.scc", ;
		Height = 24, ;
		Left = 192, ;
		Name = "Combo1", ;
		RowSource = "bal.cont", ;
		RowSourceType = 6, ;
		TabIndex = 2, ;
		Top = 44, ;
		Width = 90, ;
		ZOrderSet = 6
		*< END OBJECT: BaseClass="combobox" />

	ADD OBJECT 'Combo3' AS combobox WITH ;
		ControlSource = "m.scd", ;
		Height = 24, ;
		Left = 192, ;
		Name = "Combo3", ;
		RowSource = "bal.cont", ;
		RowSourceType = 6, ;
		TabIndex = 1, ;
		Top = 15, ;
		Width = 90, ;
		ZOrderSet = 5
		*< END OBJECT: BaseClass="combobox" />

	ADD OBJECT 'Label3' AS label WITH ;
		BackStyle = 0, ;
		Caption = "Atentie! Nu este verificata corespondenta conturilor!", ;
		FontBold = .T., ;
		FontName = "Arial", ;
		FontSize = 10, ;
		ForeColor = 0,0,128, ;
		Height = 36, ;
		Left = 29, ;
		Name = "Label3", ;
		TabIndex = 8, ;
		Top = 84, ;
		Width = 199, ;
		WordWrap = .T., ;
		ZOrderSet = 7
		*< END OBJECT: BaseClass="label" />
	
	PROCEDURE CMDRENUNT1.Valid
		buton=2
	ENDPROC

	PROCEDURE Combo1.KeyPress
		LPARAMETERS nKeyCode, nShiftAltCtrl
		public l
		if nkeycode>=49 and nkeycode<=55
		l=nkeycode-48
		sele bal
		set filter to val(left(cont,1))=l
		m.scc=cont
		this.refresh
		endif
	ENDPROC

	PROCEDURE Combo1.Valid
		sele bal
		set filter to
	ENDPROC

	PROCEDURE Combo3.KeyPress
		LPARAMETERS nKeyCode, nShiftAltCtrl
		public l
		if nkeycode>=49 and nkeycode<=55
		l=nkeycode-48
		sele bal
		set filter to val(left(cont,1))=l
		m.scd=cont
		this.refresh
		endif
		
		
	ENDPROC

	PROCEDURE Combo3.Valid
		sele bal 
		set filter to 
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cautintre AS form 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Terminat1" UniqueID="" Timestamp="" />

	*<PropValue>
		AutoCenter = .T.
		BackColor = 255,255,255
		BorderStyle = 1
		Caption = " "
		Closable = .F.
		ControlBox = .F.
		DoCreate = .T.
		Height = 105
		MaxButton = .F.
		MinButton = .F.
		Movable = .F.
		Name = "cautintre"
		Width = 342
	*</PropValue>

	ADD OBJECT 'Label1' AS label WITH ;
		BackStyle = 0, ;
		Caption = "Text1", ;
		FontSize = 11, ;
		Height = 17, ;
		Left = 23, ;
		Name = "Label1", ;
		TabIndex = 4, ;
		Top = 15, ;
		Width = 156
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label2' AS label WITH ;
		BackStyle = 0, ;
		Caption = "Text2", ;
		FontSize = 11, ;
		Height = 17, ;
		Left = 23, ;
		Name = "Label2", ;
		TabIndex = 5, ;
		Top = 45, ;
		Width = 156
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Shape1' AS shape WITH ;
		BackStyle = 0, ;
		Height = 67, ;
		Left = 4, ;
		Name = "Shape1", ;
		SpecialEffect = 0, ;
		Top = 5, ;
		Width = 332
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Terminat1' AS terminat WITH ;
		Left = 304, ;
		Name = "Terminat1", ;
		Top = 72, ;
		Imbuton1.Height = 27, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 30, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="..\..\comun\clase\baza.vcx" BaseClass="container" />

	ADD OBJECT 'Text1' AS textbox WITH ;
		ControlSource = "", ;
		Format = "k", ;
		Height = 22, ;
		Left = 178, ;
		Name = "Text1", ;
		TabIndex = 1, ;
		Top = 14, ;
		Width = 134
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text2' AS textbox WITH ;
		ControlSource = "", ;
		Format = "k", ;
		Height = 22, ;
		Left = 178, ;
		Name = "Text2", ;
		TabIndex = 2, ;
		Top = 42, ;
		Width = 134
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE Activate
		*local t1,t2
	ENDPROC

	PROCEDURE Text1.Valid
		thisform.text2.value=thisform.text1.value
		
		thisform.text2.refresh
		
	ENDPROC

	PROCEDURE Text2.Valid
		*if thisform.text2.value<thisform.text1.value then
		*	wait wind "Gresit!"
		*	return 0
		*endif
	ENDPROC

ENDDEFINE

DEFINE CLASS cautlitere AS form 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Shape1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Terminat1" UniqueID="" Timestamp="" />

	*<PropValue>
		AutoCenter = .T.
		BackColor = 255,255,255
		BorderStyle = 1
		Caption = ""
		ControlBox = .F.
		DoCreate = .T.
		Height = 87
		Name = "cautlitere"
		Width = 356
	*</PropValue>

	ADD OBJECT 'Label1' AS label WITH ;
		BackStyle = 0, ;
		Caption = "Tastati primele litere: ", ;
		FontSize = 11, ;
		Height = 17, ;
		Left = 24, ;
		Name = "Label1", ;
		TabIndex = 3, ;
		Top = 17, ;
		Width = 156
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Shape1' AS shape WITH ;
		BackStyle = 0, ;
		Height = 36, ;
		Left = 3, ;
		Name = "Shape1", ;
		SpecialEffect = 0, ;
		Top = 7, ;
		Width = 349
		*< END OBJECT: BaseClass="shape" />

	ADD OBJECT 'Terminat1' AS terminat WITH ;
		Left = 318, ;
		Name = "Terminat1", ;
		Top = 48, ;
		Imbuton1.Height = 27, ;
		Imbuton1.Name = "Imbuton1", ;
		Imbuton1.Width = 30, ;
		Command1.Name = "Command1"
		*< END OBJECT: ClassLib="..\..\comun\clase\baza.vcx" BaseClass="container" />

	ADD OBJECT 'Text1' AS textbox WITH ;
		BackStyle = 0, ;
		ControlSource = "litere", ;
		Format = "k!", ;
		Height = 24, ;
		Left = 178, ;
		Name = "Text1", ;
		TabIndex = 1, ;
		Top = 14, ;
		Width = 134
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE Text1.Valid
		LOCAL L
				L=THIS.CONTROLSOURCE+'=ALLTRIM('+THIS.CONTROLSOURCE+')'
				&L
	ENDPROC

ENDDEFINE

DEFINE CLASS cauttabel AS ffergen OF "..\..\mfix2000\clase\ferestrebaza.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Titlu1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column1.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column1.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column2.Header1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Grid1.Column2.Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CMDTERMIN1" UniqueID="" Timestamp="" />

	*<PropValue>
		DoCreate = .T.
		Height = 225
		Name = "cauttabel"
		Width = 257
		Line1.Name = "Line1"
	*</PropValue>

	ADD OBJECT 'CMDTERMIN1' AS cmdtermin WITH ;
		Left = 210, ;
		Name = "CMDTERMIN1", ;
		Top = 192
		*< END OBJECT: ClassLib="ferestrebaza.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Grid1' AS grid WITH ;
		ColumnCount = 2, ;
		DeleteMark = .F., ;
		FontName = "Arial Narrow", ;
		Height = 144, ;
		Left = 12, ;
		Name = "Grid1", ;
		Panel = 1, ;
		ReadOnly = .T., ;
		Top = 36, ;
		Width = 228, ;
		Column1.FontName = "Arial Narrow", ;
		Column1.Name = "Column1", ;
		Column1.ReadOnly = .T., ;
		Column1.Width = 149, ;
		Column2.FontName = "Arial Narrow", ;
		Column2.Name = "Column2", ;
		Column2.ReadOnly = .T., ;
		Column2.Width = 46
		*< END OBJECT: BaseClass="grid" />

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

	ADD OBJECT 'Grid1.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 'Grid1.Column2.Header1' AS header WITH ;
		Caption = "Header1", ;
		FontName = "Arial Narrow", ;
		Name = "Header1"
		*< END OBJECT: BaseClass="header" />

	ADD OBJECT 'Grid1.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 'Titlu1' AS titlu WITH ;
		Left = 12, ;
		Name = "Titlu1", ;
		Top = 9
		*< END OBJECT: ClassLib="ferestrebaza.vcx" BaseClass="label" />

ENDDEFINE

DEFINE CLASS ck_filtru_numar AS checkbox 
 	*< CLASSDATA: Baseclass="checkbox" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<DefinedPropArrayMethod>
		*p: camp_nume
		*p: criteriu1
		*p: criteriu2
		*p: filtru
	*</DefinedPropArrayMethod>

	*<PropValue>
		AutoSize = .T.
		BackStyle = 0
		Caption = "Check1"
		criteriu1 = 1
		criteriu2 = 2
		filtru = 
		Height = 17
		Name = "ck_filtru_numar"
		SpecialEffect = 1
		Width = 60
	*</PropValue>
	
	PROCEDURE InteractiveChange
		WITH this
			.filtru = ""
			IF .Value = 0
				RETURN 
			ENDIF 
			DO FORM frm_filtru_numar WITH .camp_nume, .caption, .criteriu1, .criteriu2 TO .filtru
			IF .filtru = ""
				.Value = 0
			ENDIF 
		ENDWITH 
	ENDPROC

ENDDEFINE

DEFINE CLASS ck_filtru_text AS checkbox 
 	*< CLASSDATA: Baseclass="checkbox" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<DefinedPropArrayMethod>
		*p: camp_nume
		*p: criteriu
		*p: filtru
	*</DefinedPropArrayMethod>

	*<PropValue>
		AutoSize = .T.
		BackStyle = 0
		Caption = "Check1"
		criteriu = 1
		filtru = 
		Height = 17
		Name = "ck_filtru_text"
		SpecialEffect = 1
		Width = 60
	*</PropValue>
	
	PROCEDURE InteractiveChange
		WITH this
			.filtru = ""
			IF .Value = 0
				RETURN 
			ENDIF 
			DO FORM frm_filtru_text WITH .camp_nume,.caption,.criteriu TO .filtru
			IF .filtru = ""
				.Value = 0
			ENDIF 
		ENDWITH 
	ENDPROC

ENDDEFINE

DEFINE CLASS curs AS ffergen OF "..\..\mfix2000\clase\ferestrebaza.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="Bandabloc1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label10" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lblCursul_b1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lblCurs_b_n2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="lblSuma_in_3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text2" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text3" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Text4" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="CMDTERMIN1" UniqueID="" Timestamp="" />

	*<PropValue>
		AutoCenter = .T.
		BackColor = 255,255,255
		BorderStyle = 1
		DoCreate = .T.
		Height = 152
		Name = "curs"
		Width = 285
		Line1.Name = "Line1"
		Line1.ZOrderSet = 9
	*</PropValue>

	ADD OBJECT 'Bandabloc1' AS bandabloc WITH ;
		Height = 32, ;
		Left = 0, ;
		Name = "Bandabloc1", ;
		Top = 0, ;
		Width = 288, ;
		ZOrderSet = 0, ;
		Banda21.Name = "Banda21", ;
		Blocbuton1.Height = 32, ;
		Blocbuton1.Left = 240, ;
		Blocbuton1.Name = "Blocbuton1", ;
		Blocbuton1.Top = 0, ;
		Blocbuton1.Width = 40
		*< END OBJECT: ClassLib="..\..\comun\clase\baza.vcx" BaseClass="container" />

	ADD OBJECT 'CMDTERMIN1' AS cmdtermin WITH ;
		Left = 245, ;
		Name = "CMDTERMIN1", ;
		Top = 0
		*< END OBJECT: ClassLib="ferestrebaza.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Label10' AS label WITH ;
		Alignment = 0, ;
		AutoSize = .T., ;
		BackStyle = 0, ;
		Caption = "Cursul Valutar", ;
		FontBold = .T., ;
		FontName = "BankGothic Md BT", ;
		FontShadow = .F., ;
		FontSize = 12, ;
		ForeColor = 255,255,255, ;
		Height = 22, ;
		Left = 7, ;
		Name = "Label10", ;
		TabIndex = 5, ;
		Top = 5, ;
		Width = 117, ;
		ZOrderSet = 1
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Label4' AS label WITH ;
		BackStyle = 0, ;
		Caption = ("NUMELE VALUTEI"), ;
		ColorSource = 3, ;
		FontName = "Arial Narrow", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Height = 13, ;
		Left = 21, ;
		Name = "Label4", ;
		ReleaseErase = .F., ;
		TabIndex = 9, ;
		Top = 118, ;
		Width = 105, ;
		ZOrderSet = 4
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'lblCurs_b_n2' AS label WITH ;
		BackStyle = 0, ;
		Caption = ("CURS B.N.R."), ;
		ColorSource = 3, ;
		FontName = "Arial Narrow", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Height = 13, ;
		Left = 22, ;
		Name = "lblCurs_b_n2", ;
		ReleaseErase = .F., ;
		TabIndex = 7, ;
		Top = 43, ;
		Width = 77, ;
		ZOrderSet = 3
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'lblCursul_b1' AS label WITH ;
		BackStyle = 0, ;
		Caption = ("CURSUL BANCII"), ;
		ColorSource = 3, ;
		FontName = "Arial Narrow", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Height = 13, ;
		Left = 22, ;
		Name = "lblCursul_b1", ;
		ReleaseErase = .F., ;
		TabIndex = 6, ;
		Top = 69, ;
		Width = 96, ;
		ZOrderSet = 2
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'lblSuma_in_3' AS label WITH ;
		BackStyle = 0, ;
		Caption = ("SUMA IN VALUTA"), ;
		ColorSource = 3, ;
		FontName = "Arial Narrow", ;
		FontSize = 10, ;
		ForeColor = 0,0,0, ;
		Height = 13, ;
		Left = 22, ;
		Name = "lblSuma_in_3", ;
		ReleaseErase = .F., ;
		TabIndex = 8, ;
		Top = 94, ;
		Width = 105, ;
		ZOrderSet = 5
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'Text1' AS textbox WITH ;
		BackStyle = 0, ;
		ControlSource = "m.cursbnr", ;
		Format = "kr", ;
		Height = 20, ;
		InputMask = "999 999 999 999", ;
		Left = 142, ;
		Name = "Text1", ;
		TabIndex = 1, ;
		Top = 43, ;
		Width = 120, ;
		ZOrderSet = 6
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text2' AS textbox WITH ;
		BackStyle = 0, ;
		ControlSource = "m.cursschimb", ;
		Format = "kr", ;
		Height = 20, ;
		InputMask = "999 999 999 999", ;
		Left = 142, ;
		Name = "Text2", ;
		TabIndex = 2, ;
		Top = 67, ;
		Width = 120, ;
		ZOrderSet = 7
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text3' AS textbox WITH ;
		BackStyle = 0, ;
		ControlSource = "m.sumaval", ;
		Format = "kr", ;
		Height = 20, ;
		InputMask = "999 999 999.99", ;
		Left = 142, ;
		Name = "Text3", ;
		TabIndex = 3, ;
		Top = 91, ;
		Width = 120, ;
		ZOrderSet = 8
		*< END OBJECT: BaseClass="textbox" />

	ADD OBJECT 'Text4' AS textbox WITH ;
		BackStyle = 0, ;
		ControlSource = "M.NUMEVAL", ;
		Enabled = .T., ;
		Format = "k", ;
		Height = 20, ;
		Left = 142, ;
		Name = "Text4", ;
		ReadOnly = .T., ;
		TabIndex = 4, ;
		Top = 116, ;
		Width = 121, ;
		ZOrderSet = 10
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE Init
		public m.sumaval
		store 0 to m.sumaval,m.cursschimb,m.cursbnr
		
		
	ENDPROC

	PROCEDURE Text3.Valid
		sele act
		M.explicatia=STR(M.CURSBNR,6)+'/'+STR(M.CURSSCHIMB,6)+'/'+STR(M.SUMAVAL,10,2)
		*M.numeg=STR(M.CURSBNR,6)+'/'+STR(M.CURSSCHIMB,6)+'/'+STR(M.SUMAVAL,10,2)
		m.suma=m.sumaval*m.cursschimb
		M.SUMA_2=M.SUMAVAL
		M.SUMA_3=m.cursschimb
		M.TOTFTVA=M.SUMA
	ENDPROC

	PROCEDURE Text4.GotFocus
		
		thisform.cmdtermin1.enabled=.f.
		*thisform.cmdrenunt1.enabled=.f.
		DO CAUT_ALF WITH "VALUTE","NUMEVAL",'NUMELE VALUTEI','M.NUMEVAL'
		thisform.cmdtermin1.enabled=.t.
		*thisform.cmdrenunt1.enabled=.t.
		
		M.NUME_4=M.NUMEVAL
	ENDPROC

ENDDEFINE

DEFINE CLASS frm_filtru_text AS formtermin OF "..\..\comun\clase\baza.vcx" 
 	*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />

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

	*<DefinedPropArrayMethod>
		*p: camp_nume
		*p: filtru
	*</DefinedPropArrayMethod>

	*<PropValue>
		BorderStyle = 1
		DoCreate = .T.
		filtru = 
		Height = 117
		Name = "frm_filtru_text"
		Width = 322
		SHAPE1.Height = 36
		SHAPE1.Left = 0
		SHAPE1.Name = "SHAPE1"
		SHAPE1.Top = 0
		SHAPE1.Width = 288
		Terminat1.COMMAND1.Name = "COMMAND1"
		Terminat1.IMBUTON1.Height = 29
		Terminat1.IMBUTON1.Name = "IMBUTON1"
		Terminat1.IMBUTON1.Width = 27
		Terminat1.Left = 290
		Terminat1.Name = "Terminat1"
		Terminat1.TabIndex = 2
		Terminat1.Top = 2
		Titlufrumos1.Height = 32
		Titlufrumos1.Left = 8
		Titlufrumos1.Name = "Titlufrumos1"
		Titlufrumos1.TabIndex = 3
		Titlufrumos1.Top = 5
		Titlufrumos1.Width = 221
	*</PropValue>

	ADD OBJECT 'Criteriu' AS combobox WITH ;
		BorderStyle = 0, ;
		BoundColumn = 2, ;
		BoundTo = .T., ;
		ColumnCount = 2, ;
		ColumnLines = .F., ;
		ColumnWidths = "72,0", ;
		FontItalic = .T., ;
		Height = 24, ;
		Left = 11, ;
		Name = "Criteriu", ;
		ReadOnly = .F., ;
		RowSource = "incepe cu...,1,este...,2,nu este...,3,contine...,4,nu contine...,5", ;
		RowSourceType = 1, ;
		SpecialEffect = 2, ;
		Style = 2, ;
		TabIndex = 4, ;
		ToolTipText = "Selectati criteriul de comparare", ;
		Top = 62, ;
		Width = 100
		*< END OBJECT: BaseClass="combobox" />

	ADD OBJECT 'Text' AS textbox WITH ;
		Format = "!KT", ;
		Height = 25, ;
		Left = 110, ;
		Name = "Text", ;
		TabIndex = 1, ;
		ToolTipText = "", ;
		Top = 62, ;
		Width = 198
		*< END OBJECT: BaseClass="textbox" />
	
	PROCEDURE Destroy
		WITH this 
			LOCAL lnCriteriu, lcNume
			lnCriteriu = .criteriu.Value
			lcNume = .text.value
			IF EMPTY(lnCriteriu)
				.filtru = ""
				RETURN 
			ENDIF
			DO CASE 
				CASE lnCriteriu = 1
					.filtru = "LIKE('" + UPPER(lcNume) + "*',"+"upper(" + .camp_nume + "))"
				CASE lnCriteriu = 2
					.filtru = "upper(" + .camp_nume + ")='" + UPPER(lcNume) + "'"
				CASE lnCriteriu = 3
					.filtru = "upper(" + .camp_nume + ")<>'" + UPPER(lcNume) + "'" 
				CASE lnCriteriu = 4
					.filtru = "LIKE('*" + UPPER(lcNume) + "*',"+"upper(" + .camp_nume + "))"
				CASE lnCriteriu = 5
					*.filtru = "upper(" + .camp_nume + ") NOT LIKE %" + UPPER(lcNume) + "%"
					.filtru = "!LIKE('*" + UPPER(lcNume) + "*',"+"upper(" + .camp_nume + "))"
			ENDCASE 
		ENDWITH 
	ENDPROC

	PROCEDURE Init
		LPARAMETERS lcCampNume,lcTitlu,lnCriteriu
		
		DODEFAULT()
		lctitlu=STRTRAN(lcTitlu,'\<','')
		WITH this
			.criteriu.value = lnCriteriu
			.camp_nume = lcCampNume
			.titlufrumos1.Caption=UPPER(lcTitlu)
			.text.ToolTipText='Introduceti expresia cu care se compara ' + lower(lcTitlu)
			IF EMPTY(lccampnume)
				.text.Enabled = .F.
				.criteriu.Enabled = .F.
			ENDIF 
		ENDWITH 
	ENDPROC

	PROCEDURE Unload
		RETURN this.filtru 
	ENDPROC

	PROCEDURE Criteriu.InteractiveChange
		thisform.text.SetFocus 
	ENDPROC

	PROCEDURE Text.LostFocus
		
		
	ENDPROC

ENDDEFINE
