Commercial Web Server ASP .net Program with Output



Peak load management is required to improve the customer perception of the web site quality of service and to ensure a quality end-user experience to win customer loyalty. The main goal of a session based admission control (SBAC) is the prevention of a web server overload and, as a result, an improvement of the quality of service on a web site

Form1.aspx
Imports System.Data.SqlClient
Namespace airp
Partial Class airinfo
    Inherits System.Web.UI.Page
    Dim cmd As New SqlCommand
    Dim ad As New SqlDataAdapter
    Dim d As DataSet
#Region " Web Form Designer Generated Code "
.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    End Sub
    Protected WithEvents Label2 As System.Web.UI.WebControls.Label
    Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox
    Protected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGrid

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        InitializeComponent()
    End Sub
#End Region
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Call databaseconnection()
        If Page.IsPostBack = False Then
            Dim i As Integer
            cmd = New SqlCommand("select * from allow", con)
            ad = New SqlDataAdapter(cmd)



            d = New DataSet
            ad.Fill(d)
            If d.Tables(0).Rows.Count > 0 Then
                If (d.Tables(0).Rows(0).Item(0) > 0) Then
                    i = d.Tables(0).Rows(0).Item(0)
                ElseIf (d.Tables(0).Rows(0).Item(1) > 0) Then
                    i = d.Tables(0).Rows(0).Item(1)
                End If
            End If
            If (Application("count") < i) Then
            ElseIf Application("walkinuser") = Session("username") Then
                Response.Redirect("serverbusy.aspx")
            End If
            Dim cmd1 As New SqlCommand
            Dim ad1 As New SqlDataAdapter
            Dim d1 As New DataSet
            cmd1 = New SqlCommand("select ent from tempsign where uname='" & Session("uname") & "'", con)
            ad1 = New SqlDataAdapter(cmd1)
            d1 = New DataSet
            ad1.Fill(d1)
            Dim en As Integer
            If d1.Tables(0).Rows.Count > 0 Then
                en = d1.Tables(0).Rows(0).Item(0) + 1
                con.Open()
                Dim cmd2 As New SqlCommand
                cmd2 = New SqlCommand("update tempsign set ent=" & en & " where uname='" & Session("uname") & "'", con)
                cmd2.ExecuteNonQuery()
                con.Close()
            End If
            End If
    End Sub
    Private Sub butshow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butshow.Click
        Try
            cmd = New SqlCommand("select fltname,fltnum from flightn where board='" & txtboard.Text & "'", con)
            ad = New SqlDataAdapter(cmd)
            d = New DataSet
            ad.Fill(d)
            If d.Tables(0).Rows.Count > 0 Then



                DataGrid2.DataSource = d
                DataGrid2.DataBind()
            End If
        Catch ex As Exception
        End Try
    End Sub
End Class
End Namespace

Form2.aspx
Imports System.Data.SqlClient
Namespace airp
Partial Class confirm
    Inherits System.Web.UI.Page
    Dim cmd As New SqlCommand
    Dim ad As New SqlDataAdapter
    Dim d As New DataSet
#Region " Web Form Designer Generated Code "
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    End Sub
    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        InitializeComponent()
    End Sub
#End Region
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
                Call databaseconnection()
            If Page.IsPostBack = False Then
                Dim cmd1 As New SqlCommand
                Dim ad1 As New SqlDataAdapter
                Dim d1 As New DataSet
                cmd1 = New SqlCommand("select ent from tempsign where uname='" & Session("uname") & "'", con)



                ad1 = New SqlDataAdapter(cmd1)
                d1 = New DataSet
                ad1.Fill(d1)
                Dim en As Integer
                If d1.Tables(0).Rows.Count > 0 Then
                    en = d1.Tables(0).Rows(0).Item(0) + 1
                    con.Open()
                    Dim cmd2 As New SqlCommand
                    cmd2 = New SqlCommand("update tempsign set ent=" & en & " where uname='" & Session("uname") & "'", con)
                    cmd2.ExecuteNonQuery()
                    con.Close()
                End If
                If Application("count") < 3 Then
                ElseIf Application("walkinuser") = Session("uname") Then
                    Response.Redirect("serverbusy.aspx")
                End If
            End If
            cmd = New SqlCommand("select reid,pname from tempreserve", con)
            ad = New SqlDataAdapter(cmd)
            d = New DataSet
            ad.Fill(d)
            DataGrid2.DataSource = d
            DataGrid2.DataBind()
        Catch ex As Exception
        End Try
    End Sub
    Private Sub butok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butok.Click
        Try
            Dim cmd1 As New SqlCommand
            con.Open()
            cmd1 = New SqlCommand("delete from tempreserve", con)
            cmd1.ExecuteNonQuery()
            con.Close()
            Dim cmd2 As New SqlCommand
            Dim ad2 As New SqlDataAdapter
            Dim d2 As New DataSet
            Dim name As String
            name = Session("uname")



            cmd2 = New SqlCommand("select ent from newreg where uname='" & name & "'", con)
            ad2 = New SqlDataAdapter(cmd2)
            d2 = New DataSet
            ad2.Fill(d2)
            Dim en As Integer
            If d2.Tables(0).Rows.Count > 0 Then
                en = d2.Tables(0).Rows(0).Item(0)
                If en >= 4 Then
                    con.Open()
                    Dim sta As String
                    sta = "Regular"
                    Dim cmd3 As New SqlCommand
                    cmd3 = New SqlCommand("update newreg set status='" & sta & "' where uname='" & name & "'", con)
                    cmd3.ExecuteNonQuery()
                    con.Close()
                End If
            End If
            Response.Redirect("display.aspx")
        Catch ex As Exception
        End Try
    End Sub
End Class
End Namespace

OUTPUT 

Share:

Total Pageviews

CONTACT US

Prof. Roshan P. Helonde
Mobile: +917276355704
WhatsApp: +917276355704
Email: roshanphelonde@rediffmail.com

Enter Project Title

Popular Projects

All Archive

Contact Form

Name

Email *

Message *