/e_desk/reportsmenu_hd.aspx.vb

http://github.com/shafiqissani/eDesk-Systems · Visual Basic · 59 lines · 40 code · 15 blank · 4 comment · 0 complexity · 9d7dc26d01c36646e8ba6926bdb37986 MD5 · raw file

  1. Imports System.Data
  2. Imports System.Data.SqlClient
  3. Namespace e_desk
  4. Partial Class reportsmenu_hd
  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. End Sub
  19. Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
  20. Dim con As SqlConnection = New SqlConnection("Server=(local);uid=sa;database=eDesk")
  21. con.Open()
  22. Dim str As String
  23. p1.Visible = True
  24. l1.Text = "Pending problems Report"
  25. l1.Visible = True
  26. str = "select problemid,categorycode,modulecode,sub,problem,userid from problems_master where status = 'Open'"
  27. Dim cmd As New SqlCommand(str, con)
  28. p1.DataSource = cmd.ExecuteReader
  29. p1.DataBind()
  30. End Sub
  31. Private Sub LinkButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton2.Click
  32. Dim con As SqlConnection = New SqlConnection("Server=(local);uid=sa;database=eDesk")
  33. con.Open()
  34. Dim str As String
  35. p1.Visible = True
  36. l1.Text = "Completed problems Report"
  37. l1.Visible = True
  38. str = "select problemid,categorycode,modulecode,sub,problem,userid from problems_master where status = 'Close'"
  39. Dim cmd As New SqlCommand(str, con)
  40. p1.DataSource = cmd.ExecuteReader
  41. p1.DataBind()
  42. End Sub
  43. End Class
  44. End Namespace