Here are the files
GeneralInformation.ascx
<%@ Register TagPrefix="igsch"
Namespace="Infragistics.WebUI.WebSchedule"
Assembly="Infragistics.WebUI.WebDateChooser.v1" %>
<%@ Control Language="vb" AutoEventWireup="false"
Codebehind="GeneralInformation.ascx.vb"
Inherits="SulfaTreat.MySulfaTreat.OnlineOrders.GeneralInformation"
TargetSchema="
http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Register TagPrefix="date" Namespace="PeterBlum.DateTextBoxControls"
Assembly="DateTextBoxControls" %>
<asp:validationsummary id="svalGeneralInfo" Height="16px" Width="152px"
runat="server"></asp:validationsummary>
<table width="90%"> <!-- style="Z-INDEX: 102; LEFT: 8px; POSITION:
absolute; TOP: 56px">-->
<TR>
<TD noWrap>
<TABLE style="WIDTH: 344px; HEIGHT: 138px">
<TR>
<TD>Order Type:</TD>
<TD><asp:dropdownlist id="dropOrderType"
Runat="server"></asp:dropdownlist></TD>
</TR>
<TR>
<TD noWrap>Date Received:</TD>
<TD><igsch:webdatechooser id="RecievedDate" Width="153"
runat="server">
<CalendarLayout PrevMonthImageUrl="ig_cal_grayP0.gif"
ShowTitle="False" NextMonthImageUrl="ig_cal_grayN0.gif">
<DayStyle BorderWidth="1px" BorderColor="#909090"
BorderStyle="Solid" BackgroundImage="ig_cal_light3.gif"></DayStyle>
<FooterStyle Height="16pt" Font-Size="8pt" ForeColor="#707070"
BackgroundImage="ig_cal_light2.gif"></FooterStyle>
<SelectedDayStyle ForeColor="Black"
BackgroundImage="ig_cal_light2.gif"></SelectedDayStyle>
<OtherMonthDayStyle ForeColor="#909090"></OtherMonthDayStyle>
<NextPrevStyle
BackgroundImage="ig_cal_light1.gif"></NextPrevStyle>
<CalendarStyle BorderWidth="1px" Font-Size="9pt"
Font-Names="Verdana" BorderColor="Gray" BorderStyle="Solid"
ForeColor="#505050" BackColor="#C0C0C0"></CalendarStyle>
<TodayDayStyle ForeColor="Black"
BackgroundImage="ig_cal_light1.gif"></TodayDayStyle>
<DayHeaderStyle Height="1pt" Font-Size="8pt" Font-Bold="True"
ForeColor="#606060" BackgroundImage="ig_cal_light2.gif"
BackColor="#C0C0C0"></DayHeaderStyle>
<TitleStyle Height="18pt" Font-Size="10pt" Font-Bold="True"
ForeColor="#606060" BackgroundImage="ig_cal_light1.gif"
BackColor="#E0E0E0"></TitleStyle>
</CalendarLayout>
<ExpandEffects ShadowColor="LightGray"></ExpandEffects>
</igsch:webdatechooser></TD>
</TR>
<TR>
<TD>Currency:</TD>
<TD><asp:dropdownlist id="dropCurrencyList" Width="88px"
runat="server"></asp:dropdownlist></TD>
</TR>
<TR>
<TD>Purchase Order #:</TD>
<TD><asp:textbox id="txtPurchaseOrderNum" Width="153px"
runat="server"></asp:textbox></TD>
</TR>
<TR>
<TD noWrap>Req. Delivery Date:</TD>
<TD><igsch:webdatechooser id="ReqDelvDate" Width="153"
runat="server" NullDateLabel=" ">
<CalendarLayout PrevMonthImageUrl="ig_cal_grayP0.gif"
ShowTitle="False" NextMonthImageUrl="ig_cal_grayN0.gif">
<DayStyle BorderWidth="1px" BorderColor="#909090"
BorderStyle="Solid" BackgroundImage="ig_cal_light3.gif"></DayStyle>
<FooterStyle Height="16pt" Font-Size="8pt" ForeColor="#707070"
BackgroundImage="ig_cal_light2.gif"></FooterStyle>
<SelectedDayStyle ForeColor="Black"
BackgroundImage="ig_cal_light2.gif"></SelectedDayStyle>
<OtherMonthDayStyle ForeColor="#909090"></OtherMonthDayStyle>
<NextPrevStyle
BackgroundImage="ig_cal_light1.gif"></NextPrevStyle>
<CalendarStyle BorderWidth="1px" Font-Size="9pt"
Font-Names="Verdana" BorderColor="Gray" BorderStyle="Solid"
ForeColor="#505050" BackColor="#C0C0C0"></CalendarStyle>
<TodayDayStyle ForeColor="Black"
BackgroundImage="ig_cal_light1.gif"></TodayDayStyle>
<DayHeaderStyle Height="1pt" Font-Size="8pt" Font-Bold="True"
ForeColor="#606060" BackgroundImage="ig_cal_light2.gif"
BackColor="#C0C0C0"></DayHeaderStyle>
<TitleStyle Height="18pt" Font-Size="10pt" Font-Bold="True"
ForeColor="#606060" BackgroundImage="ig_cal_light1.gif"
BackColor="#E0E0E0"></TitleStyle>
</CalendarLayout>
<ExpandEffects ShadowColor="LightGray"></ExpandEffects>
</igsch:webdatechooser></TD>
</TR>
</TABLE>
</TD>
<TD>
<TABLE>
<TR>
<TD>Special Instructions:</TD>
</TR>
<TR>
<TD><asp:textbox id="txtSpecialInstructions" Height="114px"
Width="280px" Runat="server" TextMode="MultiLine"></asp:textbox></TD>
</TR>
</TABLE>
</TD>
</TR>
</table>
<date:datetextboxvalidator id="dvalDateReceived" runat="server"
ErrorMessage="Please enter or select a valid date."
Display="None"
ControlToValidate="RecievedDate"></date:datetextboxvalidator><date:datet
extboxvalidator id="dvalReqDelivDate" runat="server"
ErrorMessage="Please enter or select a valid date."
Display="None"
ControlToValidate="ReqDelvDate"></date:datetextboxvalidator><asp:button
id="Submit" runat="server" Text="Button" Visible="False"></asp:button>
GeneralInformation.ascx.vb
Imports System.Diagnostics
Imports SulfaTreat.Common.Data
Imports SulfaTreat.BusinessRules
Public Class GeneralInformation
Inherits System.Web.UI.UserControl
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub
Public WithEvents txtSpecialInstructions As
System.Web.UI.WebControls.TextBox
Public WithEvents dropCurrencyList As
System.Web.UI.WebControls.DropDownList
Public WithEvents txtPurchaseOrderNum As
System.Web.UI.WebControls.TextBox
Protected WithEvents dvalReqDelivDate As
PeterBlum.DateTextBoxControls.DateTextBoxValidator
Protected WithEvents svalGeneralInfo As
System.Web.UI.WebControls.ValidationSummary
Public WithEvents dropOrderType As
System.Web.UI.WebControls.DropDownList
Protected WithEvents dvalDateReceived As
PeterBlum.DateTextBoxControls.DateTextBoxValidator
Public WithEvents ReqDelvDate As
Infragistics.WebUI.WebSchedule.WebDateChooser
Public WithEvents RecievedDate As
Infragistics.WebUI.WebSchedule.WebDateChooser
Public WithEvents Submit As System.Web.UI.WebControls.Button
'NOTE: The following placeholder declaration is required by the Web
Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private 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
#End Region
#Region "Enum"
Public Enum CurrencyType As Integer
US
Canadian
End Enum
#End Region
Private _ds As DataSet
Private _OrderData As OrderData
Private _OrderID As String
#Region "Properties"
Public ReadOnly Property OrderID() As String
Get
If Not IsNothing(Session("OrderID")) Then
Return CStr(Session("OrderID"))
Else
Return Nothing
End If
End Get
End Property
Public Property OrderTypeID() As Integer
Get
If dropOrderType.SelectedIndex <> -1 Then
Return CInt(dropOrderType.SelectedItem.Value)
Else
dropOrderType.SelectedIndex = 0
Return CInt(dropOrderType.SelectedItem.Value)
End If
End Get
Set(ByVal Value As Integer)
dropOrderType.SelectedIndex = Value
End Set
End Property
Public Property DateRecieved() As Date
Get
If dvalDateReceived.IsValid = False Then
SulfaTreat.SystemSupport.ApplicationLog.WriteError("Please select a
valid date.")
Else
Return CDate(Me.RecievedDate.Text)
End If
End Get
Set(ByVal Value As Date)
Me.RecievedDate.Value = Value
End Set
End Property
Public Property CurrencyID() As Integer
Get
Return CInt(dropCurrencyList.SelectedItem.Value)
End Get
Set(ByVal Value As Integer)
dropCurrencyList.SelectedIndex = Value
End Set
End Property
Public Property PurchaseOrderNum() As String
Get
Return txtPurchaseOrderNum.Text
End Get
Set(ByVal Value As String)
txtPurchaseOrderNum.Text = Value
End Set
End Property
Public Property ReqDevliveryDate() As Date
Get
If Me.dvalReqDelivDate.IsValid = False Then
SulfaTreat.SystemSupport.ApplicationLog.WriteError("Please select a
valid date.")
Else
Return CDate(Me.ReqDelvDate.Text)
End If
End Get
Set(ByVal Value As Date)
Me.ReqDelvDate.Value = Value
End Set
End Property
Public Property SpecialInstructions() As String
Get
Return txtSpecialInstructions.Text
End Get
Set(ByVal Value As String)
txtSpecialInstructions.Text = Value
End Set
End Property
Private Property CurrencyList() As DataSet
Get
If Not IsNothing(HttpContext.Current.Cache("CurrencyList"))
Then
Return CType(HttpContext.Current.Cache("CurrencyList"),
DataSet)
Else
Me.LoadCurrencyList()
Return _ds
End If
End Get
Set(ByVal Value As DataSet)
HttpContext.Current.Cache("CurrencyList") = Value
End Set
End Property
Private Property OrderTypeList() As DataSet
Get
If Not IsNothing(HttpContext.Current.Cache("OrderTypeList"))
Then
Return CType(HttpContext.Current.Cache("OrderTypeList"),
DataSet)
Else
LoadOrderTypeList()
Return _ds
End If
End Get
Set(ByVal Value As DataSet)
HttpContext.Current.Cache("OrderTypeList") = Value
End Set
End Property
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
Me.RecievedDate.Value = Date.Today
LoadDropLists()
End If
End Sub
Private Sub LoadDropLists()
With Me.dropCurrencyList
.DataSource = Me.CurrencyList
.DataTextField = "Currency"
.DataValueField = "CurrencyID"
.DataBind()
End With
With Me.dropOrderType
.DataSource =
Me.OrderTypeList.Tables(OrderData.OrderTypes_TABLE)
.DataTextField = OrderData.OrderTypeDescription_FIELD
.DataValueField = OrderData.OrderTypeID_FIELD
.DataBind()
End With
End Sub
Private Sub LoadCurrencyList()
Dim ord As New Orders
_ds = ord.GetCurrencyList()
HttpContext.Current.Cache("CurrencyList") = _ds
End Sub
Private Sub LoadOrderTypeList()
Dim ord As New Orders
_ds = ord.GetOrderTypes()
HttpContext.Current.Cache("OrderTypeList") = _ds
End Sub
Public Sub Clear()
Me.RecievedDate.Value = Date.Today
Me.dropCurrencyList.SelectedIndex = 0
Me.dropOrderType.SelectedIndex = 0
Me.ReqDelvDate.Value = ""
Me.txtPurchaseOrderNum.Text = ""
Me.txtSpecialInstructions.Text = ""
End Sub
Public Sub SaveOrder()
Dim order As New Orders
Dim _OrderData As New OrderData
If
CStr(_OrderData.Tables(OrderData.OrderHistory_TABLE).Rows(0)(OrderData.O
rderID_FIELD)) = "new" Then
_OrderID = order.CreateOrderID
Dim dr As DataRow =
_OrderData.Tables(OrderData.OrderHistory_TABLE).NewRow
dr(OrderData.OrderDate_FIELD) = CDate(Me.RecievedDate.Text)
dr(OrderData.OrderTypeID_FIELD) =
Me.dropOrderType.SelectedItem.Value
dr(OrderData.CurrencyID_FIELD) =
Me.dropCurrencyList.SelectedItem.Value
dr(OrderData.PurchOrderNumber_FIELD) =
Me.txtPurchaseOrderNum.Text
dr(OrderData.ReqDelDate_FIELD) = CDate(Me.ReqDelvDate.Text)
dr(OrderData.SpecialInstructions_FIELD) =
Me.txtSpecialInstructions
_OrderData.Tables(OrderData.OrderHistory_TABLE).Rows.Add(dr)
Else
End If
End Sub
Public Sub Submit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Submit.Click
SaveOrder()
End Sub
End Class
webform1.aspx
<%@ Register TagPrefix="uc1" TagName="GeneralInformation"
Src="Controls/GeneralInformation.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb"
Inherits="SulfaTreat.MySulfaTreat.OnlineOrders.WebForm1"%>
<%@ Register TagPrefix="uc1" TagName="CustomerInformation"
Src="Controls/CustomerInformation.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="
http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<P>
<uc1:GeneralInformation id="GeneralInformation1"
runat="server"></uc1:GeneralInformation></P>
<P>
<asp:Button id="Button1" runat="server"
Text="Button"></asp:Button></P>
</form>
</body>
</HTML>
webform1.aspx.vb
Imports SulfaTreat.Common.Data
Imports SulfaTreat.BusinessRules
Public Class WebForm1
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
Protected WithEvents GenInfo As
SulfaTreat.MySulfaTreat.OnlineOrders.GeneralInformation
'NOTE: The following placeholder declaration is required by the Web
Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private 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
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Session("OrderID") = "new"
System.Diagnostics.Debug.Write(GenInfo.ClientID)
GenInfo.SaveOrder()
End Sub
End Class