home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 September
/
CHIPCD_9_99.iso
/
software
/
uaktualnienia
/
OptionPackPL
/
iis4_07.cab
/
HIWBenefitsChange.asp
< prev
next >
Wrap
Text File
|
1998-04-27
|
7KB
|
200 lines
<%
' Save URL of calling page as needed
SetURLCallHIW
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<!--META TAGS ARE RECOMMENDED FOR THE SEARCH ENGINE-->
<META NAME="DESCRIPTION" CONTENT="How It Works Page">
<META NAME="KEYWORDS" CONTENT="help, code, source code, questions, explanation">
<META NAME="GENERATOR" CONTENT="Microsoft Visual InterDev 1.0">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
<!--END META TAGS-->
<TITLE>How This Page Works</TITLE>
</HEAD>
<BODY BGCOLOR=#FFFFFF TOPMARGIN=0 LEFTMARGIN=0 ALINK=#23238E VLINK=#808080 LINK=#FFCC00>
<BASEFONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=2>
<!--Change link color on mouseover
Only if running Internet Explorer 4.0 or later -->
<!--#include file=../libHighlight.inc-->
<!--BEGIN TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND MAIN CONTENT-->
<TABLE WIDTH="100%" HEIGHT="100%" CELLPADDING=0 CELLSPACING=0 BGCOLOR="#000000" BORDER=0>
<TR>
<TD BGCOLOR="#000000" ALIGN=CENTER VALIGN=TOP WIDTH=170>
<BR>
<IMG SRC="../images/btslarge.jpg" HEIGHT=119 WIDTH=171
ALT="Behind the Scenes at Exploration Air" BORDER=0 >
<BR>
<BR>
<BR>
<!--BACK BUTTON AND VARIABLE TO RETURN TO ORIGINATING PAGE-->
<A HREF="<%=Session("URLCallHIW")%>">
<IMG SRC="../images/barrowy.gif" HEIGHT=8 WIDTH=8 ALT="Return to Exploration Air Benefits"
HSPACE=2 BORDER=0>
</A>
<FONT SIZE=2 FACE="VERDANA, ARIAL, HELVETICA"><STRONG>
<A HREF="<%=Session("URLCallHIW")%>" TITLE="Return to Exploration Air Benefits">
B A C K
</A>
</STRONG></FONT>
<BR>
<BR>
<!--JAVASCRIPT TO VIEW PAGE'S SOURCE CODE-->
<FONT SIZE=2 FACE="VERDANA, ARIAL, HELVETICA">
<A HREF="JavaScript:openWindow('../Benefits/Change.asp')"
TITLE="View the Source for the Default page">
V I E W S O U R C E
</A>
<BR>
</FONT>
</TD>
<TD BGCOLOR="#FFFFFF" BACKGROUND="../images/btsbg.gif" VALIGN=top>
<BR CLEAR=ALL>
<TABLE CELLPADDING=10 CELLSPACING=0 BORDER=0>
<TR>
<TD VALIGN=top>
<FONT FACE="VERDANA, ARIAL, HELVETICA" COLOR="#0000FF" SIZE=5>
How The Qualifying Change Entry Page Works
</FONT>
<P>
<HR>
<FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="3">
<H2>The Big Picture</H2>
This page is for entry of information about changes in marital status, childbirth, and so on.
Such changes may enable modifying current benefit choices.
<H2>Functional Overview</H2>
As on most other pages in the Benefits application, a few standard tasks are
done at the top of the page. The first is that VBScript is declared the default
scripting language for the page. Next, "TRANSACTION=REQUIRED" is specified to cause
Microsoft® Transaction Server to wrap the actions of the page in a transaction.
Then, "Option Explicit" is specified so that an error will generate unless
all the variables on the page are explicitly declared. This protects against
errors caused by misspelling a variable name and having the server treat
the misspelled variable name as a new variable declaration.
<P>Next, libAuthenticate.inc checks whether the user has a Session variable containing
the EmployeeId. If not, then the request is redirected to Benefits/Default.asp
to ensure that the application is properly initialized for the user.
<P>Next, page variables are initialized, then the subprocedure BuildChangeQualifierList
is called to create a select list of the available Qualifiers from
the database by calling the component method
<STRONG><A HREF=HIWBenefitsComponent.asp#ChangeQualifierList>
BenefitList.ChangeQualifierList</A></STRONG>. The page is sent to the client
browser for entry of the change information. A client-side script is run to validate
the data entered, then the data is sent to the server. The server runs a
subprocedure to get the data into the appropriate fields, then calls a function
called "UpdateDatabase" to update the database. The UpdateDatabase function calls
the component method <STRONG><A HREF=HIWBenefitsComponent.asp#AddQualifier>
BenefitList.AddQualifier</A></STRONG> to update the database.
<H2>Data Model</H2>
You can view a diagram of the <STRONG><A HREF="HIWBenefitsSchema.asp">database</A></STRONG>.
<P>
<H2>Components Used</H2>
This pages uses methods in the BenefitList class of the Benefit component.
<BR><STRONG><A HREF=HIWBenefitsComponent.asp#ChangeQualifierList>BenefitList.ChangeQualifierList</A></STRONG>
<BR><STRONG><A HREF=HIWBenefitsComponent.asp#AddQualifier>BenefitList.AddQualifier</A></STRONG>
<P>
</FONT>
</TD>
</TR>
</TABLE>
<!--END TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND MAIN CONTENT-->
<BR>
<BR>
<CENTER>
<!--BEGIN LEGAL INFORMATION-->
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD>
<FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="1">
<A HREF="../legal.htm">
©1997 Microsoft Corporation. All rights reserved. Terms of Use.
</A>
</FONT>
<P>
</TD>
</TR>
</TABLE>
</CENTER>
<!--END LEGAL INFORMATION-->
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
<!--END HTML-->
<SCRIPT LANGUAGE="JavaScript">
function openWindow(SourceURL)
{
// Set some defaults
width=450;
height=450;
url = "code.asp?Source=" + SourceURL;
window.open(url,"Sample","resizable=yes,scrollbars=yes,width=" + width + ",height=" + height);
}
</SCRIPT>
<%
'
' SetURLCallHIW saves the name of the page in the application that called HIW page
'
Sub SetURLCallHIW
' Extract the last directory from path
Dim strPathInfo, strLastChar, intLocation, ShortString, strLastDir
strPathInfo = Request.ServerVariables("HTTP_REFERER")
' now str has a value like: "http://servername/exair/benefits/Default.asp"
' we need to extract "benefits"
strLastChar = ""
ShortString = strPathInfo
intLocation = 0
If Len(ShortString) > 0 Then
' Get position of beginning of file name
Do Until strLastChar = "/"
strLastChar = right(ShortString, 1)
ShortString = left(ShortString, len(ShortString)-1)
intLocation = intLocation + 1
Loop
' Now get position of beginning of last directory name
strLastChar = ""
Do Until strLastChar = "/"
strLastChar = right(ShortString, 1)
ShortString = left(ShortString, len(ShortString)-1)
intLocation = intLocation + 1
Loop
strLastDir = mid(strPathInfo, len(strPathInfo) - (intLocation - 2), 10)
' If last directory not 'HowItWorks', then save the calling URL
If strLastDir <> "HowItWorks" Then
Session("URLCallHIW") = strPathInfo
End If
End If
End Sub
%>