Hi Johan, thanks for the information, I hope this enough for you to go on...
Code: Select all
METHOD Init(oWindow,iCtlID,oServer,uExtra) CLASS JobInfo_DETAIL
LOCAL olServer AS OBJECT
LOCAL DIM aFonts[3] AS OBJECT
LOCAL DIM aBrushes[3] AS OBJECT
self:PreInit(oWindow,iCtlID,oServer,uExtra)
SUPER:Init(oWindow,ResourceID{"JobInfo_DETAIL",_GetInst()},iCtlID)
aFonts[1] := Font{,10,"Microsoft Sans Serif"}
aFonts[1]:Bold := TRUE
aFonts[2] := Font{,10,"Microsoft Sans Serif"}
aFonts[3] := Font{,11,"Microsoft Sans Serif"}
aFonts[3]:Bold := TRUE
aBrushes[1] := Brush{Color{COLORYELLOW}}
aBrushes[2] := Brush{Color{COLORBLACK}}
aBrushes[3] := Brush{Color{239,239,239}}
oDCJOBNUMBER := SingleLineEdit{SELF,ResourceID{JOBINFO_DETAIL_JOBNUMBER,_GetInst()}}
oDCJOBNUMBER:FieldSpec := DETAILS_JOBNUMBER{}
oDCJOBNUMBER:HyperLabel := HyperLabel{#JOBNUMBER,"Job Number:",NULL_STRING,"DETAILS_JOBNUMBER"}
oDCJOBNUMBER:TextColor := Color{COLORRED}
oDCJOBNUMBER:BackGround := aBrushes[1]
oDCJOBNUMBER:Font(aFonts[1], FALSE)
oDCJOBFIN := CheckBox{SELF,ResourceID{JOBINFO_DETAIL_JOBFIN,_GetInst()}}
oDCJOBFIN:HyperLabel := HyperLabel{#JOBFIN,"Complete?",NULL_STRING,"DETAILS_JOBFIN"}
oDCJOBFIN:FieldSpec := DETAILS_JOBFIN{}
oDCJOBFIN:Font(aFonts[2], FALSE)
oDCPONumber := SingleLineEdit{SELF,ResourceID{JOBINFO_DETAIL_PONUMBER,_GetInst()}}
oDCPONumber:HyperLabel := HyperLabel{#PONumber,"PO Number",NULL_STRING,NULL_STRING}
oDCPONumber:FieldSpec := DETAILS_PONUMBER{}
oDCPONumber:Font(aFonts[2], FALSE)
oDCRATE := SingleLineEdit{SELF,ResourceID{JOBINFO_DETAIL_RATE,_GetInst()}}
oDCRATE:FieldSpec := DETAILS_RATE{}
oDCRATE:HyperLabel := HyperLabel{#RATE,"Rate/Price",NULL_STRING,NULL_STRING}
oDCRATE:Font(aFonts[2], FALSE)
oDCUNITS := SingleLineEdit{SELF,ResourceID{JOBINFO_DETAIL_UNITS,_GetInst()}}
oDCUNITS:HyperLabel := HyperLabel{#UNITS,"Units",NULL_STRING,NULL_STRING}
oDCUNITS:FieldSpec := DETAILS_UNITS{}
oDCUNITS:Font(aFonts[2], FALSE)
oDCComboBox1 := combobox{SELF,ResourceID{JOBINFO_DETAIL_COMBOBOX1,_GetInst()}}
olServer := RATES{}
oDCComboBox1:FillUsing(olServer,#RATETYPE,#RATETYPE)
olServer:Close()
oDCComboBox1:HyperLabel := HyperLabel{#ComboBox1,NULL_STRING,NULL_STRING,NULL_STRING}
oDCComboBox1:FieldSpec := DETAILS_RATETYPE{}
oDCComboBox1:Font(aFonts[2], FALSE)
oDCRego := SingleLineEdit{SELF,ResourceID{JOBINFO_DETAIL_REGO,_GetInst()}}
oDCRego:HyperLabel := HyperLabel{#Rego,"Registration",NULL_STRING,NULL_STRING}
oDCRego:Font(aFonts[2], FALSE)
oDCSubby := SingleLineEdit{SELF,ResourceID{JOBINFO_DETAIL_SUBBY,_GetInst()}}
oDCSubby:FieldSpec := DETAILS_SUBBY{}
oDCSubby:HyperLabel := HyperLabel{#Subby,"Subcontractor",NULL_STRING,NULL_STRING}
oDCSubby:Font(aFonts[2], FALSE)
oDCJOBDETAILS := MultiLineEdit{SELF,ResourceID{JOBINFO_DETAIL_JOBDETAILS,_GetInst()}}
oDCJOBDETAILS:FieldSpec := DETAILS_JOBDETAILS{}
oDCJOBDETAILS:HyperLabel := HyperLabel{#JOBDETAILS,"Job Details",NULL_STRING,"DETAILS_JOBDETAILS"}
oDCJOBDETAILS:Font(aFonts[2], FALSE)
oDCNPC := MultiLineEdit{SELF,ResourceID{JOBINFO_DETAIL_NPC,_GetInst()}}
oDCNPC:HyperLabel := HyperLabel{#NPC,"Non Printing Comments","Text placed in this field DOES NOT appear on any standard report. It can however be used in a custom report.","Text placed in this field DOES NOT appear on any standard report. It can however be used in a custom report."}
oDCNPC:FieldSpec := DETAILS_NPC{}
oDCNPC:UseHLforToolTip := True
oDCNPC:Font(aFonts[2], FALSE)
oDCSC_JOBDATE := FixedText{SELF,ResourceID{JOBINFO_DETAIL_SC_JOBDATE,_GetInst()}}
oDCSC_JOBDATE:HyperLabel := HyperLabel{#SC_JOBDATE,"Job Date:",NULL_STRING,NULL_STRING}
oDCSC_JOBDATE:Font(aFonts[2], FALSE)
oDCSC_JOBTIME := FixedText{SELF,ResourceID{JOBINFO_DETAIL_SC_JOBTIME,_GetInst()}}
oDCSC_JOBTIME:HyperLabel := HyperLabel{#SC_JOBTIME,"Job Time:",NULL_STRING,NULL_STRING}
oDCSC_JOBTIME:Font(aFonts[2], FALSE)
oDCGroupBox1 := GroupBox{SELF,ResourceID{JOBINFO_DETAIL_GROUPBOX1,_GetInst()}}
oDCGroupBox1:HyperLabel := HyperLabel{#GroupBox1," Job Details ",NULL_STRING,NULL_STRING}
oDCGroupBox1:Font(aFonts[1], FALSE)
oDCSC_JOBNUMBER := FixedText{SELF,ResourceID{JOBINFO_DETAIL_SC_JOBNUMBER,_GetInst()}}
oDCSC_JOBNUMBER:HyperLabel := HyperLabel{#SC_JOBNUMBER,"Job Number:",NULL_STRING,NULL_STRING}
oDCSC_JOBNUMBER:Font(aFonts[2], FALSE)
oDCFixedText4 := FixedText{SELF,ResourceID{JOBINFO_DETAIL_FIXEDTEXT4,_GetInst()}}
oDCFixedText4:HyperLabel := HyperLabel{#FixedText4,"Customer PO:",NULL_STRING,NULL_STRING}
oDCFixedText4:Font(aFonts[2], FALSE)
oDCFixedText5 := FixedText{SELF,ResourceID{JOBINFO_DETAIL_FIXEDTEXT5,_GetInst()}}
oDCFixedText5:HyperLabel := HyperLabel{#FixedText5,"Quoted Price: $",NULL_STRING,NULL_STRING}
oDCFixedText5:Font(aFonts[2], FALSE)
oDCFixedText6 := FixedText{SELF,ResourceID{JOBINFO_DETAIL_FIXEDTEXT6,_GetInst()}}
oDCFixedText6:HyperLabel := HyperLabel{#FixedText6,"Per Rate Type:",NULL_STRING,NULL_STRING}
oDCFixedText6:Font(aFonts[2], FALSE)
oDCFixedText7 := FixedText{SELF,ResourceID{JOBINFO_DETAIL_FIXEDTEXT7,_GetInst()}}
oDCFixedText7:HyperLabel := HyperLabel{#FixedText7,"Registration:",NULL_STRING,NULL_STRING}
oDCFixedText7:Font(aFonts[2], FALSE)
oDCFixedText8 := FixedText{SELF,ResourceID{JOBINFO_DETAIL_FIXEDTEXT8,_GetInst()}}
oDCFixedText8:HyperLabel := HyperLabel{#FixedText8,"Subcontractor:",NULL_STRING,NULL_STRING}
oDCFixedText8:Font(aFonts[2], FALSE)
oDCGroupBox2 := GroupBox{SELF,ResourceID{JOBINFO_DETAIL_GROUPBOX2,_GetInst()}}
oDCGroupBox2:HyperLabel := HyperLabel{#GroupBox2," Non-Printing Comments ",NULL_STRING,NULL_STRING}
oDCGroupBox2:Font(aFonts[1], FALSE)
oDCFixedText9 := FixedText{SELF,ResourceID{JOBINFO_DETAIL_FIXEDTEXT9,_GetInst()}}
oDCFixedText9:HyperLabel := HyperLabel{#FixedText9,"Invoice Total:",NULL_STRING,NULL_STRING}
oDCFixedText9:Font(aFonts[2], FALSE)
oDCFixedText11 := FixedText{SELF,ResourceID{JOBINFO_DETAIL_FIXEDTEXT11,_GetInst()}}
oDCFixedText11:HyperLabel := HyperLabel{#FixedText11,"Units:",NULL_STRING,NULL_STRING}
oDCFixedText11:Font(aFonts[2], FALSE)
oDCSingleLineEdit10 := SingleLineEdit{SELF,ResourceID{JOBINFO_DETAIL_SINGLELINEEDIT10,_GetInst()}}
oDCSingleLineEdit10:HyperLabel := HyperLabel{#SingleLineEdit10,NULL_STRING,NULL_STRING,NULL_STRING}
oDCSingleLineEdit10:TextColor := Color{COLORYELLOW}
oDCSingleLineEdit10:BackGround := aBrushes[2]
oDCSingleLineEdit10:Font(aFonts[1], FALSE)
oDCSLEInvtxt := FixedText{SELF,ResourceID{JOBINFO_DETAIL_SLEINVTXT,_GetInst()}}
oDCSLEInvtxt:HyperLabel := HyperLabel{#SLEInvtxt,NULL_STRING,NULL_STRING,NULL_STRING}
oDCSLEInvtxt:BackGround := aBrushes[3]
oDCSLEInvtxt:TextColor := Color{255,0,0}
oDCSLEInvtxt:Font(aFonts[3], FALSE)
oDCDateTimePicker2 := DateTimePicker{SELF,ResourceID{JOBINFO_DETAIL_DATETIMEPICKER2,_GetInst()}}
oDCDateTimePicker2:HyperLabel := HyperLabel{#DateTimePicker2,"DateTimePicker2",NULL_STRING,NULL_STRING}
oDCDateTimePicker3 := DateTimePicker{SELF,ResourceID{JOBINFO_DETAIL_DATETIMEPICKER3,_GetInst()}}
oDCDateTimePicker3:HyperLabel := HyperLabel{#DateTimePicker3,NULL_STRING,NULL_STRING,NULL_STRING}
SELF:Caption := ""
SELF:HyperLabel := HyperLabel{#JobInfo_DETAIL,NULL_STRING,NULL_STRING,NULL_STRING}
SELF:Menu := StandardShellMenu{}
if !IsNil(oServer)
SELF:Use(oServer)
ELSE
SELF:Use(DETAILS{})
ENDIF
self:Browser := DataBrowser{self}
oDBJOBNUMBER := DataColumn{DETAILS_JOBNUMBER{}}
oDBJOBNUMBER:Width := 11
oDBJOBNUMBER:HyperLabel := oDCJOBNUMBER:HyperLabel
oDBJOBNUMBER:Caption := "Job Number:"
oDBJOBNUMBER:TextColor := Color{COLORRED}
oDBJOBNUMBER:BackGround := aBrushes[1]
self:Browser:AddColumn(oDBJOBNUMBER)
oDBCLCODE := DataColumn{DETAILS_CLCODE{}}
oDBCLCODE:Width := 12
oDBCLCODE:HyperLabel := HyperLabel{#CLCODE,"Code",NULL_STRING,"DETAILS_CLCODE"}
oDBCLCODE:Caption := "Code"
self:Browser:AddColumn(oDBCLCODE)
oDBJOBDATE := DataColumn{DETAILS_JOBDATE{}}
oDBJOBDATE:Width := 8
oDBJOBDATE:HyperLabel := HyperLabel{#JobDate,"Date",NULL_STRING,NULL_STRING}
oDBJOBDATE:Caption := "Date"
self:Browser:AddColumn(oDBJOBDATE)
oDBJOBTIME := DataColumn{DETAILS_JOBTIME{}}
oDBJOBTIME:Width := 8
oDBJOBTIME:HyperLabel := HyperLabel{#JobTime,"Time",NULL_STRING,NULL_STRING}
oDBJOBTIME:Caption := "Time"
self:Browser:AddColumn(oDBJOBTIME)
oDBDNAME := DataColumn{DETAILS_DNAME{}}
oDBDNAME:Width := 17
oDBDNAME:HyperLabel := HyperLabel{#DNAME,"Driver",NULL_STRING,NULL_STRING}
oDBDNAME:Caption := "Driver"
self:Browser:AddColumn(oDBDNAME)
oDBJOBDETAILS := DataColumn{DETAILS_JOBDETAILS{}}
oDBJOBDETAILS:Width := 38
oDBJOBDETAILS:HyperLabel := oDCJOBDETAILS:HyperLabel
oDBJOBDETAILS:Caption := "Job Details"
self:Browser:AddColumn(oDBJOBDETAILS)
oDBPONUMBER := DataColumn{DETAILS_PONUMBER{}}
oDBPONUMBER:Width := 18
oDBPONUMBER:HyperLabel := oDCPONUMBER:HyperLabel
oDBPONUMBER:Caption := "PO Number"
self:Browser:AddColumn(oDBPONUMBER)
oDBRATE := DataColumn{DETAILS_RATE{}}
oDBRATE:Width := 11
oDBRATE:HyperLabel := oDCRATE:HyperLabel
oDBRATE:Caption := "Rate/Price"
self:Browser:AddColumn(oDBRATE)
oDBRATETYPE := DataColumn{DETAILS_RATETYPE{}}
oDBRATETYPE:Width := 12
oDBRATETYPE:HyperLabel := HyperLabel{#RATETYPE,"Rate Type",NULL_STRING,NULL_STRING}
oDBRATETYPE:Caption := "Rate Type"
self:Browser:AddColumn(oDBRATETYPE)
oDBUNITS := DataColumn{DETAILS_UNITS{}}
oDBUNITS:Width := 9
oDBUNITS:HyperLabel := oDCUNITS:HyperLabel
oDBUNITS:Caption := "Units"
self:Browser:AddColumn(oDBUNITS)
oDBSUBBY := DataColumn{DETAILS_SUBBY{}}
oDBSUBBY:Width := 34
oDBSUBBY:HyperLabel := oDCSUBBY:HyperLabel
oDBSUBBY:Caption := "Subcontractor"
self:Browser:AddColumn(oDBSUBBY)
oDBREGO := DataColumn{24}
oDBREGO:Width := 24
oDBREGO:HyperLabel := oDCREGO:HyperLabel
oDBREGO:Caption := "Registration"
self:Browser:AddColumn(oDBREGO)
oDBNPC := DataColumn{DETAILS_NPC{}}
oDBNPC:Width := 44
oDBNPC:HyperLabel := oDCNPC:HyperLabel
oDBNPC:Caption := "Non Printing Comments"
self:Browser:AddColumn(oDBNPC)