Private Sub addrecbtn_Click
Dim timeinstr As String
Dim timeoutstr As String
Dim tottimestr As String
Dim costcenterstr As String
Dim summarystr As String
'<<--- Fill Options combo here --->>
Dim thetime As String
Wait For (timedialog.ShowDialog(Options1, "Ok", "Cancel")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
Dim intime As Period = Options1.Get("timein")
thetime=NumberFormat(intime.Hours,2,0)&":"&NumberFormat(intime.Minutes,2,0)
timeinstr=utils.ConvertTo12HrTime(thetime,True)
Dim outtime As Period = Options1.Get("timeout")
thetime=NumberFormat(outtime.Hours,2,0)&":"&NumberFormat(outtime.Minutes,2,0)
timeoutstr=utils.ConvertTo12HrTime(thetime,True)
Dim timediff As Period
DateTime.TimeFormat="hh:mm a"
timediff= DateUtils.PeriodBetween( DateTime.TimeParse( timeinstr),DateTime.TimeParse(timeoutstr))
tottimestr=NumberFormat(timediff.Hours,2,0)&":"&NumberFormat(timediff.Minutes,2,0)
costcenterstr=Options1.Get("costcenter")
summarystr=Options1.Get("summary")
addrawdataitem(timeinstr,timeoutstr,tottimestr,costcenterstr,summarystr)
End If
End Sub