fork download
  1. Imports Predictive.DAL
  2.  
  3. Partial Class DesktopModules_PredictiveMaintenance_BatchesSearch_BatchesSearch
  4. Inherits Entities.Modules.PortalModuleBase
  5.  
  6. Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
  7. If Not IsPostBack Then
  8. Try
  9. BindGrid("Where BATCHNO='-1'")
  10. Catch ex As Exception
  11. ProcessModuleLoadException(Me, ex)
  12. End Try
  13.  
  14. End If
  15. End Sub
  16.  
  17. Private Sub BindGrid(ByVal whereClause As String)
  18. Dim sampleCtrl As New SampleController
  19. Dim samples As List(Of Sample)
  20.  
  21. samples = sampleCtrl.GetSampleFiles(whereClause)
  22.  
  23. gvBatches.DataSource = samples
  24. gvBatches.DataBind()
  25. End Sub
  26.  
  27. Protected Sub btnSend_Click(sender As Object, e As ImageClickEventArgs) Handles btnSend.Click
  28. Dim whereclause As String = ""
  29. Dim custnum As String = txtCustNum.Text.Trim
  30. Dim unum As String = txtUnum.Text.Trim
  31.  
  32. If custnum <> "" Then
  33. If InStr(custnum, "%") > 0 Then
  34. whereclause = whereclause & " AND CUSTNUM LIKE '" & custnum & "'"
  35. Else
  36. whereclause = whereclause & " AND CUSTNUM LIKE '" & custnum & "%'"
  37. End If
  38. End If
  39. If unum <> "" Then
  40. If InStr(unum, "%") > 0 Then
  41. whereclause = whereclause & " AND UNUM LIKE '" & unum & "'"
  42. Else
  43. whereclause = whereclause & " AND UNUM LIKE '" & unum & "%'"
  44. End If
  45. End If
  46.  
  47. If whereclause <> "" Then
  48. whereclause = " WHERE " & Right(whereclause, Len(whereclause) - 5)
  49. End If
  50.  
  51. BindGrid(whereclause)
  52. End Sub
  53.  
  54. Protected Sub gvBatches_PageIndexChanging(sender As Object, e As GridViewPageEventArgs) Handles gvBatches.PageIndexChanging
  55. Dim whereclause As String = ""
  56. Dim custnum As String = txtCustNum.Text.Trim
  57. Dim unum As String = txtUnum.Text.Trim
  58.  
  59. If custnum <> "" Then
  60. If InStr(custnum, "%") > 0 Then
  61. whereclause = whereclause & " AND CUSTNUM LIKE '" & custnum & "'"
  62. Else
  63. whereclause = whereclause & " AND CUSTNUM LIKE '" & custnum & "%'"
  64. End If
  65. End If
  66. If unum <> "" Then
  67. If InStr(unum, "%") > 0 Then
  68. whereclause = whereclause & " AND UNUM LIKE '" & unum & "'"
  69. Else
  70. whereclause = whereclause & " AND UNUM LIKE '" & unum & "%'"
  71. End If
  72. End If
  73.  
  74. If whereclause <> "" Then
  75. whereclause = " WHERE " & Right(whereclause, Len(whereclause) - 5)
  76. End If
  77. Dim sampleCtrl As New SampleController
  78. Dim samples As List(Of Sample)
  79.  
  80. samples = sampleCtrl.GetSampleFiles(whereClause)
  81.  
  82. gvBatches.PageIndex = e.NewPageIndex
  83. gvBatches.DataSource = samples
  84. gvBatches.DataBind()
  85. End Sub
  86. End Class
  87.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Visual Basic.Net Compiler version 0.0.0.5943 (Mono 3.8 - tarball)
Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved.

/home/dprNGV/prog.vb (1,21) : warning VBNC40056: Namespace or type specified in the Imports 'Predictive.DAL' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
/home/dprNGV/prog.vb (4,22) : error VBNC30451: 'Entities' is not declared. It may be inaccessible due to its protection level.
There were 1 errors and 1 warnings.
Compilation took 00:00:00.7382330
stdout
Standard output is empty