|
Click the
map for a printer-friendly version

|
|
For more information, please contact Sandy Scamurra at:
1300 Britannia Road East
Suite 207
Mississauga, ON
L4W 1C8
Phone: (905) 564-4920
Fax: (905) 564-0492 / 564-5970
E-Mail:
sandy@scamurra.com

Click here for complete
event planning! |
|
<%
Response.expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma", "no-cache"
Response.addHeader "cache-control", "private"
Response.CacheControl = "no-cache"
%>
<%
Response.Buffer = True
' Get action
a = Request.Form("a")
If (a = "" Or IsNull(a)) Then
key = Request.Querystring("key")
If key <> "" Then
a = "C" ' Copy record
Else
a = "I" ' Display blank record
End If
End If
' Open Connection to the database
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open xDb_Conn_Str
Select Case a
Case "C": ' Get a record to display
tkey = "" & key & ""
strsql = "SELECT * FROM [Scamurra] WHERE [InquireNumber]=" & tkey
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn
If rs.Eof Then
Response.Clear
Response.Redirect "received.htm"
Else
rs.MoveFirst
' Get the field contents
x_Name = rs("Name")
x_Email = rs("Email")
x_Address = rs("Address")
x_City = rs("City")
x_PostalCode = rs("PostalCode")
x_PhoneNumber = rs("PhoneNumber")
x_DateAndYear = rs("DateAndYear")
x_GuestNumber = rs("GuestNumber")
x_NumberOfHours = rs("NumberOfHours")
x_FuncType = rs("FuncType")
x_Comments = rs("Comments")
x_Horsdoeuvres = rs("Horsdoeuvres")
x_Appetizers = rs("Appetizers")
x_Soup = rs("Soup")
x_EntreesBuffet = rs("EntreesBuffet")
x_Pasta = rs("Pasta")
x_Dessert = rs("Dessert")
x_Bar = rs("Bar")
x_SweetTable = rs("SweetTable")
x_MidNightSweets = rs("MidNightSweets")
x_Intermezzo = rs("Intermezzo")
x_Hear = rs("Hear")
x_Viewed = rs("Viewed")
x_Carnations = rs("Carnations")
x_ReceivingTableLiquor = rs("ReceivingTableLiquor")
x_ReceivingTablePunch = rs("ReceivingTablePunch")
x_DiscJockey = rs("DiscJockey")
x_SelectionInvitation = rs("SelectionInvitation")
x_WeddingCake = rs("WeddingCake")
x_ChangeRoom = rs("ChangeRoom")
x_QuotePrice = rs("QuotePrice")
End If
rs.Close
Set rs = Nothing
Case "A": ' Add
' Get fields from form
x_InquireNumber = Request.Form("x_InquireNumber")
x_Name = Request.Form("x_Name")
x_Email = Request.Form("x_Email")
x_Address = Request.Form("x_Address")
x_City = Request.Form("x_City")
x_PostalCode = Request.Form("x_PostalCode")
x_PhoneNumber = Request.Form("x_PhoneNumber")
x_DateAndYear = Request.Form("x_DateAndYear")
x_GuestNumber = Request.Form("x_GuestNumber")
x_NumberOfHours = Request.Form("x_NumberOfHours")
x_FuncType = Request.Form("x_FuncType")
x_Comments = Request.Form("x_Comments")
x_Horsdoeuvres = Request.Form("x_Horsdoeuvres")
x_Appetizers = Request.Form("x_Appetizers")
x_Soup = Request.Form("x_Soup")
x_EntreesBuffet = Request.Form("x_EntreesBuffet")
x_Pasta = Request.Form("x_Pasta")
x_Dessert = Request.Form("x_Dessert")
x_Bar = Request.Form("x_Bar")
x_SweetTable = Request.Form("x_SweetTable")
x_MidNightSweets = Request.Form("x_MidNightSweets")
x_Intermezzo = Request.Form("x_Intermezzo")
x_Hear = Request.Form("x_Hear")
x_Viewed = Request.Form("x_Viewed")
x_Carnations = Request.Form("x_Carnations")
x_ReceivingTableLiquor = Request.Form("x_ReceivingTableLiquor")
x_ReceivingTablePunch = Request.Form("x_ReceivingTablePunch")
x_DiscJockey = Request.Form("x_DiscJockey")
x_SelectionInvitation = Request.Form("x_SelectionInvitation")
x_WeddingCake = Request.Form("x_WeddingCake")
x_ChangeRoom = Request.Form("x_ChangeRoom")
x_QuotePrice = Request.Form("x_QuotePrice")
' Open record
strsql = "SELECT * FROM [Scamurra] WHERE 0 = 1"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn, 1, 2
rs.AddNew
tmpFld = Trim(x_Name)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Name") = tmpFld
tmpFld = Trim(x_Email)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Email") = tmpFld
tmpFld = Trim(x_Address)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Address") = tmpFld
tmpFld = Trim(x_City)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("City") = tmpFld
tmpFld = Trim(x_PostalCode)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("PostalCode") = tmpFld
tmpFld = Trim(x_PhoneNumber)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("PhoneNumber") = tmpFld
tmpFld = Trim(x_DateAndYear)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("DateAndYear") = tmpFld
tmpFld = x_GuestNumber
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("GuestNumber") = CLng(tmpFld)
tmpFld = x_NumberOfHours
If Not IsNumeric(tmpFld) Then tmpFld = 0
rs("NumberOfHours") = CLng(tmpFld)
tmpFld = Trim(x_FuncType)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("FuncType") = tmpFld
tmpFld = Trim(x_Comments)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Comments") = tmpFld
tmpFld = x_Horsdoeuvres
If tmpFld = "Yes" Then
rs("Horsdoeuvres") = True
Else
rs("Horsdoeuvres") = False
End If
tmpFld = x_Appetizers
If tmpFld = "Yes" Then
rs("Appetizers") = True
Else
rs("Appetizers") = False
End If
tmpFld = x_Soup
If tmpFld = "Yes" Then
rs("Soup") = True
Else
rs("Soup") = False
End If
tmpFld = Trim(x_EntreesBuffet)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("EntreesBuffet") = tmpFld
tmpFld = x_Pasta
If tmpFld = "Yes" Then
rs("Pasta") = True
Else
rs("Pasta") = False
End If
tmpFld = x_Dessert
If tmpFld = "Yes" Then
rs("Dessert") = True
Else
rs("Dessert") = False
End If
tmpFld = Trim(x_Bar)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Bar") = tmpFld
tmpFld = x_SweetTable
If tmpFld = "Yes" Then
rs("SweetTable") = True
Else
rs("SweetTable") = False
End If
tmpFld = x_MidNightSweets
If tmpFld = "Yes" Then
rs("MidNightSweets") = True
Else
rs("MidNightSweets") = False
End If
tmpFld = x_Intermezzo
If tmpFld = "Yes" Then
rs("Intermezzo") = True
Else
rs("Intermezzo") = False
End If
tmpFld = Trim(x_Hear)
If Trim(tmpFld) & "x" = "x" Then tmpFld = Null
rs("Hear") = tmpFld
tmpFld = x_Carnations
If tmpFld = "Yes" Then
rs("Carnations") = True
Else
rs("Carnations") = False
End If
tmpFld = x_ReceivingTableLiquor
If tmpFld = "Yes" Then
rs("ReceivingTableLiquor") = True
Else
rs("ReceivingTableLiquor") = False
End If
tmpFld = x_ReceivingTablePunch
If tmpFld = "Yes" Then
rs("ReceivingTablePunch") = True
Else
rs("ReceivingTablePunch") = False
End If
tmpFld = x_DiscJockey
If tmpFld = "Yes" Then
rs("DiscJockey") = True
Else
rs("DiscJockey") = False
End If
tmpFld = x_SelectionInvitation
If tmpFld = "Yes" Then
rs("SelectionInvitation") = True
Else
rs("SelectionInvitation") = False
End If
tmpFld = x_WeddingCake
If tmpFld = "Yes" Then
rs("WeddingCake") = True
Else
rs("WeddingCake") = False
End If
tmpFld = x_ChangeRoom
If tmpFld = "Yes" Then
rs("ChangeRoom") = True
Else
rs("ChangeRoom") = False
End If
rs.Update
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
Response.Clear
Response.Redirect "received.htm"
End Select
%>

Request Information Form
|
 |