Files
roacontracte/Clase/onom_clienti.vc2
Marius Mutu 7cc3bff358 Initial: flux text FoxBin2Prg (git urmareste .??2 in-arbore, binarele VFP git-ignored)
Inrolare ROACONTRACTE conform COMUN\docs\inrolare-proiect-git-text.md:
- .gitignore/.gitattributes dupa modelul ROACONT (COMUN/ exclus, are repo propriu)
- 439 texte FoxBin2Prg generate in arbore (vc2/sc2/fr2/mn2/pj2/db2)
- Clase\registry.vcx ramane binar: memo .vct corupt (Error 41), nu se poate converti
- Clase\ferestre_contracte.vcx: text generat, roundtrip scutit (fara write-back)
- CLAUDE.md, docs/README.md, roa_sync.bat

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RYbiinqXxdEqXi53x4Ro7K
2026-08-03 01:51:36 +03:00

3348 lines
99 KiB
Plaintext

*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="onom_clienti.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS cus_odata_agenti AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx"
*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />
*<PropValue>
Name = "cus_odata_agenti"
*</PropValue>
PROCEDURE make_sql
Lparameters toRec,tnId
lcActiune = Alltrim(This.cActiune)
lcId_util = Alltrim(Str(gnIdUtil))
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))
Endif
If Inlist(lcActiune, "UPDATE",'INSERT')
lcNume = Strtran(Alltrim(toRec.nume_agent),['],[''])
*!* lcPrenume = Strtran(Alltrim(toRec.prenume),['],[''])
lcTelefon1 = Alltrim(NVL(toRec.telefon1,[]))
lcTelefon2 = Alltrim(NVL(toRec.telefon2,[]))
lcIdZona = Alltrim(Str(toRec.id_zona))
lcFunctia = Alltrim(NVL(porec.functie,[]))
Endif
Do Case
Case lcActiune = "INSERT"
lcSql = [begin pack_crm.adauga_agent(']+Alltrim(gcS)+[',']+lcNume+[',]+lcIdZona+[,]+;
[']+lcFunctia+[',']+lcTelefon1+[',']+lcTelefon2+[',]+lcId_util+[); end;]
Case lcActiune = "UPDATE"
lcSql = [begin pack_crm.modifica_agent(']+Alltrim(gcS)+[',]+lcId+[,']+lcNume+[',]+;
lcIdZona+[,']+lcFunctia+[',']+lcTelefon1+[',']+lcTelefon2+[',]+lcId_util+[); end;]
Case lcActiune = "DELETE"
lcSql = [begin pack_crm.sterge_agent(']+Alltrim(gcS)+[',]+lcId+[,]+lcId_util+[); end;]
Endcase
This.csql = lcSql
ENDPROC
ENDDEFINE
DEFINE CLASS cus_odata_clienti AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx"
*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />
*<PropValue>
Name = "cus_odata_clienti"
*</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 + ".nom_parteneri"
lcamp = "id_part"
lclook = gcS + ".dev_masiniclienti"
lclookid = "id_partener"
Endif
If Inlist(lcActiune, "UPDATE",'INSERT')
lcNume = Nvl(Strtran(Alltrim(Upper(toRec.nume)),['],['']),"")
lcCod_fiscal = Nvl(Strtran(Alltrim(Upper(toRec.cod_fiscal)),['],['']),"")
lctelefon = Nvl(Strtran(Alltrim(Upper(toRec.telefon)),['],['']),"")
lcadresa = Nvl(Strtran(Alltrim(Upper(toRec.adresa)),['],['']),"")
lcbanca = Nvl(Strtran(Alltrim(Upper(toRec.banca)),['],['']),"")
lccont_banca = Nvl(Strtran(Alltrim(Upper(toRec.cont_banca)),['],['']),"")
lcreg_comert = Nvl(Strtran(Alltrim(Upper(toRec.reg_comert)),['],['']),"")
*!* lcJudet = Nvl(STRTRAN(Alltrim(Upper(toRec.judet)),['],['']),"")
*!* lcLocalitate = Nvl(STRTRAN(Alltrim(Upper(toRec.localitate)),['],['']),"")
lcIdLoc = Nvl(Alltrim(Str(toRec.id_loc)),0)
Endif
Do Case
Case lcActiune = "INSERT"
lcSql = [begin devpartinsproc('] + gcS + [','] + lcNume + [','] + lcCod_fiscal + [','] + lctelefon +[',']+ lcadresa + [','] +lcbanca + ;
[',']+ lccont_banca + [','] + lcreg_comert + [',] + lcIdLoc + [); end;]
*!* lcSql = [INSERT INTO ] + gcS + [.nom_parteneri (nume,cod_fiscal,telefon,adresa,banca,cont_banca,reg_comert,id_loc) ] + ;
*!* [VALUES ('] + lcnume + [','] + lccod_fiscal + [','] + lctelefon +[',']+ lcAdresa + [','] +lcbanca + ;
*!* [',']+ lcCont_banca + [',']+ lcReg_comert+[',] + lcIdLoc + [)]
Case lcActiune = "UPDATE"
If pnNivelModificare=-1
lcSql = [UPDATE ] + gcS + [.nom_parteneri SET nume = '] + lcNume;
+[',cod_fiscal = '] + lcCod_fiscal + [',telefon = '] + lctelefon +;
[',adresa = '] + lcadresa + [',banca = '] + lcbanca + [',cont_banca = '] + lccont_banca + [',reg_comert = ']+lcreg_comert+;
[',id_loc = ] + lcIdLoc + [ where id_part = ] + lcId
ELSE
lcSql = [UPDATE ] + gcS + [.nom_parteneri SET telefon = '] + lctelefon + [' ]+;
[ where id_part = ] + lcId
Endif
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_curs AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx"
*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />
*<PropValue>
Name = "cus_odata_curs"
*</PropValue>
PROCEDURE make_sql
Lparameters toRec, tnId
lcActiune = Alltrim(This.cActiune)
lcId_util = Alltrim(Str(gnIdUtil))
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_curs = Alltrim(Str(tnId))
Endif
If Inlist(lcActiune, "UPDATE",'INSERT')
lcId_curs = Nvl(Alltrim(Str(toRec.id_curs)),"")
lcCurs = Nvl(Alltrim(Str(toRec.curs,10,4)),"")
lcData = DTOS(toRec.data)
lcData2 = DTOS(toRec.data2)
lcId_valuta = Nvl(Alltrim(Str(toRec.id_valuta)),"")
Endif
Do Case
Case lcActiune = "INSERT"
lcSql = [begin pack_crm.adauga_curs(']+Alltrim(gcS)+[',]+lcCurs+;
[, TO_DATE(]+IIF(!EMPTY(lcData),[']+lcData+['],[NULL])+[,'YYYY-MM-DD')]+;
[, TO_DATE(]+IIF(!EMPTY(lcData2),[']+lcData2+['],[NULL])+[,'YYYY-MM-DD'),]+;
lcId_valuta+[); end;]
Case lcActiune = "UPDATE"
lcSql = [begin pack_crm.modifica_curs(']+Alltrim(gcS)+[',]+lcId_curs+[,]+;
lcCurs+;
[, TO_DATE(]+IIF(!EMPTY(lcData),[']+lcData+['],[NULL])+[,'YYYY-MM-DD')]+;
[, TO_DATE(]+IIF(!EMPTY(lcData2),[']+lcData2+['],[NULL])+[,'YYYY-MM-DD'),]+;
lcId_valuta+[); end;]
Case lcActiune = "DELETE"
lcSql = [begin pack_crm.sterge_curs(']+Alltrim(gcS)+[',]+lcId_curs+[); end;]
Endcase
This.csql = lcSql
ENDPROC
ENDDEFINE
DEFINE CLASS cus_odata_delegati AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx"
*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />
*<PropValue>
Name = "cus_odata_delegati"
*</PropValue>
PROCEDURE make_sql
Lparameters toRec,tnId
lcActiune = Alltrim(This.cActiune)
lcId_util = Alltrim(Str(gnIdUtil))
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 + ".nom_responsabili"
*lcamp = "id_nom_delegati"
*!* lclook = gcS + ".dev_oper_mecanici"
*!* lclookid = "dev_oper_mecanici.id_mecanic"
Endif
If Inlist(lcActiune, "UPDATE",'INSERT')
lcIdclient = Nvl(Alltrim(Str(toRec.id_part)),"")
lcNume = Nvl(Alltrim(toRec.nume),"")
lcBI_seria = Nvl(Left(Alltrim(toRec.bi_seria),2),"")
lcBI_numar = Nvl(Alltrim(Str(toRec.bi_numar)),"NULL")
lcEliberatde = Nvl(Alltrim(toRec.eliberatde),"")
lcinactiv = Nvl(Alltrim(Str(toRec.inactiv)),"")
Endif
Do Case
Case lcActiune = "INSERT"
lcSql = [begin pack_crm.adauga_delegat(']+Alltrim(gcS)+[',]+lcIdclient+[,']+lcNume+[',']+;
lcBI_seria + [',] + lcBI_numar + [,'] + lcEliberatde + [',] + lcId_util +[); end;]
Case lcActiune = "UPDATE"
lcSql = [begin pack_crm.modifica_delegat(']+Alltrim(gcS)+[',]+lcId+[,]+lcIdclient+[,']+;
lcNume+[',']+lcBI_seria +[',]+lcBI_numar+[,']+lcEliberatde +[',]+ lcId_util +[); end;]
Case lcActiune = "DELETE"
lcSql = [begin pack_crm.sterge_delegat(']+Alltrim(gcS)+[',]+lcId+[,]+lcId_util+[); end;]
Endcase
This.csql = lcSql
ENDPROC
ENDDEFINE
DEFINE CLASS cus_odata_responsabili AS _cusodatabase OF "..\..\comun\clase\_cus_odata_base.vcx"
*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />
#INCLUDE "..\..\program files\microsoft visual foxpro 8\foxpro.h"
*<PropValue>
Name = "cus_odata_responsabili"
*</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 + ".nom_responsabili"
lcamp = "nom_responsabili.id_responsabil"
lclook = gcS + ".act"
lclookid = "act.id_responsabil"
Endif
If Inlist(lcActiune, "UPDATE",'INSERT')
lcnume = NVL(UPPER(ALLTRIM(toRec.nume)),"")
lcfunct = NVL(UPPER(ALLTRIM(toRec.functie)),"")
lcales = NVL(ALLTRIM(STR(toRec.ales)),"")
lcinactiv = NVL(ALLTRIM(STR(toRec.inactiv)),"")
Endif
Do Case
Case lcActiune = "INSERT"
lcSql = [INSERT INTO ] + gcS + [.nom_responsabili (nume,functie,ales,inactiv) VALUES ('] + lcnume + ;
[','] + lcfunct + [',] + lcales + [,] + lcinactiv + [)]
Case lcActiune = "UPDATE"
lcSql = [UPDATE ] + gcS + [.nom_responsabili SET nume = '] + lcnume + ;
[',functie = '] + lcfunct + [',ales = ] + lcales + [,inactiv = ] + lcinactiv +;
[ where id_responsabil = ] + lcId
Case lcActiune = "DELETE"
lcSql = [begin nomdelproc('] + lcnom + [','] + lcamp + [',] + lcid + [,'] + lclook + [','] + lclookid + ['); end;]
Endcase
This.csql = lcSql
ENDPROC
ENDDEFINE
DEFINE CLASS frm_agenti AS _frmbase OF "..\..\comun\clase\_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="Cmd_cauta1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_agenti" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_agenti.cZona.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_agenti.cZona.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_agenti.cNume.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_agenti.cNume.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_agenti.cTelefon1.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_agenti.cTelefon1.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_agenti.cFunctia.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_agenti.cFunctia.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_agenti.cTelefon2.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_agenti.cTelefon2.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Cmd_reset1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="clb_nume" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Clb_functie" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Clb_zona" UniqueID="" Timestamp="" />
*<DefinedPropArrayMethod>
*m: do_adauga2
*m: do_modifica2
*m: do_sterge2
*</DefinedPropArrayMethod>
*<PropValue>
DoCreate = .T.
Height = 466
lactiv3 = .T.
Name = "frm_agenti"
Width = 744
WindowState = 2
_shape1.Anchor = 10
_shape1.Height = 29
_shape1.Left = 0
_shape1.Name = "_shape1"
_shape1.Top = 0
_shape1.Width = 744
_shape1.ZOrderSet = 2
_shape2.Anchor = 8
_shape2.Height = 29
_shape2.Left = 601
_shape2.Name = "_shape2"
_shape2.Top = -1
_shape2.Width = 143
_shape2.ZOrderSet = 3
Lb_titlu_alb_b121.Caption = "AGENTI"
Lb_titlu_alb_b121.FontBold = .T.
Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
Lb_titlu_alb_b121.TabIndex = 11
Lb_titlu_alb_b121.ZOrderSet = 4
BUT_TERMIN1.Anchor = 8
BUT_TERMIN1.Left = 708
BUT_TERMIN1.Name = "BUT_TERMIN1"
BUT_TERMIN1.TabIndex = 6
BUT_TERMIN1.Top = 0
BUT_TERMIN1.ZOrderSet = 5
*</PropValue>
ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
Anchor = 8, ;
Left = 643, ;
Name = "But_modifica1", ;
TabIndex = 8, ;
Top = 0
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'But_nou1' AS but_nou WITH ;
Anchor = 8, ;
Left = 609, ;
Name = "But_nou1", ;
TabIndex = 7, ;
Top = 0
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
Anchor = 8, ;
Left = 676, ;
Name = "But_sterge1", ;
TabIndex = 9, ;
Top = 0
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'Clb_functie' AS clb_tx_simplu WITH ;
Anchor = 0, ;
Left = 319, ;
Name = "Clb_functie", ;
TabIndex = 2, ;
Top = 37, ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Functie", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'clb_nume' AS clb_tx_simplu WITH ;
Anchor = 0, ;
Left = 30, ;
Name = "clb_nume", ;
TabIndex = 1, ;
Top = 37, ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Nume", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_zona' AS clb_tx_simplu WITH ;
Anchor = 0, ;
Left = 30, ;
Name = "Clb_zona", ;
TabIndex = 3, ;
Top = 65, ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Zona", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Cmd_cauta1' AS cmd_cauta WITH ;
Anchor = 0, ;
Left = 636, ;
Name = "Cmd_cauta1", ;
TabIndex = 4, ;
Top = 36
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'Cmd_reset1' AS cmd_reset WITH ;
Anchor = 0, ;
Left = 636, ;
Name = "Cmd_reset1", ;
TabIndex = 10, ;
Top = 65
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'grd_agenti' AS _grdrow WITH ;
Anchor = 15, ;
ColumnCount = 5, ;
DeleteMark = .F., ;
FontName = "Arial Narrow", ;
Height = 336, ;
Left = 15, ;
Name = "grd_agenti", ;
Panel = 1, ;
RecordSource = "crsagenti", ;
TabIndex = 5, ;
Top = 108, ;
Width = 705, ;
ZOrderSet = 6, ;
Column1.ColumnOrder = 3, ;
Column1.ControlSource = "zona", ;
Column1.FontName = "Arial Narrow", ;
Column1.Name = "cZona", ;
Column1.Width = 172, ;
Column2.ColumnOrder = 1, ;
Column2.ControlSource = "nume_agent", ;
Column2.FontName = "Arial Narrow", ;
Column2.Name = "cNume", ;
Column2.Width = 205, ;
Column3.ColumnOrder = 4, ;
Column3.ControlSource = "telefon1", ;
Column3.FontName = "Arial Narrow", ;
Column3.Name = "cTelefon1", ;
Column3.Width = 116, ;
Column4.ColumnOrder = 2, ;
Column4.ControlSource = "functie", ;
Column4.FontName = "Arial Narrow", ;
Column4.Name = "cFunctia", ;
Column4.Width = 127, ;
Column5.ColumnOrder = 5, ;
Column5.ControlSource = "telefon2", ;
Column5.FontName = "Arial Narrow", ;
Column5.Name = "cTelefon2", ;
Column5.Width = 116
*< END OBJECT: ClassLib="..\..\comun\clase\_grd_base.vcx" BaseClass="grid" />
ADD OBJECT 'grd_agenti.cFunctia.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Functie", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grd_agenti.cFunctia.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 'grd_agenti.cNume.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Nume", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grd_agenti.cNume.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 'grd_agenti.cTelefon1.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Telefon 1", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grd_agenti.cTelefon1.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 'grd_agenti.cTelefon2.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Telefon 2", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grd_agenti.cTelefon2.Text1' AS textbox WITH ;
BackColor = 255,255,255, ;
BorderStyle = 0, ;
ForeColor = 0,0,0, ;
Margin = 0, ;
Name = "Text1"
*< END OBJECT: BaseClass="textbox" />
ADD OBJECT 'grd_agenti.cZona.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Zona", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grd_agenti.cZona.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" />
PROCEDURE actualizeaza_grid1
Lparameters lcFiltru
If Empty(lcFiltru)
lcFiltru = poagenti.ca_baza1.cfiltru
Endif
Thisform.MousePointer= 11
Thisform.LockScreen=.T.
save_grid_tag(Thisform.grd_agenti)
poagenti.ca_baza1.cfiltru=lcFiltru
poagenti.ca_baza1.afisare()
restore_grid_tag(Thisform.grd_agenti)
Thisform.LockScreen=.F.
Thisform.MousePointer= 0
ENDPROC
PROCEDURE do_adauga
Private pniesire
pniesire=0
Select crsagenti
Scatter Name loRec Blank
Do Adauga_Modifica_Inregistrare With "agenti",loRec,,"INSERT"
If pniesire=1
This.actualizeaza_grid1()
Select crsagenti
Locate For nume_agent=loRec.nume_agent
Thisform.grd_agenti.SetFocus()
Endif
ENDPROC
PROCEDURE do_adauga2
ENDPROC
PROCEDURE do_cauta
Local lcFiltru
Store '' To lcFiltru
lcFiltru=[2=2]
lcNume = Strtran(Upper(Alltrim(This.clb_nume.text_simplu1.Value)),['],[''])
lcFunctie = Strtran(Upper(Alltrim(This.clb_functie.text_simplu1.Value)),['],[''])
lcZona = Strtran(Upper(Alltrim(This.clb_zona.text_simplu1.Value)),['],[''])
If !Empty(lcNume)
lcFiltru=lcFiltru + [ and nume_agent like '] + lcNume + [%']
Endif
If !Empty(lcFunctie)
lcFiltru=lcFiltru + [ and functie like '] + lcFunctie + [%']
Endif
If !Empty(lcZona)
lcFiltru=lcFiltru + [ and zona like '] + lcZona + [%']
Endif
Thisform.actualizeaza_grid1(lcFiltru)
If Reccount('crsagenti')>0
Select crsagenti
Go Top
Thisform.grd_agenti.SetFocus()
Else
Messagebox("Cautarea nu a intors rezultate!",0+64,"Info cautare")
Thisform.clb_nume.SetFocus()
Endif
ENDPROC
PROCEDURE do_modifica
If Reccount('crsagenti')>0
Private pniesire
pniesire=0
Select crsagenti
Scatter Name loRec
Do Adauga_Modifica_Inregistrare With "agenti",loRec,loRec.id_responsabil,"UPDATE"
If pniesire=1
This.actualizeaza_grid1()
Endif
Endif
ENDPROC
PROCEDURE do_modifica2
ENDPROC
PROCEDURE do_reset
Thisform.clb_nume.text_simplu1.Value = ''
Thisform.clb_functie.text_simplu1.Value = ''
Thisform.clb_zona.text_simplu1.Value = ''
Thisform.Refresh
Thisform.clb_nume.text_simplu1.SetFocus()
ENDPROC
PROCEDURE do_sterge
If Reccount('crsagenti')>0
Select crsagenti
Scatter Name loRec
Do STERGE_INREGISTRARE With "agenti",loRec.id_responsabil
This.actualizeaza_grid1()
Endif
ENDPROC
PROCEDURE do_sterge2
ENDPROC
ENDDEFINE
DEFINE CLASS frm_agenti_nou AS _frmbase OF "..\..\comun\clase\_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_nume" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Clb_telefon1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Clb_telefon2" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Clb_functie" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Cus_odata_agenti1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Cus_odata_agenti2" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Clb_zona" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="img_zona" UniqueID="" Timestamp="" />
*<DefinedPropArrayMethod>
*m: do_alege_zona
*p: cnumevechi
*p: nid
*p: nnivelmodificare && - 1 daca utilizatorul are voie sa modifice toate datele ; 0 daca are voie sa modifice doar nr. de telefon
*p: orec
*</DefinedPropArrayMethod>
*<PropValue>
cnumevechi =
DoCreate = .T.
Height = 216
Name = "frm_agenti_nou"
nnivelmodificare = -1
Width = 372
_shape1.Height = 29
_shape1.Left = 0
_shape1.Name = "_shape1"
_shape1.Top = 0
_shape1.Width = 372
_shape2.Height = 29
_shape2.Left = 304
_shape2.Name = "_shape2"
_shape2.Top = 0
_shape2.Width = 69
Lb_titlu_alb_b121.Caption = "AGENT"
Lb_titlu_alb_b121.FontBold = .T.
Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
Lb_titlu_alb_b121.TabIndex = 8
BUT_TERMIN1.Height = 27
BUT_TERMIN1.Left = 341
BUT_TERMIN1.Name = "BUT_TERMIN1"
BUT_TERMIN1.TabIndex = 6
BUT_TERMIN1.Top = 1
BUT_TERMIN1.Width = 30
*</PropValue>
ADD OBJECT 'But_renunt1' AS but_renunt WITH ;
Height = 27, ;
Left = 309, ;
Name = "But_renunt1", ;
TabIndex = 7, ;
Top = 1, ;
Width = 30
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'Clb_functie' AS clb_tx_simplu WITH ;
Left = 24, ;
Name = "Clb_functie", ;
TabIndex = 2, ;
Top = 74, ;
Text_simplu1.ControlSource = "porec.functie", ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Functie", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_nume' AS clb_tx_simplu WITH ;
Left = 24, ;
Name = "Clb_nume", ;
TabIndex = 1, ;
Top = 46, ;
Width = 290, ;
Text_simplu1.ControlSource = "porec.nume_agent", ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Nume:", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_telefon1' AS clb_tx_simplu WITH ;
Left = 24, ;
Name = "Clb_telefon1", ;
TabIndex = 3, ;
Top = 102, ;
Text_simplu1.ControlSource = "porec.telefon1", ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Telefon 1", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_telefon2' AS clb_tx_simplu WITH ;
Left = 24, ;
Name = "Clb_telefon2", ;
TabIndex = 4, ;
Top = 130, ;
Text_simplu1.ControlSource = "porec.telefon2", ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Telefon 2", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_zona' AS clb_tx_simplu WITH ;
Left = 24, ;
Name = "Clb_zona", ;
TabIndex = 5, ;
TabStop = .T., ;
ToolTipText = "Pentru modificare, faceti dublu-click!", ;
Top = 158, ;
Visible = .T., ;
Text_simplu1.ControlSource = "porec.zona", ;
Text_simplu1.Name = "Text_simplu1", ;
Text_simplu1.ReadOnly = .T., ;
Lb_simplu1.Caption = "Zona", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Cus_odata_agenti1' AS cus_odata_agenti WITH ;
Left = 192, ;
Name = "Cus_odata_agenti1", ;
Top = 240
*< END OBJECT: ClassLib="onom_clienti.vcx" BaseClass="custom" />
ADD OBJECT 'Cus_odata_agenti2' AS cus_odata_agenti WITH ;
Left = 324, ;
Name = "Cus_odata_agenti2", ;
Top = 36
*< END OBJECT: ClassLib="onom_clienti.vcx" BaseClass="custom" />
ADD OBJECT 'img_zona' AS _image WITH ;
Height = 24, ;
Left = 322, ;
Name = "img_zona", ;
Picture = ..\..\comun\grafice\alege.bmp, ;
Stretch = 2, ;
ToolTipText = "Alegeti agentul", ;
Top = 160, ;
Visible = .T., ;
Width = 24
*< END OBJECT: ClassLib="..\..\comun\clase\_baza.vcx" BaseClass="image" />
PROCEDURE do_alege_zona
Local lnId,lcNume
lnId=poRec.id_zona
lcNume=poRec.zona
If cauta_zona(@lnId,@lcNume)
poRec.id_zona=lnId
poRec.zona=lcNume
Thisform.clb_zona.Refresh()
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.nume_agent)
Messagebox('Nu ati completat numele agentului!',0+48,"Atentie")
This.clb_nume.text_simplu1.SetFocus()
PLRETURN=.F.
*!* Case Empty(porec.prenume)
*!* Messagebox('Nu ati completat prenumele agentului!',0+48,"Atentie")
*!* This.clb_prenume.text_simplu1.SetFocus()
*!* PLRETURN=.F.
Case Empty(porec.id_zona)
Messagebox("Nu ati ales zona!",0+48,"Atentie")
This.clb_zona.text_simplu1.SetFocus()
PLRETURN=.F.
Otherwise
PLRETURN=This.cus_odata_agenti1.salvare(This.OREC,This.NID)
Endcase
Return PLRETURN
ENDPROC
PROCEDURE Init
Lparameters toRec, tnId, tcActiune
*!* Local lnid_prospect
DoDefault()
This.orec= toRec
This.nid = tnId
This.cus_odata_agenti1.cactiune = tcActiune
If tcActiune = 'UPDATE'
*!* Select v_zone
*!* Locate For id_zona=toRec.id_zona
*!* If Found()
*!* Thisform.cb_zona._cbbase1.Value=zona
*!* Thisform.cb_zona._cbbase1.Refresh
*!* Endif
Thisform.nNivelModificare=0
Endif
ENDPROC
PROCEDURE Clb_zona.Text_simplu1.DblClick
Thisform.do_alege_zona()
ENDPROC
PROCEDURE Clb_zona.Text_simplu1.KeyPress
Lparameters nKeyCode, nShiftAltCtrl
If Empty(poRec.id_zona) And Empty(poRec.zona) ;
AND Inlist(nKeyCode,9,13) And nShiftAltCtrl=0
Thisform.do_alege_zona()
Else
DoDefault()
Endif
ENDPROC
PROCEDURE img_zona.Click
Thisform.do_alege_zona()
ENDPROC
ENDDEFINE
DEFINE CLASS frm_clienti AS _frmbase OF "..\comun\clase\_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="Cmd_cauta1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cNume.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cNume.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cCod_fiscal.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cCod_fiscal.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cTelefon.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cTelefon.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cAdresa.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cAdresa.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cBanca.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cBanca.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cCont_banca.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cCont_banca.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cReg_comert.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cReg_comert.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cJudet.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cJudet.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cLocalitate.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grd_clienti.cLocalitate.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Cmd_reset1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="clb_client" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
*<DefinedPropArrayMethod>
*m: do_adauga2
*m: do_modifica2
*m: do_sterge2
*</DefinedPropArrayMethod>
*<PropValue>
DoCreate = .T.
Height = 466
lactiv3 = .T.
Name = "frm_clienti"
Width = 670
_shape1.Height = 29
_shape1.Left = 0
_shape1.Name = "_shape1"
_shape1.Top = 0
_shape1.Width = 672
_shape1.ZOrderSet = 2
_shape2.Height = 29
_shape2.Left = 529
_shape2.Name = "_shape2"
_shape2.Top = -1
_shape2.Width = 143
_shape2.ZOrderSet = 3
Lb_titlu_alb_b121.Caption = "CLIENTI"
Lb_titlu_alb_b121.FontBold = .T.
Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
Lb_titlu_alb_b121.TabIndex = 18
Lb_titlu_alb_b121.ZOrderSet = 4
BUT_TERMIN1.Left = 636
BUT_TERMIN1.Name = "BUT_TERMIN1"
BUT_TERMIN1.TabIndex = 16
BUT_TERMIN1.Top = 0
BUT_TERMIN1.ZOrderSet = 5
Gridsort1.Name = "Gridsort1"
*</PropValue>
ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
Left = 571, ;
Name = "But_modifica1", ;
Top = 0
*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'But_nou1' AS but_nou WITH ;
Left = 537, ;
Name = "But_nou1", ;
Top = 0
*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
Left = 604, ;
Name = "But_sterge1", ;
Top = 0
*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'clb_client' AS clb_tx_simplu WITH ;
Left = 77, ;
Name = "clb_client", ;
TabIndex = 1, ;
Top = 41, ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Client", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Cmd_cauta1' AS cmd_cauta WITH ;
Left = 386, ;
Name = "Cmd_cauta1", ;
TabIndex = 2, ;
Top = 42
*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'Cmd_reset1' AS cmd_reset WITH ;
Left = 474, ;
Name = "Cmd_reset1", ;
TabIndex = 17, ;
Top = 42
*< END OBJECT: ClassLib="..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'grd_clienti' AS _grdrow WITH ;
ColumnCount = 9, ;
DeleteMark = .F., ;
FontName = "Arial Narrow", ;
Height = 366, ;
Left = 15, ;
Name = "grd_clienti", ;
Panel = 1, ;
RecordSource = "v_clie", ;
TabIndex = 3, ;
Top = 78, ;
Width = 636, ;
ZOrderSet = 6, ;
Column1.ControlSource = "nume", ;
Column1.FontName = "Arial Narrow", ;
Column1.Name = "cNume", ;
Column1.Width = 172, ;
Column2.ControlSource = "cod_fiscal", ;
Column2.FontName = "Arial Narrow", ;
Column2.Name = "cCod_fiscal", ;
Column2.Width = 91, ;
Column3.ControlSource = "telefon", ;
Column3.FontName = "Arial Narrow", ;
Column3.Name = "cTelefon", ;
Column4.ControlSource = "adresa", ;
Column4.FontName = "Arial Narrow", ;
Column4.Name = "cAdresa", ;
Column4.Width = 270, ;
Column5.ControlSource = "banca", ;
Column5.FontName = "Arial Narrow", ;
Column5.Name = "cBanca", ;
Column5.Width = 114, ;
Column6.ControlSource = "cont_banca", ;
Column6.FontName = "Arial Narrow", ;
Column6.Name = "cCont_banca", ;
Column6.Width = 52, ;
Column7.ControlSource = "reg_comert", ;
Column7.FontName = "Arial Narrow", ;
Column7.Name = "cReg_comert", ;
Column7.Width = 133, ;
Column8.ColumnOrder = 9, ;
Column8.ControlSource = "judet", ;
Column8.FontName = "Arial Narrow", ;
Column8.Name = "cJudet", ;
Column8.Visible = .T., ;
Column8.Width = 68, ;
Column9.ColumnOrder = 8, ;
Column9.ControlSource = "localitate", ;
Column9.FontName = "Arial Narrow", ;
Column9.Name = "cLocalitate", ;
Column9.Width = 127
*< END OBJECT: ClassLib="..\comun\clase\_grd_base.vcx" BaseClass="grid" />
ADD OBJECT 'grd_clienti.cAdresa.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Adresa", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grd_clienti.cAdresa.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 'grd_clienti.cBanca.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Banca", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grd_clienti.cBanca.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 'grd_clienti.cCod_fiscal.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Cod fiscal", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grd_clienti.cCod_fiscal.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 'grd_clienti.cCont_banca.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Cont", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grd_clienti.cCont_banca.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 'grd_clienti.cJudet.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Judet", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grd_clienti.cJudet.Text1' AS textbox WITH ;
BackColor = 255,255,255, ;
BorderStyle = 0, ;
FontName = "Arial Narrow", ;
ForeColor = 0,0,0, ;
Margin = 0, ;
Name = "Text1", ;
Visible = .T.
*< END OBJECT: BaseClass="textbox" />
ADD OBJECT 'grd_clienti.cLocalitate.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Localitate", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grd_clienti.cLocalitate.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 'grd_clienti.cNume.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Nume client", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grd_clienti.cNume.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 'grd_clienti.cReg_comert.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Nr.Reg.Com.", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grd_clienti.cReg_comert.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 'grd_clienti.cTelefon.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Telefon", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grd_clienti.cTelefon.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" />
PROCEDURE actualizeaza_grid1
Lparameters lcFiltru
If Empty(lcFiltru)
lcFiltru = poclie.ca_baza1.cfiltru
Endif
Thisform.MousePointer= 11
Thisform.LockScreen=.T.
save_grid_tag(Thisform.grd_clienti)
poclie.ca_baza1.cfiltru=lcFiltru
poclie.ca_baza1.afisare()
restore_grid_tag(Thisform.grd_clienti)
Thisform.LockScreen=.F.
Thisform.MousePointer= 0
ENDPROC
PROCEDURE do_adauga
Private pniesire
pniesire=0
Select v_clie
Scatter Name loRec Blank
Do Adauga_Modifica_Inregistrare With "clienti",loRec,,"INSERT",,"addclie"
If pniesire=1
This.actualizeaza_grid1()
Select v_clie
Locate For nume=loRec.nume
Thisform.grd_clienti.SetFocus()
Endif
ENDPROC
PROCEDURE do_adauga2
ENDPROC
PROCEDURE do_cauta
Local lcFiltru
Store '' To lcFiltru
lcFiltru = [a.id_tip_part=16 and b.inactiv=0]
lcNume = Strtran(Upper(Alltrim(This.clb_client.text_simplu1.Value)),['],[''])
If !Empty(lcNume)
lcFiltru=lcFiltru + [ and b.nume like '] + lcNume + [%']
Endif
Thisform.actualizeaza_grid1(lcFiltru)
If Reccount('v_clie')>0
Select v_clie
Go Top
Thisform.grd_clienti.SetFocus()
Else
Messagebox("Cautarea nu a intors rezultate!",0+64,"Info cautare")
Thisform.clb_client.SetFocus()
Endif
ENDPROC
PROCEDURE do_modifica
If Reccount('v_clie')>0
Private pniesire
pniesire=0
Select v_clie
Scatter Name loRec
Do Adauga_Modifica_Inregistrare With "clienti",loRec,loRec.id_part,"UPDATE"
If pniesire=1
This.actualizeaza_grid1()
Endif
Endif
ENDPROC
PROCEDURE do_modifica2
ENDPROC
PROCEDURE do_reset
Thisform.clb_client.text_simplu1.Value = ''
Thisform.Refresh
ENDPROC
PROCEDURE do_sterge
If Reccount('v_clie')>0
Select v_clie
Scatter Name loRec
Do STERGE_INREGISTRARE With "clienti",loRec.id_part
This.actualizeaza_grid1()
Endif
ENDPROC
PROCEDURE do_sterge2
ENDPROC
ENDDEFINE
DEFINE CLASS frm_clienti_nou AS _frmbase OF "..\..\comun\clase\_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="Clb_tx_simplu5" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Clb_tx_simplu6" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Clb_tx_simplu7" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Ed_tx_simplu1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Cb_localitate" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Cb_judet" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Cus_odata_clienti1" UniqueID="" Timestamp="" />
*<DefinedPropArrayMethod>
*p: cnumevechi
*p: nid
*p: nnivelmodificare && - 1 daca utilizatorul are voie sa modifice toate datele ; 0 daca are voie sa modifice doar nr. de telefon
*p: orec
*</DefinedPropArrayMethod>
*<PropValue>
cnumevechi =
DoCreate = .T.
Height = 338
Name = "frm_clienti_nou"
nnivelmodificare = -1
Width = 375
_shape1.Name = "_shape1"
_shape2.Height = 29
_shape2.Left = 311
_shape2.Name = "_shape2"
_shape2.Top = 0
_shape2.Width = 69
Lb_titlu_alb_b121.Caption = "Client"
Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
Lb_titlu_alb_b121.TabIndex = 11
BUT_TERMIN1.Height = 27
BUT_TERMIN1.Left = 345
BUT_TERMIN1.Name = "BUT_TERMIN1"
BUT_TERMIN1.TabIndex = 9
BUT_TERMIN1.Top = 1
BUT_TERMIN1.Width = 30
*</PropValue>
ADD OBJECT 'But_renunt1' AS but_renunt WITH ;
Height = 27, ;
Left = 315, ;
Name = "But_renunt1", ;
TabIndex = 10, ;
Top = 1, ;
Width = 30
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'Cb_judet' AS cb_tx_simplu WITH ;
Left = 13, ;
Name = "Cb_judet", ;
TabIndex = 12, ;
Top = 206, ;
_CBBASE1.Enabled = .F., ;
_CBBASE1.Name = "_CBBASE1", ;
_CBBASE1.RowSource = "v_judete.judet", ;
_CBBASE1.RowSourceType = 6, ;
_LBBASE1.Caption = "Judet", ;
_LBBASE1.Name = "_LBBASE1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Cb_localitate' AS cb_tx_simplu WITH ;
Left = 13, ;
Name = "Cb_localitate", ;
TabIndex = 5, ;
Top = 178, ;
_CBBASE1.Name = "_CBBASE1", ;
_CBBASE1.RowSource = "v_localitati.localitate,id_loc", ;
_CBBASE1.RowSourceType = 6, ;
_LBBASE1.Caption = "Localitate", ;
_LBBASE1.Name = "_LBBASE1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
Left = 13, ;
Name = "Clb_tx_simplu1", ;
TabIndex = 1, ;
Top = 37, ;
Text_simplu1.ControlSource = "porec.nume", ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Nume:", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
Left = 13, ;
Name = "Clb_tx_simplu2", ;
TabIndex = 2, ;
Top = 65, ;
Text_simplu1.ControlSource = "porec.cod_fiscal", ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Cod fiscal:", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_tx_simplu3' AS clb_tx_simplu WITH ;
Left = 13, ;
Name = "Clb_tx_simplu3", ;
TabIndex = 3, ;
Top = 93, ;
Text_simplu1.ControlSource = "porec.telefon", ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Telefon", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_tx_simplu5' AS clb_tx_simplu WITH ;
Left = 13, ;
Name = "Clb_tx_simplu5", ;
TabIndex = 6, ;
Top = 234, ;
Text_simplu1.ControlSource = "porec.banca", ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Banca:", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_tx_simplu6' AS clb_tx_simplu WITH ;
Left = 13, ;
Name = "Clb_tx_simplu6", ;
TabIndex = 7, ;
Top = 262, ;
Text_simplu1.ControlSource = "porec.cont_banca", ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Cont banca:", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_tx_simplu7' AS clb_tx_simplu WITH ;
Left = 13, ;
Name = "Clb_tx_simplu7", ;
TabIndex = 8, ;
Top = 290, ;
Text_simplu1.ControlSource = "porec.reg_comert", ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Registru comert:", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Cus_odata_clienti1' AS cus_odata_clienti WITH ;
Left = 334, ;
Name = "Cus_odata_clienti1", ;
Top = 56
*< END OBJECT: ClassLib="onom_clienti.vcx" BaseClass="custom" />
ADD OBJECT 'Ed_tx_simplu1' AS ed_tx_simplu WITH ;
Left = 13, ;
Name = "Ed_tx_simplu1", ;
TabIndex = 4, ;
Top = 121, ;
_edbase1.ControlSource = "porec.adresa", ;
_edbase1.Format = "!K", ;
_edbase1.Height = 53, ;
_edbase1.Left = 71, ;
_edbase1.Name = "_edbase1", ;
_edbase1.Top = 2, ;
_edbase1.Width = 241, ;
_LBBASE1.Caption = "Adresa", ;
_LBBASE1.Name = "_LBBASE1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
PROCEDURE Destroy
Use In v_judete
Use In v_localitati
ENDPROC
PROCEDURE inainte_de_do_termin
Local PLRETURN
Private pnNivelModificare
pnNivelModificare=Thisform.nNivelModificare
lccontrol = Upper(This.ActiveControl.BaseClass )
If Inlist(lccontrol,"TEXTBOX","EDITBOX","COMBOBOX")
lcval=This.ActiveControl.ControlSource
&lcval=Thisform.ActiveControl.Value
Endif
If !Empty(Thisform.cb_localitate._CBBASE1.Value)
porec.id_loc=v_localitati.id_loc
Else
porec.id_loc=0
Endif
Do Case
Case Empty(porec.nume)
Messagebox('Nu ati completat numele clientului!',0+48,"Atentie")
This.clb_tx_simplu1.text_simplu1.SetFocus()
PLRETURN=.F.
Otherwise
&& tip_modificare
&& 1 - nr. de telefon
&& 2 - toate
*!* If (Type('poRec.tip_modificare')='U' Or (Type('poRec.tip_modificare')<>'U' And poRec.tip_modificare=1)) And Alltrim(Upper(This.cus_odata_clienti1.cactiune))="UPDATE"
&& pnNivelModificare
&& 0 - nr. de telefon
&& -1 - toate
If pnNivelModificare=0 And Alltrim(Upper(This.cus_odata_clienti1.cactiune))="UPDATE"
PLRETURN=This.cus_odata_clienti1.salvare(This.OREC,This.NID)
Else
lcNumeClient=Strtran(" "+porec.nume," SA ","")
lcNumeClient=Strtran(lcNumeClient," SRL ","")
lcNumeClient=Strtran(lcNumeClient," SC ","")
pcexec=[select id_part,nume from ]+gcS+[.vnom_parteneri where nume like '%]+Strtran(Alltrim(lcNumeClient)," ","%")+[%']+;
IIF(porec.id_part>0,[ and id_part!=]+Alltrim(Str(porec.id_part)),[])
Do While .T.
pnSucces = SQLExec(GNHANDLE,pcexec,'crsnumeclienti')
If pnSucces = 0
* instructiunea in curs de executie
Else
Exit
Endif
Enddo
If Reccount('crsnumeclienti')>0
Select crsnumeclienti
Locate For Alltrim(Upper(nume))=Alltrim(Upper(porec.nume))
If Found()
Messagebox('Mai exista acest client inregistrat',0+48,"Atentie")
This.clb_tx_simplu1.text_simplu1.SetFocus()
Use In crsnumeclienti
PLRETURN=.F.
Else
If Alltrim(Upper(This.cus_odata_clienti1.cactiune))="INSERT"
lnTip=1
lcNumeVechi=""
Else
lnTip=2
lcNumeVechi=Thisform.cnumevechi
Endif
Private pnButon
pnButon=0
ofrmverifclie=Createobject("frm_clienti_verif",porec.nume,lnTip,lcNumeVechi)
ofrmverifclie.Show(1)
If pnButon=1
PLRETURN=This.cus_odata_clienti1.salvare(This.OREC,This.NID)
Else
This.clb_tx_simplu1.text_simplu1.SetFocus()
PLRETURN=.F.
Endif
Release ofrmverifclie
Endif
Else
PLRETURN=This.cus_odata_clienti1.salvare(This.OREC,This.NID)
Endif
Endif
Endcase
Return PLRETURN
ENDPROC
PROCEDURE Init
Lparameters toRec, tnId, tcActiune
Local lnid_judet
DoDefault()
This.orec= toRec
This.nid = tnId
This.cus_odata_clienti1.cactiune = tcActiune
If tcActiune = 'UPDATE'
Thisform.cnumevechi=toRec.nume
Select v_localitati
Locate For id_loc=toRec.id_loc
If Found()
Thisform.cb_localitate._cbbase1.Value=localitate
Thisform.cb_localitate._cbbase1.Refresh
lnid_judet = id_judet
Select v_judete
Locate For id_judet = lnid_judet
If Found()
Thisform.cb_judet._cbbase1.Value=judet
Thisform.cb_judet._cbbase1.Refresh
Endif
Endif
&& tip_modificare
&& 1 - nr. de telefon
&& 2 - toate
If TYPE('toRec.tip_modificare')='U' OR (TYPE('toRec.tip_modificare')<>'U' AND toRec.tip_modificare=1)
Thisform.nNivelModificare=0
Thisform.clb_tx_simplu1.text_simplu1.Enabled=.F.
Thisform.clb_tx_simplu2.text_simplu1.Enabled=.F.
Thisform.cb_judet._cbbase1.Enabled=.F.
Thisform.cb_localitate._cbbase1.Enabled=.F.
Thisform.ed_tx_simplu1._edbase1.Enabled=.F.
Thisform.clb_tx_simplu5.text_simplu1.Enabled=.F.
Thisform.clb_tx_simplu6.text_simplu1.Enabled=.F.
Thisform.clb_tx_simplu7.text_simplu1.Enabled=.F.
Endif
Endif
ENDPROC
PROCEDURE Load
If Used('v_judete')
Use In v_judete
Endif
lcSql=[select id_judet,judet from ] + gcS + [.vnom_judete]
lnSucces=goExecutor.oExecute(lcSql,'v_judete')
If lnSucces < 0
Messagebox(goExecutor.cEroare,0+16,'Eroare')
Endif
If Used('v_localitati')
Use In v_localitati
Endif
lcSql=[select id_loc,localitate,id_judet from ] + gcS + [.vnom_localitati]
lnSucces=goExecutor.oExecute(lcSql,'v_localitati')
If lnSucces < 0
Messagebox(goExecutor.cEroare,0+16,'Eroare')
Endif
ENDPROC
PROCEDURE Cb_localitate._CBBASE1.InteractiveChange
Select v_localitati
lnid_judet = id_judet
Select v_judete
Set Filter To id_judet = lnid_judet
Go Top
Thisform.cb_judet._CBBASE1.Value=judet
Thisform.cb_judet._CBBASE1.Requery
Thisform.cb_judet._CBBASE1.Refresh
ENDPROC
ENDDEFINE
DEFINE CLASS frm_curs AS _frmbase OF "..\..\comun\clase\_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="grid_curs" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grid_curs.Column1.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grid_curs.Column1.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grid_curs.Column2.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grid_curs.Column2.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grid_curs.Column3.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grid_curs.Column3.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grid_curs.Column4.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="grid_curs.Column4.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Ck_data" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Cmd_cauta1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Cmd_reset1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Ck_numeval" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Ck_data2" UniqueID="" Timestamp="" />
*<PropValue>
BorderStyle = 3
DoCreate = .T.
Height = 420
Name = "frm_curs"
Width = 274
_shape1.Anchor = 11
_shape1.Height = 29
_shape1.Left = -13
_shape1.Name = "_shape1"
_shape1.Top = 0
_shape1.Width = 303
_shape2.Anchor = 9
_shape2.Height = 29
_shape2.Left = 123
_shape2.Name = "_shape2"
_shape2.Top = 1
_shape2.Width = 151
Lb_titlu_alb_b121.Anchor = 3
Lb_titlu_alb_b121.Caption = "Curs valutar"
Lb_titlu_alb_b121.Left = 8
Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
Lb_titlu_alb_b121.Top = 6
BUT_TERMIN1.Anchor = 9
BUT_TERMIN1.Left = 243
BUT_TERMIN1.Name = "BUT_TERMIN1"
BUT_TERMIN1.Top = 2
*</PropValue>
ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
Anchor = 9, ;
Left = 154, ;
Name = "But_modifica1", ;
Top = 2
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'But_nou1' AS but_nou WITH ;
Anchor = 9, ;
Left = 124, ;
Name = "But_nou1", ;
Top = 2
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'But_renunt1' AS but_renunt WITH ;
Anchor = 9, ;
Left = 214, ;
Name = "But_renunt1", ;
Top = 2
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
Anchor = 9, ;
Left = 184, ;
Name = "But_sterge1", ;
Top = 2
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'Ck_data' AS ck_filtru_numar WITH ;
Alignment = 0, ;
AutoSize = .T., ;
camp_nume = data, ;
Caption = "Data", ;
FontName = "Arial Narrow", ;
Left = 54, ;
Name = "Ck_data", ;
TabIndex = 1, ;
tip = D, ;
Top = 39, ;
ZOrderSet = 32
*< END OBJECT: ClassLib="..\..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />
ADD OBJECT 'Ck_data2' AS ck_filtru_numar WITH ;
Alignment = 0, ;
AutoSize = .T., ;
camp_nume = data2, ;
Caption = "Data2", ;
FontName = "Arial Narrow", ;
Left = 99, ;
Name = "Ck_data2", ;
TabIndex = 1, ;
tip = D, ;
Top = 39, ;
ZOrderSet = 32
*< END OBJECT: ClassLib="..\..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />
ADD OBJECT 'Ck_numeval' AS ck_filtru_text WITH ;
Alignment = 0, ;
AutoSize = .T., ;
camp_nume = nume_val, ;
Caption = "Valuta", ;
Comment = "*:OnResize=LT", ;
FontName = "Arial Narrow", ;
Left = 6, ;
Name = "Ck_numeval", ;
TabIndex = 19, ;
Top = 39, ;
ZOrderSet = 12
*< END OBJECT: ClassLib="..\..\comun\clase\caut_ora.vcx" BaseClass="checkbox" />
ADD OBJECT 'Cmd_cauta1' AS cmd_cauta WITH ;
Anchor = 9, ;
Comment = "*:OnResize=LT", ;
Height = 27, ;
Left = 166, ;
Name = "Cmd_cauta1", ;
TabIndex = 34, ;
Top = 35, ;
Width = 48, ;
ZOrderSet = 20
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'Cmd_reset1' AS cmd_reset WITH ;
Anchor = 9, ;
Comment = "*:OnResize=LT", ;
Height = 27, ;
Left = 218, ;
Name = "Cmd_reset1", ;
TabIndex = 45, ;
Top = 35, ;
Width = 48, ;
ZOrderSet = 19
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'grid_curs' AS _grdrow WITH ;
Anchor = 15, ;
ColumnCount = 4, ;
DeleteMark = .F., ;
FontName = "Arial Narrow", ;
Height = 341, ;
Left = 8, ;
Name = "grid_curs", ;
Panel = 1, ;
RecordMark = .F., ;
RecordSource = "tCurs", ;
Top = 68, ;
Width = 258, ;
Column1.ControlSource = "nume_val", ;
Column1.FontName = "Arial Narrow", ;
Column1.Name = "Column1", ;
Column1.Width = 74, ;
Column2.ControlSource = "curs", ;
Column2.FontName = "Arial Narrow", ;
Column2.Format = "rk", ;
Column2.InputMask = (get_mask(10,gnPCurs)), ;
Column2.Name = "Column2", ;
Column2.Width = 58, ;
Column3.ControlSource = "data", ;
Column3.FontName = "Arial Narrow", ;
Column3.Name = "Column3", ;
Column3.Width = 49, ;
Column4.ControlSource = "data2", ;
Column4.FontName = "Arial Narrow", ;
Column4.Name = "Column4", ;
Column4.Width = 51
*< END OBJECT: ClassLib="..\..\comun\clase\_grd_base.vcx" BaseClass="grid" />
ADD OBJECT 'grid_curs.Column1.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Nume valuta", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grid_curs.Column1.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 'grid_curs.Column2.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Curs", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grid_curs.Column2.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 'grid_curs.Column3.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Data", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grid_curs.Column3.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 'grid_curs.Column4.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Data2", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'grid_curs.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" />
PROCEDURE actualizeaza_grid1
LPARAMETERS pcFiltru
LOCAL lcFiltru
lcFiltru = pcFiltru
IF EMPTY(lcFiltru)
lcFiltru = poCurs.ca_baza1.cfiltru
ENDIF
*lcOrder = This.corderby + " " + This.Casc
save_grid_tag(thisform.grid_curs)
poCurs.ca_baza1.cfiltru = lcFiltru
*poCurs.ca_baza1.corder = lcOrder
poCurs.ca_baza1.afisare()
restore_grid_tag(thisform.grid_curs)
IF RECCOUNT('tCurs')>0
thisform.grid_curs.SetFocus()
ENDIF
ENDPROC
PROCEDURE do_adauga
Select tCurs
Scatter Name loRec Blank
loRec.data = DATE()
Do Adauga_Modifica_Inregistrare With "curs",loRec,,"INSERT"
This.actualizeaza_grid1()
ENDPROC
PROCEDURE do_cauta
LOCAL lcFiltru
lcFiltru = ""
* valuta
If thisform.ck_numeval.Value=1
lcFiltru = lcFiltru + thisform.ck_numeval.filtru
ENDIF
IF this.ck_data.Value = 1
lcFiltru = lcFiltru + Thisform.ck_data.filtru
ENDIF
IF this.ck_data2.Value = 1
lcFiltru = lcFiltru + Thisform.ck_data2.filtru
ENDIF
If !Empty(lcFiltru)
lcFiltru = Substr(lcFiltru,6)
ELSE
lcFiltru = [2=2]
ENDIF
Thisform.actualizeaza_grid1(lcFiltru)
Thisform.grid_curs.SetFocus()
ENDPROC
PROCEDURE do_reset
thisform.ck_numeval.Value = 0
thisform.ck_data.Value = 0
thisform.ck_data2.Value = 0
thisform.Refresh()
ENDPROC
PROCEDURE inainte_de_do_modifica
Select tCurs
Scatter Name loRec
Do Adauga_Modifica_Inregistrare With "curs",loRec,loRec.id_curs,"UPDATE"
thisform.actualizeaza_grid1()
ENDPROC
PROCEDURE inainte_de_do_sterge
Select tCurs
Scatter Name lorec
Do STERGE_INREGISTRARE With "curs",lorec.id_curs
This.actualizeaza_grid1()
ENDPROC
ENDDEFINE
DEFINE CLASS frm_curs_nou AS _frmbase OF "..\..\comun\clase\_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="Label1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Label4" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="txtCurs" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_renunt1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="txtData1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="txtData2" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="CUS_ODATA_CURS1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Command2" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="txtValuta" UniqueID="" Timestamp="" />
*<DefinedPropArrayMethod>
*p: nid
*p: orec
*</DefinedPropArrayMethod>
*<PropValue>
BorderStyle = 3
DoCreate = .T.
Height = 143
Name = "frm_curs_nou"
nid =
orec =
Width = 208
_shape1.Anchor = 11
_shape1.Name = "_shape1"
_shape2.Anchor = 9
_shape2.Height = 29
_shape2.Left = 147
_shape2.Name = "_shape2"
_shape2.Top = 0
_shape2.Width = 61
Lb_titlu_alb_b121.Caption = "Curs valutar"
Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
Lb_titlu_alb_b121.TabIndex = 7
BUT_TERMIN1.Anchor = 9
BUT_TERMIN1.Left = 178
BUT_TERMIN1.Name = "BUT_TERMIN1"
BUT_TERMIN1.TabIndex = 5
BUT_TERMIN1.Top = 1
*</PropValue>
ADD OBJECT 'But_renunt1' AS but_renunt WITH ;
Anchor = 9, ;
Left = 149, ;
Name = "But_renunt1", ;
TabIndex = 6, ;
Top = 1
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'Command2' AS commandbutton WITH ;
Caption = "", ;
FontName = "Arial Narrow", ;
Height = 25, ;
Left = 168, ;
Name = "Command2", ;
Picture = ..\grafice\find.bmp, ;
TabIndex = 1, ;
Top = 36, ;
Width = 28
*< END OBJECT: BaseClass="commandbutton" />
ADD OBJECT 'CUS_ODATA_CURS1' AS cus_odata_curs WITH ;
Left = 102, ;
Name = "CUS_ODATA_CURS1", ;
Top = 8
*< END OBJECT: ClassLib="onom_clienti.vcx" BaseClass="custom" />
ADD OBJECT 'Label1' AS label WITH ;
AutoSize = .T., ;
BackStyle = 0, ;
Caption = "Nume valuta", ;
Height = 17, ;
Left = 14, ;
Name = "Label1", ;
TabIndex = 8, ;
Top = 41, ;
Width = 71
*< END OBJECT: BaseClass="label" />
ADD OBJECT 'Label2' AS label WITH ;
AutoSize = .T., ;
BackStyle = 0, ;
Caption = "Curs", ;
Height = 17, ;
Left = 14, ;
Name = "Label2", ;
TabIndex = 9, ;
Top = 66, ;
Width = 29
*< END OBJECT: BaseClass="label" />
ADD OBJECT 'Label3' AS label WITH ;
AutoSize = .T., ;
BackStyle = 0, ;
Caption = "Data 1", ;
Height = 17, ;
Left = 14, ;
Name = "Label3", ;
TabIndex = 10, ;
Top = 91, ;
Width = 38
*< END OBJECT: BaseClass="label" />
ADD OBJECT 'Label4' AS label WITH ;
AutoSize = .T., ;
BackStyle = 0, ;
Caption = "Data 2", ;
Height = 17, ;
Left = 14, ;
Name = "Label4", ;
TabIndex = 11, ;
Top = 117, ;
Width = 38
*< END OBJECT: BaseClass="label" />
ADD OBJECT 'txtCurs' AS textbox WITH ;
ControlSource = "porec.curs", ;
Height = 23, ;
Left = 91, ;
Name = "txtCurs", ;
TabIndex = 2, ;
Top = 63, ;
Width = 100
*< END OBJECT: BaseClass="textbox" />
ADD OBJECT 'txtData1' AS textbox WITH ;
ControlSource = "porec.data", ;
Height = 23, ;
Left = 91, ;
Name = "txtData1", ;
TabIndex = 3, ;
Top = 88, ;
Width = 100
*< END OBJECT: BaseClass="textbox" />
ADD OBJECT 'txtData2' AS textbox WITH ;
ControlSource = "porec.data2", ;
Height = 23, ;
Left = 91, ;
Name = "txtData2", ;
TabIndex = 4, ;
Top = 114, ;
Width = 100
*< END OBJECT: BaseClass="textbox" />
ADD OBJECT 'txtValuta' AS textbox WITH ;
ControlSource = "porec.nume_val", ;
Height = 23, ;
Left = 91, ;
Name = "txtValuta", ;
TabIndex = 12, ;
Top = 36, ;
Width = 75
*< END OBJECT: BaseClass="textbox" />
PROCEDURE inainte_de_do_termin
Private pnIdCursNou
Local plreturn
Store 0 To pnIdCursNou
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.id_valuta)
Messagebox('Nu ati introdus valuta!',0+48,"Atentie")
Thisform.cboValuta.SetFocus()
plreturn = .F.
Case Empty(porec.curs)
Messagebox('Nu ati introdus valoarea cursului!',0+48,"Atentie")
Thisform.txtCurs.SetFocus()
plreturn = .F.
Case Empty(porec.data)
Messagebox('Nu ati introdus data initiala a cursului!',0+48,"Atentie")
Thisform.txtData.SetFocus()
plreturn = .F.
Case Empty(porec.data2)
Messagebox('Nu ati introdus data finala a cursului!',0+48,"Atentie")
Thisform.txtData2.SetFocus()
plreturn = .F.
Otherwise
plreturn=Thisform.cus_odata_curs1.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_curs1.cactiune = tcActiune
ENDPROC
PROCEDURE Command2.Click
LOCAL lcselect, lcfiltru, lcschema, lcorder, lccoloane, lcTitlu, lcTitluColoane, lcFiltruOriginal, lcNumeProc
lcselect = [select v.id_valuta, v.nume_val FROM ] + gcs + [.vnom_valute v where]
lcfiltru = [1=2]
lcschema = []
lcorder = [v.nume_val]
lccoloane = [nume_val]
lcTitlu = [Alegeti valuta]
lcTitluColoane = [Nume]
lcFiltruOriginal = [v.inactiv = 0]
lcNumeProc = ""
locauta = cauta_alfa(lcselect, lcfiltru, lcschema, lcorder, lccoloane, lcTitlu, lcTitluColoane, lcNumeProc, .F., lcFiltruOriginal)
IF buton=2
RETURN
ENDIF
porec.id_valuta = locauta.id_valuta
porec.nume_val = locauta.nume_val
thisform.txtValuta.Refresh
ENDPROC
PROCEDURE txtData1.Valid
porec.data2 = porec.data
thisform.txtdata2.Refresh
ENDPROC
ENDDEFINE
DEFINE CLASS frm_delegati AS _frmbase OF "..\..\comun\clase\_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="gdelegati" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="gdelegati.Column1.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="gdelegati.Column1.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="gdelegati.Column2.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="gdelegati.Column2.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="gdelegati.Column3.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="gdelegati.Column3.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="gdelegati.Column4.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="gdelegati.Column4.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="gdelegati.Column5.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="gdelegati.Column5.Check1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="gdelegati.Column6.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="gdelegati.Column6.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Clb_delegat" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Cmd_cauta1" UniqueID="" Timestamp="" />
*<DefinedPropArrayMethod>
*p: nidpartener && Pentru cautarile in functie de un partener.
*</DefinedPropArrayMethod>
*<PropValue>
BorderStyle = 1
DoCreate = .T.
Height = 382
lactiv3 = .T.
lactiv4 = .T.
Name = "frm_delegati"
Width = 587
_shape1.Height = 29
_shape1.Left = -3
_shape1.Name = "_shape1"
_shape1.Top = 0
_shape1.Width = 592
_shape2.Height = 29
_shape2.Left = 466
_shape2.Name = "_shape2"
_shape2.Top = 0
_shape2.Width = 122
Lb_titlu_alb_b121.Caption = "Delegati"
Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
Lb_titlu_alb_b121.TabIndex = 8
BUT_TERMIN1.Height = 27
BUT_TERMIN1.Left = 557
BUT_TERMIN1.Name = "BUT_TERMIN1"
BUT_TERMIN1.TabIndex = 7
BUT_TERMIN1.Top = 1
BUT_TERMIN1.Width = 30
*</PropValue>
ADD OBJECT 'But_modifica1' AS but_modifica WITH ;
Height = 27, ;
Left = 498, ;
Name = "But_modifica1", ;
TabIndex = 5, ;
Top = 1, ;
Visible = .T., ;
Width = 30
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'But_nou1' AS but_nou WITH ;
Height = 27, ;
Left = 468, ;
Name = "But_nou1", ;
TabIndex = 4, ;
Top = 1, ;
Width = 30
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
Height = 27, ;
Left = 527, ;
Name = "But_sterge1", ;
TabIndex = 6, ;
Top = 1, ;
Visible = .T., ;
Width = 30
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'Clb_delegat' AS clb_tx_simplu WITH ;
Left = 26, ;
Name = "Clb_delegat", ;
TabIndex = 1, ;
Top = 36, ;
TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
LB_SIMPLU1.Caption = "Delegat", ;
LB_SIMPLU1.Name = "LB_SIMPLU1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Cmd_cauta1' AS cmd_cauta WITH ;
Left = 326, ;
Name = "Cmd_cauta1", ;
TabIndex = 2, ;
Top = 37
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'gdelegati' AS _grdrow WITH ;
ColumnCount = 6, ;
DeleteMark = .F., ;
FontName = "Arial Narrow", ;
Height = 300, ;
Left = 12, ;
Name = "gdelegati", ;
Panel = 1, ;
ReadOnly = .T., ;
RecordSource = "v_delegati", ;
TabIndex = 3, ;
Top = 72, ;
Width = 565, ;
Column1.ControlSource = "nume_part", ;
Column1.FontName = "Arial Narrow", ;
Column1.Name = "Column1", ;
Column1.ReadOnly = .T., ;
Column1.Width = 168, ;
Column2.ControlSource = "nume", ;
Column2.FontName = "Arial Narrow", ;
Column2.Name = "Column2", ;
Column2.ReadOnly = .T., ;
Column2.Width = 169, ;
Column3.ControlSource = "bi_seria", ;
Column3.FontName = "Arial Narrow", ;
Column3.Name = "Column3", ;
Column3.ReadOnly = .T., ;
Column3.Width = 49, ;
Column4.ColumnOrder = 5, ;
Column4.ControlSource = "eliberatde", ;
Column4.FontName = "Arial Narrow", ;
Column4.Name = "Column4", ;
Column4.ReadOnly = .T., ;
Column4.Width = 77, ;
Column5.ColumnOrder = 6, ;
Column5.ControlSource = "inactiv", ;
Column5.FontName = "Arial Narrow", ;
Column5.Name = "Column5", ;
Column5.ReadOnly = .T., ;
Column5.Sparse = .F., ;
Column5.Width = 48, ;
Column6.ColumnOrder = 4, ;
Column6.ControlSource = "bi_numar", ;
Column6.FontName = "Arial Narrow", ;
Column6.Name = "Column6", ;
Column6.ReadOnly = .T., ;
Column6.Width = 66
*< END OBJECT: ClassLib="..\..\comun\clase\_grd_base.vcx" BaseClass="grid" />
ADD OBJECT 'gdelegati.Column1.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Client", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'gdelegati.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 'gdelegati.Column2.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Delegat", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'gdelegati.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 'gdelegati.Column3.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "BI_seria", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'gdelegati.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 'gdelegati.Column4.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Eliberat de..", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'gdelegati.Column4.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 'gdelegati.Column5.Check1' AS checkbox WITH ;
Alignment = 0, ;
Caption = "", ;
Centered = .T., ;
FontName = "Arial Narrow", ;
Height = 17, ;
Left = 16, ;
Name = "Check1", ;
ReadOnly = .T., ;
Top = 71, ;
Width = 60
*< END OBJECT: BaseClass="checkbox" />
ADD OBJECT 'gdelegati.Column5.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Inactiv", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'gdelegati.Column6.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "BI_numar", ;
FontName = "Arial Narrow", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT 'gdelegati.Column6.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" />
PROCEDURE actualizeaza_grid1
LPARAMETERS pcFiltru
LOCAL lcFiltru
lcFiltru=pcFiltru
IF EMPTY(lcFiltru)
lcFiltru=podelegati.ca_baza1.cfiltru
ENDIF
save_grid_tag(thisform.gdelegati)
podelegati.ca_baza1.cfiltru=lcFiltru
podelegati.ca_baza1.afisare()
restore_grid_tag(thisform.gdelegati)
*!* IF RECCOUNT('v_delegati')>0
thisform.gdelegati.SetFocus()
*!* ELSE
*!* thisform.lb_delegati.SetFocus()
*!* ENDIF
ENDPROC
PROCEDURE do_adauga
Private pniesire
pniesire=0
Select v_delegati
Scatter Name loRec Blank
If !Empty(Thisform.nidpartener)
loRec.id_part = Thisform.nidpartener
Do update_clienti With Thisform.nidpartener In onom_clienti.prg
Else
Do update_clienti In onom_clienti.prg
Endif
Do Adauga_Modifica_Inregistrare With "delegati",loRec,,"INSERT",,"adddeleg"
If pniesire=1
This.actualizeaza_grid1()
Endif
ENDPROC
PROCEDURE do_cauta
Local lcFiltru
lcFiltru=[]
lcDelegat = Strtran(Upper(Alltrim(Thisform.clb_delegat.texT_SIMPLU1.Value)),['],[''])
If !Empty(Thisform.nidpartener)
lcFiltru = [id_part = ] + Alltrim(Str(Thisform.nidpartener)) + [ and ]
Endif
If !Empty(lcDelegat)
lcFiltru = lcFiltru + [nume like '] + lcDelegat + [%']
Else
lcFiltru = lcFiltru + [2=2]
Endif
This.MousePointer= 11
This.LockScreen=.T.
Thisform.actualizeaza_grid1(lcFiltru)
If Reccount('v_delegati')=0
Messagebox("Cautarea nu a intors rezultate!",0+64,"Info cautare")
Thisform.clb_delegat.SetFocus()
Endif
This.LockScreen=.F.
This.MousePointer= 0
ENDPROC
PROCEDURE do_modifica
Private pniesire
pniesire=0
Do update_clienti In onom_clienti.prg
Select v_delegati
Scatter Name loRec
Do Adauga_Modifica_Inregistrare With "delegati", loRec, loRec.id_responsabil,"UPDATE",,"moddeleg"
If pniesire=1
This.actualizeaza_grid1()
Endif
ENDPROC
PROCEDURE do_sterge
SELECT v_delegati
SCATTER NAME lorec
Do STERGE_INREGISTRARE With "delegati",loRec.id_responsabil
this.actualizeaza_grid1()
ENDPROC
PROCEDURE Init
Lparameters tnidpartener
DODEFAULT()
If !Empty(tnidpartener)
Thisform.nidpartener=tnidpartener
Endif
ENDPROC
PROCEDURE KeyPress
Lparameters nKeyCode, nShiftAltCtrl
lcControl = Upper(Alltrim(This.ActiveControl.Name))
If nKeyCode = 13 And lcControl = 'GDELEGATI' && enter
Nodefault
Thisform.but_TERMIN1.SetFocus
Else
DoDefault(nKeyCode, nShiftAltCtrl)
Endif
ENDPROC
ENDDEFINE
DEFINE CLASS frm_delegati_nou AS _frmbase OF "..\..\comun\clase\_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="Cus_odata_delegati1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Cb_tx_simplu1" 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="But_renunt1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Clb_tx_simplu4" UniqueID="" Timestamp="" />
*<DefinedPropArrayMethod>
*p: nid
*p: orec
*</DefinedPropArrayMethod>
*<PropValue>
DoCreate = .T.
Height = 182
Name = "frm_delegati_nou"
Width = 375
_SHAPE1.Name = "_SHAPE1"
_SHAPE2.Height = 29
_SHAPE2.Left = 312
_SHAPE2.Name = "_SHAPE2"
_SHAPE2.Top = 0
_SHAPE2.Width = 65
LB_TITLU_ALB_B121.Caption = "Delegat"
LB_TITLU_ALB_B121.Name = "LB_TITLU_ALB_B121"
LB_TITLU_ALB_B121.TabIndex = 9
BUT_TERMIN1.Left = 345
BUT_TERMIN1.Name = "BUT_TERMIN1"
BUT_TERMIN1.TabIndex = 7
BUT_TERMIN1.Top = 1
*</PropValue>
ADD OBJECT '_checkbox1' AS _checkbox WITH ;
Alignment = 0, ;
Caption = "Inactiv", ;
ControlSource = "porec.inactiv", ;
Left = 44, ;
Name = "_checkbox1", ;
TabIndex = 6, ;
Top = 156
*< END OBJECT: ClassLib="..\..\comun\clase\_baza.vcx" BaseClass="checkbox" />
ADD OBJECT 'But_renunt1' AS but_renunt WITH ;
Left = 315, ;
Name = "But_renunt1", ;
TabIndex = 8, ;
Top = 1
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'Cb_tx_simplu1' AS cb_tx_simplu WITH ;
Left = 42, ;
Name = "Cb_tx_simplu1", ;
TabIndex = 1, ;
Top = 38, ;
_cbbase1.ColumnCount = 2, ;
_cbbase1.ControlSource = "porec.nume_part", ;
_cbbase1.Name = "_cbbase1", ;
_cbbase1.RowSource = "v_clienti.nume,cod_fiscal", ;
_cbbase1.RowSourceType = 2, ;
_lbbase1.Caption = "Client:", ;
_lbbase1.Name = "_lbbase1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
Left = 42, ;
Name = "Clb_tx_simplu1", ;
TabIndex = 2, ;
Top = 66, ;
Text_simplu1.ControlSource = "porec.nume", ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Delegat:", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
Height = 29, ;
Left = 42, ;
Name = "Clb_tx_simplu2", ;
TabIndex = 3, ;
Top = 94, ;
Width = 146, ;
Text_simplu1.ControlSource = "porec.bi_seria", ;
Text_simplu1.Height = 23, ;
Text_simplu1.Left = 101, ;
Text_simplu1.MaxLength = 10, ;
Text_simplu1.Name = "Text_simplu1", ;
Text_simplu1.Top = 3, ;
Text_simplu1.Width = 42, ;
Lb_simplu1.Caption = "BI serie:", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_tx_simplu3' AS clb_tx_simplu WITH ;
Left = 42, ;
Name = "Clb_tx_simplu3", ;
TabIndex = 5, ;
Top = 122, ;
Text_simplu1.ControlSource = "porec.eliberatde", ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Eliberat de:", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_tx_simplu4' AS clb_tx_simplu WITH ;
Height = 29, ;
Left = 187, ;
Name = "Clb_tx_simplu4", ;
TabIndex = 4, ;
Top = 94, ;
Width = 145, ;
TEXT_SIMPLU1.ControlSource = "porec.bi_numar", ;
TEXT_SIMPLU1.Format = "rk", ;
TEXT_SIMPLU1.Height = 23, ;
TEXT_SIMPLU1.InputMask = "999999", ;
TEXT_SIMPLU1.Left = 33, ;
TEXT_SIMPLU1.MaxLength = 10, ;
TEXT_SIMPLU1.Name = "TEXT_SIMPLU1", ;
TEXT_SIMPLU1.Top = 3, ;
TEXT_SIMPLU1.Width = 104, ;
LB_SIMPLU1.Caption = "nr.:", ;
LB_SIMPLU1.Name = "LB_SIMPLU1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Cus_odata_delegati1' AS cus_odata_delegati WITH ;
Left = 348, ;
Name = "Cus_odata_delegati1", ;
Top = 48
*< END OBJECT: ClassLib="onom_clienti.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 denumirea delegatului!',0+48,"Atentie")
*!* This.clb_tx_simplu2.Text_simplu1.SetFocus()
this.cb_tx_simplu1._CBBASE1.SetFocus()
plreturn=.F.
OTHERWISE
If Alltrim(Upper(This.cus_odata_delegati1.cactiune))="INSERT" &&Or (Alltrim(Upper(This.cus_odata_mecanici1.cactiune))="UPDATE")
IF USED('exista_del')
USE IN exista_del
ENDIF
pcexec=[select count(*) as inreg from ]+gcS+[.vnom_delegati ] + ;
[where (TRIM(nume)=']+Alltrim(porec.nume)+[') and ] + ;
[id_part=]+ALLTRIM(STR(porec.id_part))
*!* [TRIM(nume)=']+ALLTRIM(porec.nume)+[']
Do While .T.
pnSucces = SQLEXEC(GNHANDLE,pcexec,'exista_del')
If pnSucces = 0
* instructiunea in curs de executie
Else
Exit
Endif
Enddo
Select exista_del
lnInreg=exista_del.inreg
Use In exista_del
If lnInreg>0
Messagebox('Mai exista acest delegat inregistrat!',0+48,"Atentie")
*!* This.clb_tx_simplu2.Text_simplu1.SetFocus()
this.cb_tx_simplu1._CBBASE1.SetFocus()
plreturn=.F.
ELSE
PLRETURN=This.cus_odata_delegati1.salvare(This.OREC,This.NID)
ENDIF
ELSE
*!* WAIT WINDOW "pe else"
PLRETURN=This.cus_odata_delegati1.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_delegati1.cactiune = tcActiune
Do Case
Case tcActiune='INSERT' And !Empty(toRec.id_part)
Select v_clienti
Locate For id_part = toRec.id_part
If Found()
porec.nume=nume
This.orec.nume=nume
toRec.nume=nume
Thisform.cb_tx_simplu1._cbbase1.Refresh
Thisform.cb_tx_simplu1._cbbase1.Enabled=.F.
Endif
Case tcActiune='UPDATE'
Thisform.cb_tx_simplu1._cbbase1.Enabled=.F.
Endcase
ENDPROC
PROCEDURE Cb_tx_simplu1._cbbase1.LostFocus
porec.id_part = v_clienti.id_part
*!* POREC.MARCA = V_PERSONAL.MARCA
ENDPROC
ENDDEFINE
DEFINE CLASS frm_responsabili AS _frmbase OF "..\..\comun\clase\_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="Cmd_cauta1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="_gnom_responsabili" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="_gnom_responsabili.Column1.Responsabill" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="_gnom_responsabili.Column1.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="_gnom_responsabili.Column2.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="_gnom_responsabili.Column2.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="_gnom_responsabili.Column3.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="_gnom_responsabili.Column3.Check1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="_gnom_responsabili.Column4.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="_gnom_responsabili.Column4.Check1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="_gnom_responsabili.Column5.Header1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="_gnom_responsabili.Column5.Text1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_nou1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_sterge1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="But_modifica1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="lb_nom_responsabili" UniqueID="" Timestamp="" />
*<DefinedPropArrayMethod>
*m: log
*</DefinedPropArrayMethod>
*<PropValue>
BorderStyle = 1
DoCreate = .T.
Height = 303
lactiv3 = .T.
lactiv4 = .T.
Name = "frm_responsabili"
Width = 504
_shape1.Height = 29
_shape1.Left = 0
_shape1.Name = "_shape1"
_shape1.Top = 0
_shape1.Width = 504
_shape2.Height = 29
_shape2.Left = 383
_shape2.Name = "_shape2"
_shape2.Top = 0
_shape2.Width = 121
Lb_titlu_alb_b121.Caption = "Responsabili"
Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
Lb_titlu_alb_b121.TabIndex = 8
BUT_TERMIN1.Left = 472
BUT_TERMIN1.Name = "BUT_TERMIN1"
BUT_TERMIN1.TabIndex = 4
BUT_TERMIN1.Top = 1
BUT_TERMIN1.Visible = .T.
*</PropValue>
ADD OBJECT '_gnom_responsabili' AS _grdrow WITH ;
ColumnCount = 5, ;
DeleteMark = .F., ;
Height = 191, ;
Left = 8, ;
Name = "_gnom_responsabili", ;
Panel = 1, ;
ReadOnly = .T., ;
RecordSource = "v_responsabili", ;
TabIndex = 3, ;
Top = 101, ;
Width = 488, ;
Column1.ColumnOrder = 2, ;
Column1.ControlSource = "nume", ;
Column1.Name = "Column1", ;
Column1.ReadOnly = .T., ;
Column1.Width = 210, ;
Column2.ColumnOrder = 3, ;
Column2.ControlSource = "functie", ;
Column2.Name = "Column2", ;
Column2.ReadOnly = .T., ;
Column2.Width = 126, ;
Column3.ColumnOrder = 4, ;
Column3.ControlSource = "ales", ;
Column3.Name = "Column3", ;
Column3.ReadOnly = .T., ;
Column3.Sparse = .F., ;
Column3.Width = 46, ;
Column4.ColumnOrder = 5, ;
Column4.ControlSource = "inactiv", ;
Column4.Name = "Column4", ;
Column4.ReadOnly = .T., ;
Column4.Sparse = .F., ;
Column4.Width = 40, ;
Column5.ColumnOrder = 1, ;
Column5.ControlSource = "id_responsabil", ;
Column5.Name = "Column5", ;
Column5.ReadOnly = .T., ;
Column5.Width = 31
*< END OBJECT: ClassLib="..\..\comun\clase\_grd_base.vcx" BaseClass="grid" />
ADD OBJECT '_gnom_responsabili.Column1.Responsabill' AS header WITH ;
Alignment = 2, ;
Caption = "Responsabil", ;
Name = "Responsabill"
*< END OBJECT: BaseClass="header" />
ADD OBJECT '_gnom_responsabili.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 '_gnom_responsabili.Column2.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Functia", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT '_gnom_responsabili.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 '_gnom_responsabili.Column3.Check1' AS checkbox WITH ;
Alignment = 0, ;
Caption = "", ;
Centered = .T., ;
Height = 17, ;
Left = 9, ;
Name = "Check1", ;
ReadOnly = .T., ;
Top = 30, ;
Width = 60
*< END OBJECT: BaseClass="checkbox" />
ADD OBJECT '_gnom_responsabili.Column3.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Ales", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT '_gnom_responsabili.Column4.Check1' AS checkbox WITH ;
Alignment = 0, ;
Caption = "", ;
Centered = .T., ;
Height = 17, ;
Left = 22, ;
Name = "Check1", ;
ReadOnly = .T., ;
Top = 30, ;
Width = 60
*< END OBJECT: BaseClass="checkbox" />
ADD OBJECT '_gnom_responsabili.Column4.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Inactiv", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT '_gnom_responsabili.Column5.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Id", ;
Name = "Header1"
*< END OBJECT: BaseClass="header" />
ADD OBJECT '_gnom_responsabili.Column5.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 ;
Left = 415, ;
Name = "But_modifica1", ;
TabIndex = 6, ;
Top = 1, ;
Visible = .T.
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'But_nou1' AS but_nou WITH ;
Left = 385, ;
Name = "But_nou1", ;
TabIndex = 7, ;
Top = 1, ;
Visible = .T.
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'But_sterge1' AS but_sterge WITH ;
Left = 443, ;
Name = "But_sterge1", ;
TabIndex = 5, ;
Top = 1, ;
Visible = .T.
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'Cmd_cauta1' AS cmd_cauta WITH ;
Left = 309, ;
Name = "Cmd_cauta1", ;
TabIndex = 2, ;
Top = 44
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'lb_nom_responsabili' AS clb_tx_simplu WITH ;
Left = 8, ;
Name = "lb_nom_responsabili", ;
TabIndex = 1, ;
Top = 44, ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Responsabil", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
PROCEDURE actualizeaza_grid1
LPARAMETERS pcFiltru
LOCAL lcFiltru
lcFiltru=pcFiltru
IF EMPTY(lcFiltru)
lcFiltru=poresponsabili.ca_baza1.cfiltru
ENDIF
save_grid_tag(thisform._gnom_responsabili)
poresponsabili.ca_baza1.cfiltru=lcFiltru
poresponsabili.ca_baza1.afisare()
restore_grid_tag(thisform._gnom_responsabili)
IF RECCOUNT('v_responsabili')>0
thisform._gnom_responsabili.SetFocus()
ELSE
thisform.lb_nom_responsabili.SetFocus()
ENDIF
ENDPROC
PROCEDURE do_adauga
SELECT v_responsabili
SCATTER NAME loRec blank
DO Adauga_Modifica_Inregistrare WITH "responsabili",loRec,,"INSERT"
this.actualizeaza_grid1()
ENDPROC
PROCEDURE do_cauta
Local lcFiltru
lcFiltru=[]
lcNume = STRTRAN(Upper(Alltrim(This.lb_nom_responsabili.text_simplu1.value)),['],[''])
If !Empty(lcNume)
lcFiltru=[nume like ']+lcNume+[%']
ELSE
lcFiltru = [2=2]
Endif
This.MousePointer= 11
This.LockScreen=.T.
Thisform.actualizeaza_grid1(lcFiltru)
IF RECCOUNT()=0
MESSAGEBOX("Cautarea nu a intors rezultate!",0+64,"Info cautare")
ENDIF
This.LockScreen=.F.
This.MousePointer= 0
ENDPROC
PROCEDURE do_modifica
Select v_responsabili
Scatter Name loRec
Do Adauga_Modifica_Inregistrare With "responsabili",loRec,loRec.Id_responsabil,"UPDATE"
thisform.actualizeaza_grid1()
ENDPROC
PROCEDURE do_sterge
SELECT v_responsabili
SCATTER NAME lorec
Do STERGE_INREGISTRARE With "responsabili",loRec.id_responsabil
this.actualizeaza_grid1()
ENDPROC
PROCEDURE KeyPress
Lparameters nKeyCode, nShiftAltCtrl
lcActiveControl = UPPER(ALLTRIM(this.ActiveControl.name))
IF nKeyCode=13 AND lcActiveControl = '_GNOM_RESPONSABILI'
Nodefault
this.LB_nom_responsabili.SetFocus
ENDIF
DODEFAULT(nKeyCode, nShiftAltCtrl)
ENDPROC
PROCEDURE log
LPARAMETERS tctabela,tnId
lcId = ALLTRIM(STR(tnId))
lctabela = UPPER(ALLTRIM(tctabela))
PRIVATE polog,pcschema1,pcselect1
STORE '' TO polog
pcschema1 = ['']
pcselect1=['select * from ] + gcS + [.vlog where ']
pcorder1=['dataora']
pcfiltru1 = [tabel = '] + lctabela + [' and id_tabel = ] + lcId
gencursor('polog','v_log',pcselect1,pcfiltru1,pcschema1,pcorder1)
polog.ca_baza1.afisare()
ofrmlog=CREATEOBJECT('frm_log')
ofrmlog.show(1)
RELEASE polog
ENDPROC
PROCEDURE Unload
IF USED('v_responsabili')
USE IN v_responsabili
ENDIF
ENDPROC
PROCEDURE _gnom_responsabili.Column1.Text1.DblClick
thisform.log("NOM_RESPONSABILI",v_responsabili.id_responsabil)
ENDPROC
ENDDEFINE
DEFINE CLASS frm_responsabili_nou AS _frmbase OF "..\..\comun\clase\_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="_checkbox1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="Cus_odata_responsabili1" UniqueID="" Timestamp="" />
*< OBJECTDATA: ObjPath="_checkbox2" UniqueID="" Timestamp="" />
*<DefinedPropArrayMethod>
*p: nid
*p: orec
*</DefinedPropArrayMethod>
*<PropValue>
BorderStyle = 1
DoCreate = .T.
Height = 166
Name = "frm_responsabili_nou"
Width = 375
_shape1.Name = "_shape1"
_shape2.Height = 29
_shape2.Left = 312
_shape2.Name = "_shape2"
_shape2.Top = 0
_shape2.Width = 62
Lb_titlu_alb_b121.Caption = "Responsabili"
Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
Lb_titlu_alb_b121.TabIndex = 7
BUT_TERMIN1.Name = "BUT_TERMIN1"
BUT_TERMIN1.TabIndex = 5
*</PropValue>
ADD OBJECT '_checkbox1' AS _checkbox WITH ;
Alignment = 0, ;
Caption = "Ales", ;
ControlSource = "porec.ales", ;
Height = 17, ;
Left = 33, ;
Name = "_checkbox1", ;
TabIndex = 3, ;
TabStop = .F., ;
Top = 120, ;
Width = 42
*< END OBJECT: ClassLib="..\..\comun\clase\_baza.vcx" BaseClass="checkbox" />
ADD OBJECT '_checkbox2' AS _checkbox WITH ;
Alignment = 0, ;
Caption = "Inactiv", ;
ControlSource = "porec.inactiv", ;
Left = 33, ;
Name = "_checkbox2", ;
TabIndex = 4, ;
TabStop = .F., ;
Top = 144
*< END OBJECT: ClassLib="..\..\comun\clase\_baza.vcx" BaseClass="checkbox" />
ADD OBJECT 'But_renunt1' AS but_renunt WITH ;
Left = 312, ;
Name = "But_renunt1", ;
TabIndex = 6, ;
Top = 1
*< END OBJECT: ClassLib="..\..\comun\clase\cmd_butoane.vcx" BaseClass="commandbutton" />
ADD OBJECT 'Clb_tx_simplu1' AS clb_tx_simplu WITH ;
Left = 31, ;
Name = "Clb_tx_simplu1", ;
TabIndex = 1, ;
Top = 44, ;
Text_simplu1.ControlSource = "porec.nume", ;
Text_simplu1.Format = "!K", ;
Text_simplu1.InputMask = "", ;
Text_simplu1.Name = "Text_simplu1", ;
Text_simplu1.Value = , ;
Lb_simplu1.Caption = "Responsabil", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Clb_tx_simplu2' AS clb_tx_simplu WITH ;
Left = 31, ;
Name = "Clb_tx_simplu2", ;
TabIndex = 2, ;
Top = 83, ;
Text_simplu1.ControlSource = "porec.functie", ;
Text_simplu1.Format = "!K", ;
Text_simplu1.Name = "Text_simplu1", ;
Lb_simplu1.Caption = "Functie", ;
Lb_simplu1.Name = "Lb_simplu1"
*< END OBJECT: ClassLib="..\..\comun\clase\lb_tx.vcx" BaseClass="container" />
ADD OBJECT 'Cus_odata_responsabili1' AS cus_odata_responsabili WITH ;
Left = 336, ;
Name = "Cus_odata_responsabili1", ;
Top = 48
*< END OBJECT: ClassLib="onom_clienti.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
PLRETURN=This.cus_odata_responsabili1.salvare(This.OREC,This.NID)
Return PLRETURN
ENDPROC
PROCEDURE Init
LPARAMETERS toRec, tnId, tcActiune
DODEFAULT()
this.orec= toRec
this.nid = tnId
this.cus_odata_RESPONSABILI1.cactiune = tcActiune
ENDPROC
PROCEDURE _checkbox1.DblClick
this.Value = ABS(this.Value - 1)
ENDPROC
PROCEDURE _checkbox2.DblClick
this.Value = ABS(this.Value - 1)
ENDPROC
ENDDEFINE
DEFINE CLASS frm_tipc AS _frmbase OF "..\..\comun\clase\_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="" />
*<PropValue>
BorderStyle = 3
DoCreate = .T.
Height = 153
Name = "frm_tipc"
Width = 787
_shape1.Anchor = 11
_shape1.Height = 29
_shape1.Left = 0
_shape1.Name = "_shape1"
_shape1.Top = 0
_shape1.Width = 788
_shape2.Anchor = 9
_shape2.Height = 29
_shape2.Left = 756
_shape2.Name = "_shape2"
_shape2.Top = -1
_shape2.Width = 32
Lb_titlu_alb_b121.Caption = "Tipuri contracte"
Lb_titlu_alb_b121.Name = "Lb_titlu_alb_b121"
BUT_TERMIN1.Anchor = 9
BUT_TERMIN1.Left = 757
BUT_TERMIN1.Name = "BUT_TERMIN1"
BUT_TERMIN1.Top = 0
*</PropValue>
ADD OBJECT '_grdrow1' AS _grdrow WITH ;
Anchor = 15, ;
ColumnCount = 3, ;
DeleteMark = .F., ;
Height = 110, ;
Left = 5, ;
Name = "_grdrow1", ;
Panel = 1, ;
ReadOnly = .T., ;
RecordMark = .F., ;
RecordSource = "tTipc", ;
Top = 37, ;
Width = 775, ;
Column1.ControlSource = "recno()", ;
Column1.Name = "Column1", ;
Column1.ReadOnly = .T., ;
Column1.Width = 39, ;
Column2.ControlSource = "tipc", ;
Column2.Name = "Column2", ;
Column2.ReadOnly = .T., ;
Column2.Width = 148, ;
Column3.ControlSource = "explicatie", ;
Column3.Name = "Column3", ;
Column3.ReadOnly = .T., ;
Column3.Width = 563
*< END OBJECT: ClassLib="..\..\comun\clase\_grd_base.vcx" BaseClass="grid" />
ADD OBJECT '_grdrow1.Column1.Header1' AS header WITH ;
Alignment = 2, ;
Caption = "Nr. crt.", ;
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 contract", ;
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 = "Descriere", ;
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" />
ENDDEFINE