Sub search_FA_button_click
currentPage="searchFAlist"
Dim Position As Int
Dim Findrow As Int = Position
Dim Cursor15 As Cursor
Dim FA As String
FA=FA_ser.Text
If FA.Length=0 Then
ToastMessageShow("Please Fill the above field",False)
Else
'ToastMessageShow("search by FA",False)
Cursor15 = SQL1.ExecQuery("Select * FROM FAid WHERE Situation like '%"& FA &"%' ")
Cursor15.Position = Findrow
End If
If Cursor15.rowcount>0 Then
If FA.Length>0 Then
Activity.RemoveAllViews
Activity.RemoveView
Activity.LoadLayout("Flist.bal")
Activity.LoadLayout("faith.bal")
Dim moreinfoBtn As Bitmap
moreinfoBtn.Initialize(File.DirAssets, "moreinfobtn.png")
Dim sevr As String
sevr=""&Cursor15.GetString("Severity")
For i = 0 To Cursor15.RowCount - 1
Cursor15.Position = i
FA_s_lv.ScrollingBackgroundColor = Colors.White
FA_s_lv.TwoLinesAndBitmap.Label.TextSize = 15
FA_s_lv.TwoLinesAndBitmap.Label.TextColor = Colors.Black
FA_s_lv.TwoLinesAndBitmap.SecondLabel.TextSize = 13
FA_s_lv.TwoLinesAndBitmap.SecondLabel.TextColor = Colors.DarkGray
FA_s_lv.AddTwoLinesAndBitmap((Cursor15.GetString("Situation")),(Cursor15.GetString("Severity")),moreinfoBtn)
Next
ToastMessageShow("" &Cursor15.RowCount& " Results Found", False)
End If
Else
ToastMessageShow("No Results Found",False) 'in case cursor15 is empty
End If
End Sub