PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/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
 1Imports System.Data
 2Imports System.Data.SqlClient
 3
 4
 5Namespace e_desk
 6
 7Partial Class reportsmenu_hd
 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    End Sub
29
30    Private Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
31        Dim con As SqlConnection = New SqlConnection("Server=(local);uid=sa;database=eDesk")
32        con.Open()
33        Dim str As String
34
35        p1.Visible = True
36        l1.Text = "Pending problems Report"
37        l1.Visible = True
38
39        str = "select problemid,categorycode,modulecode,sub,problem,userid from problems_master where status = 'Open'"
40        Dim cmd As New SqlCommand(str, con)
41        p1.DataSource = cmd.ExecuteReader
42        p1.DataBind()
43    End Sub
44
45    Private Sub LinkButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton2.Click
46        Dim con As SqlConnection = New SqlConnection("Server=(local);uid=sa;database=eDesk")
47        con.Open()
48        Dim str As String
49        p1.Visible = True
50        l1.Text = "Completed problems Report"
51        l1.Visible = True
52        str = "select problemid,categorycode,modulecode,sub,problem,userid from problems_master where status = 'Close'"
53        Dim cmd As New SqlCommand(str, con)
54        p1.DataSource = cmd.ExecuteReader
55        p1.DataBind()
56    End Sub
57End Class
58
59End Namespace