PageRenderTime 36ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/e_desk/reports_menu_admin.aspx.vb

http://github.com/shafiqissani/eDesk-Systems
Visual Basic | 64 lines | 42 code | 18 blank | 4 comment | 0 complexity | 033e32444df45162baabba0796587e83 MD5 | raw file
  1. Imports System.Data
  2. Imports System.Data.SqlClient
  3. Namespace e_desk
  4. Partial Class reports_menu_admin
  5. Inherits System.Web.UI.Page
  6. #Region " Web Form Designer Generated Code "
  7. 'This call is required by the Web Form Designer.
  8. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  9. End Sub
  10. Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
  11. 'CODEGEN: This method call is required by the Web Form Designer
  12. 'Do not modify it using the code editor.
  13. InitializeComponent()
  14. End Sub
  15. #End Region
  16. Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  17. 'Put user code to initialize the page here
  18. l1.Visible = False
  19. p1.Visible = False
  20. End Sub
  21. Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
  22. Dim con As SqlConnection = New SqlConnection("Server=(local);uid=sa;database=eDesk")
  23. con.Open()
  24. Dim str As String
  25. p1.Visible = True
  26. l1.Text = "Pending problems Report"
  27. l1.Visible = True
  28. str = "select problemid,categorycode,modulecode,sub,problem,userid from problems_master where status = 'Open'"
  29. Dim cmd As New SqlCommand(str, con)
  30. p1.DataSource = cmd.ExecuteReader
  31. p1.DataBind()
  32. End Sub
  33. Private Sub LinkButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton2.Click
  34. Dim con As SqlConnection = New SqlConnection("Server=(local);uid=sa;database=eDesk")
  35. con.Open()
  36. Dim str As String
  37. p1.Visible = True
  38. l1.Text = "Completed problems Report"
  39. l1.Visible = True
  40. str = "select problemid,categorycode,modulecode,sub,problem,userid from problems_master where status = 'Close'"
  41. Dim cmd As New SqlCommand(str, con)
  42. p1.DataSource = cmd.ExecuteReader
  43. p1.DataBind()
  44. End Sub
  45. End Class
  46. End Namespace