#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
End Sub
Sub Globals
Private lPeriode1 As Label
Private lPeriode2 As Label
Dim items As List
Private dgv As B4XTable
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Layout1")
items.Initialize
general.FormatColumn(dgv.AddColumn("PERIODE",dgv.COLUMN_TYPE_TEXT),0,60dip)
general.FormatColumn(dgv.AddColumn("GROSS",dgv.COLUMN_TYPE_NUMBERS),0,160dip)
general.FormatColumn(dgv.AddColumn("DISC",dgv.COLUMN_TYPE_NUMBERS),0,140dip)
general.FormatColumn(dgv.AddColumn("NET",dgv.COLUMN_TYPE_NUMBERS),0,160dip)
dgv.NumberOfFrozenColumns = 2
End Sub
Sub Activity_Resume
RefreshData
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Public Sub Wilayah_Data(Success As Boolean,Data As Object)
If Success Then
If Data.As(List).Size = 0 Then
ToastMessageShow("Data Not Found",True)
Else
items = Data
DisplayTable
End If
Else
MsgboxAsync(Data.As(String),"Response Server")
End If
ProgressDialogHide
End Sub
public Sub RefreshData
If items.IsInitialized = False Then items.Initialize Else items.Clear
wilayah.Data(Me)
End Sub
Private Sub DisplayTable()
Dim Ds As List
Ds.Initialize
For Each m As Map In items
Dim row As List
row.Initialize
row.Add(m.Get("periode"))
row.Add(100016516516132)
row.Add(2000000000)
row.Add(564613123032000)
Ds.Add(row)
Next
dgv.SetData(Ds)
End Sub