Code : Tout sélectionner
#StringFont = $FAF1A3
#StringText = $5700AE
#ListconFont = $DAF2F3
#ListconText = $AA5500
Enumeration
#Newgest
EndEnumeration
Enumeration
#NgOng
#FrameZrecC
#RecIntiC
#RecTeleC
#LstClie
#FrameZrecF
#RecCompF
#RecIntiF
#RecTeleF
#LstFour
#lDate
#NgDate
#NgButAban
#RecCompC
#bArticles
EndEnumeration
Global RacineCompteClients.s
Global RacineCompteFournisseurs.s
Global NewNumCompteC.s
Global NewNumCompteF.s
RacineCompteFournisseurs = "401"
RacineCompteClients = "411"
Procedure wiNewgest()
If OpenWindow(#Newgest, 243, 41, 710, 581, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered, "NewGest")
If CreateGadgetList(WindowID())
TextGadget(#lDate, 420, 10, 70, 20, "Date du Jour :")
StringGadget(#NgDate, 500, 10, 190, 20, "")
ButtonGadget(#NgButAban, 580, 550, 110, 20, "Abandon")
SetGadgetColor(#NgDate, #StringText, #StringFont)
If LoadFont(0, "Arial", 9, #PB_Font_Bold)
SetGadgetFont(#NgDate, FontID())
EndIf
;- NgOng
PanelGadget(#NgOng, 20, 30, 670, 510)
AddGadgetItem(#NgOng, -1, "Clients")
Frame3DGadget(#FrameZrecC, 3, 28, 657, 60, "Zone de Recherche")
StringGadget(#RecCompC, 8, 58, 60, 20, "411", #PB_String_UpperCase)
SetGadgetColor(#RecCompC, #StringText, #StringFont)
SetGadgetFont(#RecCompC, FontID())
StringGadget(#RecIntiC, 68, 58, 220, 20, "", #PB_String_UpperCase)
SetGadgetColor(#RecIntiC, #StringText, #StringFont)
SetGadgetFont(#RecIntiC, FontID())
StringGadget(#RecTeleC, 288, 58, 100, 20, "", #PB_String_UpperCase)
SetGadgetColor(#RecTeleC, #StringText, #StringFont)
SetGadgetFont(#RecTeleC, FontID())
ListIconGadget(#LstClie, 8, 98, 650, 380, "Compte", 60, #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect)
AddGadgetColumn(#LstClie, 2, "Intitulé", 180)
AddGadgetColumn(#LstClie, 3, "Téléphone", 100)
AddGadgetColumn(#LstClie, 4, "Adresse", 200)
AddGadgetColumn(#LstClie, 5, "C.A.", 65)
SetListIconGadgetColor(#LstClie, #ListconFont)
;-
AddGadgetItem(#NgOng, -1, "Fournisseurs")
Frame3DGadget(#FrameZrecF, 3, 28, 657, 60, "Zone de Recherche")
StringGadget(#RecCompF, 8, 58, 60, 20, "401", #PB_String_UpperCase)
SetGadgetColor(#RecCompF, #StringText, #StringFont)
SetGadgetFont(#RecCompF, FontID())
StringGadget(#RecIntiF, 68, 58, 220, 20, "", #PB_String_UpperCase)
SetGadgetColor(#RecIntiF, #StringText, #StringFont)
SetGadgetFont(#RecIntiF, FontID())
StringGadget(#RecTeleF, 288, 58, 100, 20, "", #PB_String_UpperCase)
SetGadgetColor(#RecTeleF, #StringText, #StringFont)
SetGadgetFont(#RecTeleF, FontID())
;-
ListIconGadget(#LstFour, 8, 98, 650, 380, "Compte", 60, #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect)
AddGadgetColumn(#LstFour, 2, "Intitulé", 180)
AddGadgetColumn(#LstFour, 3, "Téléphone", 100)
AddGadgetColumn(#LstFour, 4, "Adresse", 200)
AddGadgetColumn(#LstFour, 5, "C.A.", 65)
SetListIconGadgetColor(#LstFour, #ListconFont)
AddGadgetItem(#NgOng, -1, "Gestion")
HyperLinkGadget(#bArticles, 25, 40, 150, 20, "Gestion des Articles", $2C16A4 )
SetGadgetFont(#bArticles, FontID())
AddGadgetItem(#NgOng, -1, "Utilitaires")
CloseGadgetList()
EndIf
EndIf
; HideWindow( #Newgest, 1 )
EndProcedure
Procedure Wait()
boucle.l = 0
Repeat
ev = WaitWindowEvent()
boucle = boucle + 1
Debug Boucle
Until ev = #PB_EventCloseWindow
EndProcedure
Procedure evNewgest()
Repeat
Event = WaitWindowEvent()
If Event = #PB_EventGadget
Evtype = EventType()
GadgetID = EventGadgetID()
If GadgetID = #NgOng
Debug "GadgetID: #NgOng"
ElseIf GadgetID = #RecCompC Or GadgetID = #RecIntiC Or GadgetID = #RecTeleC
If evType = #PB_EventType_Focus
Debug "Avant Procedure à intégrer I"
; Procedure à intégrer
EndIf
ElseIf GadgetID = #RecCompF Or GadgetID = #RecIntiF Or GadgetID = #RecTeleF
If evType = #PB_EventType_Focus
Debug "Avant Procedure à intégrer II"
; Procedure à intégrer
EndIf
ElseIf GadgetID = #LstClie Or GadgetID = #LstFour
If evType = #PB_EventType_Focus
If GadgetID = #LstClie
; chargement de variable
ElseIf GadgetID = #LstFour
; chargement de variable
EndIf
Debug "Avant Procedure à intégrer III"
; Procedure à intégrer
EndIf
ElseIf GadgetID = #NgDate
Debug "GadgetID: #NgDate"
ElseIf GadgetID = #NgButAban
Debug "GadgetID: #NgButAban"
Break
ElseIf GadgetID = #bArticles
Debug "GadgetID: #bArticle"
; Procedure à intégrer
EndIf
EndIf
Until Event = #PB_EventCloseWindow
EndProcedure
wiNewgest()
evNewgest()