Partial Class Controls_OrderStep
	Inherits System.Web.UI.UserControl

	Public Property CurrentStep() As OrderStep
		Get
			If ViewState(Me.ID & "_CurrentStep") Is Nothing Then
				Return OrderStep.Upsell
			Else
				Return CType(ViewState(Me.ID & "_CurrentStep"), OrderStep)
			End If
		End Get

		Set(ByVal value As OrderStep)
			ViewState(Me.ID & "_CurrentStep") = value
		End Set
	End Property

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
		trStep1.Visible = False
		trStep2.Visible = False
		trStep3.Visible = False
		trStep4.Visible = False
		trStep5.Visible = False
		trStep6.Visible = False

		Select Case CurrentStep
			Case OrderStep.Upsell
				trStep1.Visible = True
			Case OrderStep.ChooseOptions
				trStep2.Visible = True
			Case OrderStep.EnterInformation
				trStep3.Visible = True
			Case OrderStep.SubmitOrder
				trStep4.Visible = True
			Case OrderStep.ScheduleInstallation
				trStep5.Visible = True
			Case OrderStep.FinishOrder
				trStep6.Visible = True
		End Select
	End Sub
End Class

