Imports System.Drawing
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls


Public Class Session_State
    Inherits System.Web.UI.Page
    Protected WithEvents Cal_Departure_Date As System.Web.UI.WebControls.Calendar
    Protected WithEvents cbo_Destination_City As System.Web.UI.WebControls.DropDownList
    Protected WithEvents cmd_Check_Flights As System.Web.UI.WebControls.Button
    Protected WithEvents lbl_ChangeColor As System.Web.UI.WebControls.Label
    Protected WithEvents Cal_Return_Date As System.Web.UI.WebControls.Calendar
    Protected WithEvents cbo_Departure_City As System.Web.UI.WebControls.DropDownList
    
#Region " Web Forms Designer Generated Code "
    
    'CODEGEN: This procedure is required by the Web Form Designer
    'Do not modify it using the code editor.
    Private Sub InitializeComponent()

    End Sub

#End Region

    Protected Sub Page_Init(ByVal Sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()

    End Sub

    Private Sub Cal_Departure_Date_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cal_Departure_Date.SelectionChanged

    End Sub

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        FormatPage()
    End Sub

    Protected Sub FormatPage()
        Cal_Return_Date.BackColor = Color.Khaki
        Cal_Return_Date.TitleStyle.BackColor = Color.SteelBlue
        Cal_Return_Date.TitleStyle.Font.Bold = True
        Cal_Departure_Date.BackColor = Color.Khaki
        Cal_Departure_Date.TitleStyle.BackColor = Color.SteelBlue
        Cal_Departure_Date.TitleStyle.Font.Bold = True
    End Sub

    Protected Sub CheckFlights()
        Session("Departure_Date") = Cal_Departure_Date.SelectedDate.ToLongDateString()
        Session("Return_Date") = Cal_Return_Date.SelectedDate.ToLongDateString()
        Session("Departure_City") = cbo_Departure_City.SelectedItem.Text
        Session("Destination_City") = cbo_Destination_City.SelectedItem.Text
        Response.Redirect("Retrieve_Session_State.aspx")
    End Sub

    Private Sub cmd_Check_Flights_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmd_Check_Flights.Click
        CheckFlights()
    End Sub

End Class
