PageRenderTime 102ms CodeModel.GetById 60ms app.highlight 5ms RepoModel.GetById 35ms app.codeStats 1ms

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