home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_07.cab / HIWBenefitsComponent.asp < prev    next >
Text File  |  1997-11-01  |  41KB  |  1,261 lines

  1. <%
  2.  
  3.   ' Save URL of calling page as needed
  4.   SetURLCallHIW
  5.  
  6. %>
  7.  
  8. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  9. <HTML>
  10. <HEAD>
  11. <!--META TAGS ARE RECOMMENDED FOR THE SEARCH ENGINE-->
  12. <META NAME="DESCRIPTION" CONTENT="How It Works Page">
  13. <META NAME="KEYWORDS" CONTENT="help, code, source code, questions, explanation">
  14. <META NAME="GENERATOR" CONTENT="Microsoft Visual InterDev 1.0">
  15. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
  16. <!--END META TAGS-->
  17.  
  18. <TITLE>How The Benefit Component Works</TITLE>
  19. </HEAD>
  20.  
  21. <BODY  BGCOLOR=#FFFFFF TOPMARGIN=0 LEFTMARGIN=0 ALINK=#23238E VLINK=#808080 LINK=#FFCC00>
  22. <BASEFONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=2>
  23.  
  24. <!--Change link color on mouseover
  25.     Only if running Internet Explorer 4.0 or later -->
  26. <!--#include file=../libHighlight.inc-->
  27.  
  28. <!--BEGIN TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND MAIN CONTENT-->
  29. <TABLE WIDTH="100%" HEIGHT="100%" CELLPADDING=0 CELLSPACING=0  BGCOLOR="#000000" BORDER=0>
  30.   <TR>
  31.     <TD BGCOLOR="#000000" ALIGN=CENTER VALIGN=TOP WIDTH=170>
  32.     <BR>
  33.     <IMG SRC="../images/btslarge.jpg" HEIGHT=119 WIDTH=171  
  34.       ALT="Behind the Scenes at Exploration Air" BORDER=0 >
  35.     <BR>
  36.     <BR>
  37.     <BR>
  38. <!--BACK BUTTON AND VARIABLE TO RETURN TO ORIGINATING PAGE-->
  39.     <A HREF="<%=Session("URLCallHIW")%>">
  40.       <IMG SRC="../images/barrowy.gif" HEIGHT=8 WIDTH=8 ALT="Return to Exploration Air Benefits"  
  41.         HSPACE=2 BORDER=0>
  42.     </A>
  43.     <FONT SIZE=2 FACE="VERDANA, ARIAL, HELVETICA"><STRONG>
  44.       <A HREF="<%=Session("URLCallHIW")%>" TITLE="Return to Exploration Air Benefits">
  45.         B  A  C  K
  46.       </A>
  47.     </STRONG></FONT>
  48.     </TD>
  49.  
  50.     <TD BGCOLOR="#FFFFFF" BACKGROUND="../images/btsbg.gif" VALIGN=top>
  51.       <BR CLEAR=ALL>
  52.       <TABLE WIDTH="100%" CELLPADDING=10 CELLSPACING=0 BORDER=0>   
  53.         <TR>
  54.           <TD VALIGN=top>
  55.             <FONT FACE="VERDANA, ARIAL, HELVETICA" COLOR="#0000FF" SIZE=5>
  56.               How The Benefit Component Works
  57.             </FONT>
  58.             <P>
  59.             <HR>
  60.             <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="3">
  61.  
  62. <H2>The Big Picture</H2>
  63.  
  64. The Exploration Air Employee Benefits application uses the component <STRONG>Benefit</STRONG>,
  65. which has two classes; <STRONG><A HREF=#BenefitList>BenefitList</A></STRONG> and 
  66. <STRONG><A HREF=#Employee>Employee</A></STRONG>. 
  67. The purpose of the methods is to encapsulate a specific function
  68. so that the ASP pages can have a defined interface to accomplish work, without concern
  69. for the details of how the work is done. 
  70.  
  71.  
  72. <H2>Why Benefits Uses Components</H2>
  73.  
  74. <P>The use of components has two advantages for the 
  75. application developer. First, as changes to the ASP pages are made, the method calls 
  76. to the components do not change (unless different functionality is required 
  77. from the component). This reduces the complexity of the ASP page and reduces
  78. the likelihood of introducing new bugs through modification of the existing ASP pages.
  79. The second advantage is that the methods can be called by
  80. other applications. For example, the Benefits 
  81. application calls the <STRONG><A HREF=#NewBenefits>NewBenefits</A></STRONG>
  82. method of the <STRONG><A HREF=#Employee>Employee</A></STRONG>
  83. component to create the default benefit records for a specified employee. If you had 
  84. another application that you wanted to use to set up new employees,
  85. you could have the other application call the <STRONG><A HREF=#NewBenefits>NewBenefits</A></STRONG>
  86. method 
  87. to add default benefits.
  88.  
  89.  
  90. <H2>Design Goals</H2>
  91.  
  92. The design goal of the component was to create methods that encapsulate a single logical
  93. function, such as add a new employee, or return a list of an employee's dependents. Some
  94. methods call other methods in order to accomplish their function, as when the 
  95. <STRONG><A HREF=#AddNew>Employee.AddNew</A></STRONG> method calls the 
  96. <STRONG><A HREF=#NewBenefits>Employee.NewBenefits</A></STRONG> 
  97. method to add the benefit records.
  98.  
  99. <P>All of the methods in the <STRONG>Benefit</STRONG> component require passing the name 
  100. of the file DSN to be used 
  101. by the method. This makes it easier to use different databases from the same set of ASP pages.
  102.  
  103.  
  104. <H2>Architectural Details</H2>
  105.  
  106. Both of the classes in the <STRONG>Benefit</STRONG> component are contained in the 
  107. Microsoft Transaction Server (MTS) package called <STRONG>Benefit</STRONG>, and are run 
  108. by <STRONG>Benefit.dll</STRONG>. 
  109. This component was created in Visual Basic 5.0, and can be modified to work with 
  110. other database structures because it performs a defined role of application layer 
  111. between the presentation layer (in ASP pages) and the database layer (in the SQL 
  112. Server database).
  113.  
  114. <A NAME=#BenefitList>
  115.   <H2>The BenefitList Class</H2>
  116. </A>
  117.  
  118. The primary focus of the <STRONG>BenefitList</STRONG> class is maintaining the benefits 
  119. information in the Benefits database. The component has 21 methods, which are called as needed
  120. by the ASP pages in Benefits, but could also be called by other applications.
  121.  
  122. <HR>
  123.  
  124.  
  125. <A NAME=#AddBenefit>
  126.   <H3>AddBenefit</H3>
  127. </A>
  128.  
  129.     <H4>Overview</H4>
  130. The <STRONG>AddBenefit</STRONG> method creates a record in EmployeeBenefit for the 
  131. specified benefit Id and 
  132. employee, and a record in EmployeeBenefitDependent for each dependent of the employee.
  133.  
  134.     <H4>Input Parameters</H4>
  135. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  136. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id of the employee whose dependent is being added
  137. <BR><STRONG>lngBenefitId</STRONG>: Benefit Id being added, as defined in the Benefit table
  138.  
  139.     <H4>Methods Called</H4>
  140. <STRONG><A HREF=#AddEBD>BenefitList.AddEBD</A></STRONG>
  141.  
  142.     <H4>Stored Procedures Called</H4>
  143. <STRONG>sp_AddBenefitSelect1</STRONG>    
  144. <BR><STRONG>sp_AddBenefitInsert</STRONG>
  145. <BR><STRONG>sp_AddBenefitSelect2</STRONG>
  146.  
  147.     <H4>Tables Affected</H4>
  148. <STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeBenefit>EmployeeBenefit</A></STRONG>
  149. <BR><STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeBenefitDependent>EmployeeBenefitDependent</A></STRONG>
  150.  
  151.     <H4>Return Value</H4>
  152. No value returned
  153.  
  154. <HR>
  155.  
  156.  
  157. <A NAME=#AddEBD>
  158.   <H3>AddEBD</H3>
  159. </A>
  160.  
  161.     <H4>Overview</H4>
  162. The <STRONG>AddEBD</STRONG> method adds a record to the EmployeeBenefitDependent table for the dependent specified,
  163. for every benefit the employee has. Only records for the employee are created as active status
  164. records. All other dependents' records for the employee are created as inactive, and may be activated
  165. by an employee while a change qualifier is in effect.
  166.  
  167.     <H4>Input Parameters</H4>
  168. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  169. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id of the employee whose dependent is being added
  170. <BR><STRONG>lngBenefitId</STRONG>: Benefit Id being added, as defined in the Benefit table
  171. <BR><STRONG>lngDependentId</STRONG>: The dependent Id of the dependent who records are to be added for
  172. <BR><STRONG>lngDependentTypeId</STRONG>: The type of dependent for whom records are being 
  173.   created, as defined in the DependentType table
  174.  
  175.     <H4>Methods Called</H4>
  176. No methods called
  177.  
  178.     <H4>Stored Procedures Called</H4>
  179. <STRONG>sp_AddEBD</STRONG>
  180.  
  181.     <H4>Tables Affected</H4>
  182. <STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeBenefitDependent>EmployeeBenefitDependent</A></STRONG>
  183.  
  184.     <H4>Return Value</H4>
  185. No value returned
  186.  
  187. <HR>
  188.  
  189.  
  190. <A NAME=#AddQualifier>
  191.   <H3>AddQualifier</H3>
  192. </A>
  193.  
  194.     <H4>Overview</H4>
  195. The <STRONG>AddQualifier</STRONG> method adds a record to the EmployeeQualifier table to record that a 
  196. qualifying event has occurred that qualifies the employee to change benefit options 
  197. as needed, during a period defined in the BenefitQualifier table.
  198.  
  199.     <H4>Input Parameters</H4>
  200. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  201. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id of the employee whose dependent is being added
  202. <BR><STRONG>lngQualifierId</STRONG>: Qualifier Id being added, as defined in the Qualifier table
  203. <BR><STRONG>datQualifierDate</STRONG>: The date the qualifying event occurred
  204.  
  205.     <H4>Methods Called</H4>
  206. No methods called
  207.  
  208.     <H4>Stored Procedures Called</H4>
  209. <STRONG>sp_AddQualifier</STRONG>
  210.  
  211.     <H4>Tables Affected</H4>
  212. <STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeQualifier>EmployeeQualifier</A></STRONG>
  213.  
  214.     <H4>Return Value</H4>
  215. No value returned
  216.  
  217. <HR>
  218.  
  219.  
  220. <A NAME=#BenefitsForId>
  221.   <H3>BenefitsForId</H3>
  222. </A>
  223.  
  224.     <H4>Overview</H4>
  225. The <STRONG>BenefitsForId</STRONG> method returns a <STRONG>Recordset</STRONG> listing all the benefits the employee has 
  226. for the specified year.
  227.  
  228.     <H4>Input Parameters</H4>
  229. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  230. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id of the employee whose dependent is being added
  231. <BR><STRONG>intBenefitYear</STRONG>: Benefit year for which benefits are to be created 
  232.  
  233.     <H4>Methods Called</H4>
  234. No methods called
  235.  
  236.     <H4>Stored Procedures Called</H4>
  237. <STRONG>sp_BenefitsForId</STRONG>
  238.  
  239.     <H4>Tables Affected</H4>
  240. No tables affected
  241.  
  242.     <H4>Return Value</H4>
  243. A <STRONG>Recordset</STRONG> is returned containing:
  244. <BR><STRONG>BenefitId </STRONG>
  245.  
  246. <HR>
  247.  
  248.  
  249. <A NAME=#ChangeQualifierList>
  250.   <H3>ChangeQualifierList</H3>
  251. </A>
  252.  
  253.     <H4>Overview</H4>
  254. The <STRONG>ChangeQualifierList</STRONG> method returns a <STRONG>Recordset</STRONG> listing all change qualifiers that apply
  255. to the qualifier class, and to the benefit if specified.
  256.  
  257.     <H4>Input Parameters</H4>
  258. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  259. <BR><STRONG>lngBenefitId</STRONG>: The benefit Id for which to return the qualifier Ids
  260. <BR><STRONG>lngQualifierClassId</STRONG>: Qualifier class Id for which to return the qualifier Ids
  261.  
  262.     <H4>Methods Called</H4>
  263. No methods called
  264.  
  265.     <H4>Stored Procedures Called</H4>
  266. <STRONG>sp_ChangeQualifierList1</STRONG>
  267. <BR>-OR-
  268. <BR><STRONG>sp_ChangeQualifierList2</STRONG>
  269.  
  270.     <H4>Tables Affected</H4>
  271. No tables affected
  272.  
  273.     <H4>Return Value</H4>
  274. A <STRONG>Recordset</STRONG> is returned containing:
  275. If the benefit is specified (causing <STRONG>sp_ChangeQualifierList1</STRONG> to run)
  276. <BR><STRONG>QualifierId </STRONG>
  277. <BR><STRONG>QualifierLabel </STRONG>
  278. <BR><STRONG>QualifierRank </STRONG>
  279. <BR><STRONG>ChangeDays </STRONG>
  280.  
  281. <P>If the benefit is not specified (causing <STRONG>sp_ChangeQualifierList2</STRONG> to run)
  282. <BR><STRONG>QualifierId </STRONG>
  283. <BR><STRONG>QualifierLabel </STRONG>
  284. <BR><STRONG>QualifierRank </STRONG>
  285.  
  286. <HR>
  287.  
  288.  
  289. <A NAME=#CheckQualifier>
  290.   <H3>CheckQualifier</H3>
  291. </A>
  292.  
  293.     <H4>Overview</H4>
  294. The <STRONG>CheckQualifier</STRONG> method returns a <STRONG>Recordset</STRONG> listing all the qualifiers in effect for the
  295. employee and benefit specified. A valid change qualifier is required before changes can
  296. be made to the employee's benefit choices.
  297.  
  298.     <H4>Input Parameters</H4>
  299. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  300. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id for which a qualifier is sought
  301. <BR><STRONG>lngBenefitId</STRONG>: Benefit Id for which a qualifier is sought 
  302.  
  303.     <H4>Methods Called</H4>
  304. No methods called
  305.  
  306.     <H4>Stored Procedures Called</H4>
  307. <STRONG>sp_CheckQualifier</STRONG>
  308.  
  309.     <H4>Tables Affected</H4>
  310. No tables affected
  311.  
  312.     <H4>Return Value</H4>
  313. A <STRONG>Recordset</STRONG> is returned containing:
  314. <BR><STRONG>QualifierId</STRONG>
  315.  
  316. <HR>
  317.  
  318.  
  319. <A NAME=#CurrentPlan>
  320.   <H3>CurrentPlan</H3>
  321. </A>
  322.  
  323.     <H4>Overview</H4>
  324. The <STRONG>CurrentPlan</STRONG> method returns a <STRONG>Recordset</STRONG> listing the current options selected for the 
  325. specified employee and benefit.
  326.  
  327.     <H4>Input Parameters</H4>
  328. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  329. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id for which the plan information is sought
  330. <BR><STRONG>lngBenefitId</STRONG>: Benefit Id for which the plan information is sought 
  331.  
  332.     <H4>Methods Called</H4>
  333. No methods called
  334.  
  335.     <H4>Stored Procedures Called</H4>
  336. <STRONG>sp_CurrentPlan</STRONG>
  337.  
  338.     <H4>Tables Affected</H4>
  339. No tables affected
  340.  
  341.     <H4>Return Value</H4>
  342. A <STRONG>Recordset</STRONG> is returned containing:
  343. <BR><STRONG>BenefitLabel</STRONG>
  344. <BR><STRONG>PlanId</STRONG>
  345. <BR><STRONG>DependentCovered</STRONG>
  346. <BR><STRONG>TaxStatusId</STRONG>
  347. <BR><STRONG>TaxStatusLabel</STRONG>
  348.  
  349. <HR>
  350.  
  351.  
  352. <A NAME=#DependentTypeList>
  353.   <H3>DependentTypeList</H3>
  354. </A>
  355.  
  356.     <H4>Overview</H4>
  357. The <STRONG>DependentTypeList</STRONG> method returns a <STRONG>Recordset</STRONG> listing the dependent types.
  358.  
  359.     <H4>Input Parameters</H4>
  360. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  361.  
  362.     <H4>Methods Called</H4>
  363. No methods called
  364.  
  365.     <H4>Stored Procedures Called</H4>
  366. <STRONG>sp_DependentTypeList</STRONG>
  367.  
  368.     <H4>Tables Affected</H4>
  369. No tables affected
  370.  
  371.     <H4>Return Value</H4>
  372. A <STRONG>Recordset</STRONG> is returned containing:
  373. <BR><STRONG>DependentTypeId</STRONG>
  374. <BR><STRONG>DependentTypeLabel</STRONG>
  375. <BR><STRONG>DependentTypeRank</STRONG>
  376.  
  377. <HR>
  378.  
  379.  
  380. <A NAME=#GenderList>
  381.   <H3>GenderList</H3>
  382. </A>
  383.  
  384.     <H4>Overview</H4>
  385. The <STRONG>GenderList</STRONG> method returns a <STRONG>Recordset</STRONG> listing the gender types.
  386.  
  387.     <H4>Input Parameters</H4>
  388. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  389.  
  390.     <H4>Methods Called</H4>
  391. No methods called
  392.  
  393.     <H4>Stored Procedures Called</H4>
  394. <STRONG>sp_GenderList</STRONG>
  395.  
  396.     <H4>Tables Affected</H4>
  397. No tables affected
  398.  
  399.     <H4>Return Value</H4>
  400. A <STRONG>Recordset</STRONG> is returned containing:
  401. <BR><STRONG>GenderId</STRONG>
  402. <BR><STRONG>GenderLabel</STRONG>
  403. <BR><STRONG>GenderRank</STRONG>
  404.  
  405. <HR>
  406.  
  407.  
  408. <A NAME=#GetTotalCost>
  409.   <H3>GetTotalCost</H3>
  410. </A>
  411.  
  412.     <H4>Overview</H4>
  413. The <STRONG>GetTotalCost</STRONG> method returns a <STRONG>Recordset</STRONG> listing the total cost of the benefits options
  414. currently selected, summing the cost of either benefits paid for with pre-tax or benefits
  415. paid for with after-tax dollars.
  416.  
  417.     <H4>Input Parameters</H4>
  418. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  419. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id for which the total cost is sought
  420. <BR><STRONG>intBenefitYear</STRONG>: Benefit year for which the total cost is sought 
  421. <BR><STRONG>lngTaxStatusId</STRONG>: Tax status Id for which the total cost is sought 
  422.  
  423.     <H4>Methods Called</H4>
  424. No methods called
  425.  
  426.     <H4>Stored Procedures Called</H4>
  427. <STRONG>sp_GetTotalCost</STRONG>
  428.  
  429.     <H4>Tables Affected</H4>
  430. No tables affected
  431.  
  432.     <H4>Return Value</H4>
  433. A <STRONG>Recordset</STRONG> is returned containing:
  434. <BR><STRONG>TotalCost</STRONG>
  435.  
  436. <HR>
  437.  
  438.  
  439. <A NAME=#GetTotalCredits>
  440.   <H3>GetTotalCredits</H3>
  441. </A>
  442.  
  443.     <H4>Overview</H4>
  444. The <STRONG>GetTotalCredits</STRONG> method returns a <STRONG>Recordset</STRONG> listing the total credits available for 
  445. purchase of benefits. Any costs beyond the credit amount are deducted from the 
  446. employee's pay.
  447.  
  448.     <H4>Input Parameters</H4>
  449. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  450. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id for which the total credits are sought
  451. <BR><STRONG>intBenefitYear</STRONG>: Benefit year for which the total credits are sought 
  452.  
  453.     <H4>Methods Called</H4>
  454. No methods called
  455.  
  456.     <H4>Stored Procedures Called</H4>
  457. <STRONG>sp_GetTotalCredits</STRONG>
  458.  
  459.     <H4>Tables Affected</H4>
  460. No tables affected
  461.  
  462.     <H4>Return Value</H4>
  463. A <STRONG>Recordset</STRONG> is returned containing:
  464. <BR><STRONG>TotalCredits</STRONG>
  465.  
  466. <HR>
  467.  
  468.  
  469. <A NAME=#GetTotalPaycheck>
  470.   <H3>GetTotalPaycheck</H3>
  471. </A>
  472.  
  473.     <H4>Overview</H4>
  474. The <STRONG>GetTotalPaycheck</STRONG> method returns a <STRONG>Recordset</STRONG> listing the total paycheck after
  475. benefit costs, credits, exemptions, and tax withholding are considered.
  476.  
  477.     <H4>Input Parameters</H4>
  478. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  479. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id for which the total paycheck is sought
  480. <BR><STRONG>intBenefitYear</STRONG>: Benefit year for which the total paycheck is sought 
  481.  
  482.     <H4>Methods Called</H4>
  483. <STRONG><A HREF=#GetTotalCost>BenefitList.GetTotalCost</A></STRONG>
  484. <BR><STRONG><A HREF=#GetTotalCredits>BenefitList.GetTotalCredits</A></STRONG>
  485.  
  486.     <H4>Stored Procedures Called</H4>
  487. <STRONG>sp_GetTotalPaycheck</STRONG>
  488.  
  489.     <H4>Tables Affected</H4>
  490. No tables affected
  491.  
  492.     <H4>Return Value</H4>
  493. The value of the function is set to the value of curTotalPaycheck
  494.  
  495. <HR>
  496.  
  497.  
  498. <A NAME=#InactivateDependents>
  499.   <H3>InactivateDependents</H3>
  500. </A>
  501.  
  502.     <H4>Overview</H4>
  503. The <STRONG>InactivateDependents</STRONG> method sets the record status to "inactive" for all 
  504. the dependents for the specified employee and benefit. 
  505.  
  506.     <H4>Input Parameters</H4>
  507. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  508. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id for which the depenents are inactivated
  509. <BR><STRONG>lngBenefitId</STRONG>: Benefit year for which the depenents are inactivated 
  510.  
  511.     <H4>Methods Called</H4>
  512. No methods called
  513.  
  514.     <H4>Stored Procedures Called</H4>
  515. <STRONG>sp_InactivateDependents</STRONG>
  516.  
  517.     <H4>Tables Affected</H4>
  518. <STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeBenefitDependent>EmployeeBenefitDependent</A></STRONG>
  519.  
  520.     <H4>Return Value</H4>
  521. No value returned
  522.  
  523. <HR>
  524.  
  525.  
  526. <A NAME=#ListCoveredPersons>
  527.   <H3>ListCoveredPersons</H3>
  528. </A>
  529.  
  530.     <H4>Overview</H4>
  531. The <STRONG>ListCoveredPersons</STRONG> method returns a <STRONG>Recordset</STRONG> listing all the persons who are covered
  532. under the specified employee and benefit.
  533.  
  534.     <H4>Input Parameters</H4>
  535. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  536. <BR><STRONG>lngEmployeeId</STRONG>: The benefit Id for which to list the covered persons
  537. <BR><STRONG>lngBenefitId</STRONG>: Benefit Id for which to list the covered persons
  538.  
  539.     <H4>Methods Called</H4>
  540. No methods called
  541.  
  542.     <H4>Stored Procedures Called</H4>
  543. <STRONG>sp_ListCoveredPersons</STRONG>
  544.  
  545.     <H4>Tables Affected</H4>
  546. No tables affected
  547.  
  548.     <H4>Return Value</H4>
  549. A <STRONG>Recordset</STRONG> is returned containing:
  550. <BR><STRONG>DependentTypeLabel</STRONG>
  551. <BR><STRONG>FirstName</STRONG>
  552. <BR><STRONG>LastName</STRONG>
  553. <BR><STRONG>PhysicianLabel</STRONG>
  554.  
  555. <HR>
  556.  
  557.  
  558. <A NAME=#ListDependents>
  559.   <H3>ListDependents</H3>
  560. </A>
  561.  
  562.     <H4>Overview</H4>
  563. The <STRONG>ListDependents</STRONG> method returns a <STRONG>Recordset</STRONG> listing all the persons who are dependents of
  564. the specified employee along with information about their coverage under the specified benefit.
  565.  
  566.     <H4>Input Parameters</H4>
  567. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  568. <BR><STRONG>lngEmployeeId</STRONG>: The benefit Id for which to list the dependents
  569. <BR><STRONG>lngBenefitId</STRONG>: Benefit Id for which to list the dependents
  570.  
  571.     <H4>Methods Called</H4>
  572. No methods called
  573.  
  574.     <H4>Stored Procedures Called</H4>
  575. <STRONG>sp_ListDependents</STRONG>
  576.  
  577.     <H4>Tables Affected</H4>
  578. No tables affected
  579.  
  580.     <H4>Return Value</H4>
  581. A <STRONG>Recordset</STRONG> is returned containing:
  582. <BR><STRONG>DependentId</STRONG>
  583. <BR><STRONG>EBDStatus</STRONG>
  584. <BR><STRONG>DependentTypeLabel</STRONG>
  585. <BR><STRONG>LastName</STRONG>
  586. <BR><STRONG>FirstName</STRONG>
  587. <BR><STRONG>PhysicianId</STRONG>
  588.  
  589. <HR>
  590.  
  591.  
  592. <A NAME=#PhysicianList>
  593.   <H3>PhysicianList</H3>
  594. </A>
  595.  
  596.     <H4>Overview</H4>
  597. The <STRONG>PhysicianList</STRONG> method returns a <STRONG>Recordset</STRONG> listing all the physicians.
  598.  
  599.     <H4>Input Parameters</H4>
  600. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  601.  
  602.     <H4>Methods Called</H4>
  603. No methods called
  604.  
  605.     <H4>Stored Procedures Called</H4>
  606. <STRONG>sp_PhysicianList</STRONG>
  607.  
  608.     <H4>Tables Affected</H4>
  609. No tables affected
  610.  
  611.     <H4>Return Value</H4>
  612. A <STRONG>Recordset</STRONG> is returned containing:
  613. <BR><STRONG>PhysicianId</STRONG>
  614. <BR><STRONG>PhysicianLabel</STRONG>
  615.  
  616. <HR>
  617.  
  618.  
  619. <A NAME=#PlanField>
  620.   <H3>PlanField</H3>
  621. </A>
  622.  
  623.     <H4>Overview</H4>
  624. The <STRONG>PlanField</STRONG> method returns a <STRONG>Recordset</STRONG> listing all the physicians.
  625.  
  626.     <H4>Input Parameters</H4>
  627. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  628. <BR><STRONG>lngPlanId</STRONG>: The plan Id for which the plan field records should be returned
  629.  
  630.     <H4>Methods Called</H4>
  631. No methods called
  632.  
  633.     <H4>Stored Procedures Called</H4>
  634. <STRONG>sp_PlanField</STRONG>
  635.  
  636.     <H4>Tables Affected</H4>
  637. No tables affected
  638.  
  639.     <H4>Return Value</H4>
  640. A <STRONG>Recordset</STRONG> is returned containing:
  641. <BR><STRONG>FieldLabel</STRONG>
  642. <BR><STRONG>FieldValue</STRONG>
  643.  
  644. <HR>
  645.  
  646.  
  647. <A NAME=#PlanInfo>
  648.   <H3>PlanInfo</H3>
  649. </A>
  650.  
  651.     <H4>Overview</H4>
  652. The <STRONG>PlanInfo</STRONG> method returns a <STRONG>Recordset</STRONG> listing information about the specified plan.
  653.  
  654.     <H4>Input Parameters</H4>
  655. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  656. <BR><STRONG>lngBenefitId</STRONG>: The benefit Id for which the plan records should be returned
  657. <BR><STRONG>lngPlanId</STRONG>: The plan Id for which the plan records should be returned
  658.  
  659.     <H4>Methods Called</H4>
  660. No methods called
  661.  
  662.     <H4>Stored Procedures Called</H4>
  663. <STRONG>sp_PlanInfo</STRONG>
  664.  
  665.     <H4>Tables Affected</H4>
  666. No tables affected
  667.  
  668.     <H4>Return Value</H4>
  669. A <STRONG>Recordset</STRONG> is returned containing:
  670. <BR><STRONG>PlanLabel</STRONG>
  671. <BR><STRONG>PlanDesc</STRONG>
  672. <BR><STRONG>PlanCost</STRONG>
  673. <BR><STRONG>PhysicianRequired</STRONG>
  674. <BR><STRONG>PlanRank</STRONG>
  675.  
  676. <HR>
  677.  
  678.  
  679. <A NAME=#PlanList>
  680.   <H3>PlanList</H3>
  681. </A>
  682.  
  683.     <H4>Overview</H4>
  684. The <STRONG>PlanList</STRONG> method returns a <STRONG>Recordset</STRONG> listing plans that fall under the specified benefit Id.
  685.  
  686.     <H4>Input Parameters</H4>
  687. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  688. <BR><STRONG>lngBenefitId</STRONG>: The benefit Id for which the plan records should be returned
  689.  
  690.     <H4>Methods Called</H4>
  691. No methods called
  692.  
  693.     <H4>Stored Procedures Called</H4>
  694. <STRONG>sp_PlanList</STRONG>
  695.  
  696.     <H4>Tables Affected</H4>
  697. No tables affected
  698.  
  699.     <H4>Return Value</H4>
  700. A <STRONG>Recordset</STRONG> is returned containing:
  701. <BR><STRONG>PlanId</STRONG>
  702. <BR><STRONG>PlanLabel</STRONG>
  703. <BR><STRONG>PlanRank</STRONG>
  704.  
  705. <HR>
  706.  
  707.  
  708. <A NAME=#SaveDependents>
  709.   <H3>SaveDependents</H3>
  710. </A>
  711.  
  712.     <H4>Overview</H4>
  713. The <STRONG>SaveDependents</STRONG> method changes to "Active" the record status of all the specified records,
  714. and saves the physician Id as needed.
  715.  
  716.     <H4>Input Parameters</H4>
  717. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  718. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id for which the dependent records should be saved
  719. <BR><STRONG>lngBenefitId</STRONG>: The benefit Id for which the dependent records should be saved
  720. <BR><STRONG>lngDependentId</STRONG>: The benefit Id for which the dependent records should be saved
  721. <BR><STRONG>lngPhysicianId</STRONG>: The benefit Id for which the dependent records should be saved
  722.  
  723.     <H4>Methods Called</H4>
  724. No methods called
  725.  
  726.     <H4>Stored Procedures Called</H4>
  727. <STRONG>sp_SaveDependents</STRONG>
  728.  
  729.     <H4>Tables Affected</H4>
  730. <STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeBenefitDependent>EmployeeBenefitDependent</A></STRONG>
  731.  
  732.     <H4>Return Value</H4>
  733. No value returned
  734.  
  735. <HR>
  736.  
  737.  
  738. <A NAME=#SummaryForId>
  739.   <H3>SummaryForId</H3>
  740. </A>
  741.  
  742.     <H4>Overview</H4>
  743. The <STRONG>SummaryForId</STRONG> method returns a <STRONG>Recordset</STRONG> containing all of the benefit records for the
  744. specified employee and benefit year.
  745.  
  746.     <H4>Input Parameters</H4>
  747. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  748. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id for which the benefit records should be returned
  749. <BR><STRONG>intBenefitYear</STRONG>: The benefit year for which the benefit records should be returned
  750.  
  751.     <H4>Methods Called</H4>
  752. No methods called
  753.  
  754.     <H4>Stored Procedures Called</H4>
  755. <STRONG>sp_SummaryForId</STRONG>
  756.  
  757.     <H4>Tables Affected</H4>
  758. No tables affected
  759.  
  760.     <H4>Return Value</H4>
  761. A <STRONG>Recordset</STRONG> is returned containing:
  762. <BR><STRONG>BenefitId</STRONG>
  763. <BR><STRONG>BenefitLabel</STRONG>
  764. <BR><STRONG>DetailTemplate</STRONG>
  765. <BR><STRONG>PlanLabel</STRONG>
  766. <BR><STRONG>PlanCost</STRONG>
  767. <BR><STRONG>TaxStatusLabel</STRONG>
  768.  
  769. <HR>
  770.  
  771.  
  772. <A NAME=#TaxStatusList>
  773.   <H3>TaxStatusList</H3>
  774. </A>
  775.  
  776.     <H4>Overview</H4>
  777. The <STRONG>TaxStatusList</STRONG> method returns a <STRONG>Recordset</STRONG> containing all of the tax status records that apply 
  778. to the specified benefit Id.
  779.  
  780.     <H4>Input Parameters</H4>
  781. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  782. <BR><STRONG>lngBenefitId</STRONG>: The benefit Id for which the tax status records should be returned
  783.  
  784.     <H4>Methods Called</H4>
  785. No methods called
  786.  
  787.     <H4>Stored Procedures Called</H4>
  788. <STRONG>sp_TaxStatusList</STRONG>
  789.  
  790.     <H4>Tables Affected</H4>
  791. No tables affected
  792.  
  793.     <H4>Return Value</H4>
  794. A <STRONG>Recordset</STRONG> is returned containing:
  795. <BR><STRONG>TaxStatusId</STRONG>
  796. <BR><STRONG>TaxStatusLabel</STRONG>
  797. <BR><STRONG>TaxDefault</STRONG>
  798.  
  799. <HR>
  800.  
  801.  
  802. <A NAME=#UpdateBenefitList>
  803.   <H3>Update</H3>
  804. </A>
  805.  
  806.     <H4>Overview</H4>
  807. The <STRONG>Update</STRONG> method updates the EmployeeBenefit table with the specified 
  808. plan Id and tax status Id for the specified employee and benefit. Note that this is 
  809. the <STRONG>BenefitList.Update</STRONG> method; there is also an 
  810. <STRONG>Employee.Update</STRONG> method.
  811.  
  812.     <H4>Input Parameters</H4>
  813. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  814. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id for which the information should be updated
  815. <BR><STRONG>lngBenefitId</STRONG>: The benefit Id for which the information should be updated
  816. <BR><STRONG>lngPlanId</STRONG>: The plan Id selected under the benefit
  817. <BR><STRONG>lngTaxStatusId</STRONG>: The tax status Id to be applied to the benefit
  818.  
  819.     <H4>Methods Called</H4>
  820. No methods called
  821.  
  822.     <H4>Stored Procedures Called</H4>
  823. <STRONG>sp_Update</STRONG>
  824.  
  825.     <H4>Tables Affected</H4>
  826. <STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeBenefit>EmployeeBenefit</A></STRONG>
  827.  
  828.     <H4>Return Value</H4>
  829. No value returned
  830.  
  831. <A NAME=#Employee>
  832.   <H2>The Employee Class</H2>
  833. </A>
  834. The primary focus of the <STRONG>Employee</STRONG> class is maintaining the employee information 
  835. in the Benefits database. The class has nine methods, which are called as needed
  836. by the ASP pages in Benefits, but could also be called by other applications.
  837.  
  838. <HR>
  839.  
  840.  
  841. <A NAME=#AddDependent>
  842.   <H3>AddDependent</H3>
  843. </A>
  844.  
  845.     <H4>Overview</H4>
  846. The <STRONG>AddDependent</STRONG> method adds a dependent's information to the Benefits database.
  847. It inserts records into the Dependent and EmployeeDependent tables, and calls 
  848. <STRONG><A HREF=#AddEBD>BenefitList.AddEBD</A></STRONG>
  849. to add records to the EmployeeBenefitDependent table.
  850.  
  851.     <H4>Input Parameters</H4>
  852. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  853. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id of the employee whose dependent is being added
  854. <BR><STRONG>lngDependentTypeId</STRONG>: The type of dependent being added, as defined in the DependentType table
  855. <BR><STRONG>strFirstName</STRONG>: The first name of the dependent
  856. <BR><STRONG>strLastName</STRONG>: The last name of the dependent
  857. <BR><STRONG>strMiddleName</STRONG>: The middle name of the dependent
  858. <BR><STRONG>strDependentSSN</STRONG>: The Social Security Number of the dependent
  859. <BR><STRONG>lngDependentGenderId</STRONG>: The gender of the dependent, as defined in the Gender table
  860. <BR><STRONG>datDependentBirthdate</STRONG>: The birthdate of the dependent
  861.  
  862.     <H4>Methods Called</H4>
  863. <STRONG><A HREF=#AddEBD>BenefitList.AddEBD</A></STRONG>
  864.  
  865.     <H4>Stored Procedures Called</H4>
  866. No stored procedures called
  867.  
  868.     <H4>Tables Affected</H4>
  869. <STRONG><A HREF=HIWBenefitsDatabase.asp#Dependent>Dependent</A></STRONG>
  870. <BR><STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeDependent>EmployeeDependent</A></STRONG>
  871. <BR><STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeBenefitDependent>EmployeeBenefitDependent</A></STRONG>
  872.  
  873.     <H4>Return Value</H4>
  874. No value returned
  875.  
  876. <HR>
  877.  
  878.  
  879. <A NAME=#AddEmployeeDependent>
  880.   <H3>AddEmployeeDependent</H3>
  881. </A>
  882.  
  883.     <H4>Overview</H4>
  884. The <STRONG>AddEmployeeDependent</STRONG> method creates a record for the employee in the Dependent table
  885. and in the EmployeeDependent table.
  886.  
  887.     <H4>Input Parameters</H4>
  888. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  889. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id of the employee
  890.  
  891.     <H4>Methods Called</H4>
  892. No methods called
  893.  
  894.     <H4>Stored Procedures Called</H4>
  895. No stored procedures called
  896.  
  897.     <H4>Tables Affected</H4>
  898. <STRONG><A HREF=HIWBenefitsDatabase.asp#Dependent>Dependent</A></STRONG>
  899. <BR><STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeDependent>EmployeeDependent</A></STRONG>
  900.  
  901.     <H4>Return Value</H4>
  902. No value returned
  903.  
  904. <HR>
  905.  
  906.  
  907. <A NAME=#AddNEW>
  908.   <H3>AddNew</H3>
  909. </A>
  910.  
  911.     <H4>Overview</H4>
  912. The <STRONG>AddNew</STRONG> method creates a new record for the specified Windows NT 
  913. user name. It inserts a record
  914. into the Employee table with the Windows NT user name set to the value passed in, which was 
  915. retrieved from the server variables by the ASP page. It then calls other methods to add the
  916. employee dependent record, new benefits records, and a change qualifier that will allow the
  917. new employee to change benefit choices.
  918.  
  919.     <H4>Input Parameters</H4>
  920. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  921. <BR><STRONG>strNTUserName</STRONG>: The Windows NT user name retrieved from the server variables by the ASP page
  922. <BR><STRONG>intBenefitYear </STRONG>: The benefit year currently in effect
  923. <BR><STRONG>lngQualifierId </STRONG>: The Id of the qualifier that represents adding a new employee
  924. <BR><STRONG>datQualifierDate </STRONG>: The date the new employee was added
  925.  
  926.     <H4>Methods Called</H4>
  927. <STRONG><A HREF=#AddEmployeeDependent>Employee.AddEmployeeDependent</A></STRONG>
  928. <BR><STRONG><A HREF=#NewBenefits>Employee.NewBenefits</A></STRONG>
  929. <BR><STRONG><A HREF=#AddQualifier>BenefitList.AddQualifier</A></STRONG>
  930.  
  931.     <H4>Stored Procedures Called</H4>
  932. No stored procedures called
  933.  
  934.     <H4>Tables Affected</H4>
  935. <STRONG><A HREF=HIWBenefitsDatabase.asp#Employee>Employee</A></STRONG>
  936. <BR><STRONG><A HREF=HIWBenefitsDatabase.asp#Dependent>Dependent</A></STRONG>
  937. <BR><STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeDependent>EmployeeDependent</A></STRONG>
  938. <BR><STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeBenefitDependent>EmployeeBenefitDependent</A></STRONG>
  939. <BR><STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeQualifier>EmployeeQualifier</A></STRONG>
  940.  
  941.     <H4>Return Value</H4>
  942. No value returned
  943.  
  944. <HR>
  945.  
  946.  
  947. <A NAME=#GetDependents>
  948.   <H3>GetDependents</H3>
  949. </A>
  950.  
  951.     <H4>Overview</H4>
  952. The <STRONG>GetDependents</STRONG> method returns a <STRONG>Recordset</STRONG> containing information on the specified
  953. employee's dependents.
  954.  
  955.     <H4>Input Parameters</H4>
  956. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  957. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id of the employee
  958.  
  959.     <H4>Methods Called</H4>
  960. No methods called
  961.  
  962.     <H4>Stored Procedures Called</H4>
  963. No stored procedures called
  964.  
  965.     <H4>Tables Affected</H4>
  966. No tables affected
  967.  
  968.     <H4>Return Value</H4>
  969. A <STRONG>Recordset</STRONG> is returned containing:
  970. <BR><STRONG>DependentId</STRONG>
  971. <BR><STRONG>DependentTypeLabel</STRONG> 
  972. <BR><STRONG>LastName</STRONG> 
  973. <BR><STRONG>FirstName</STRONG> 
  974. <BR><STRONG>MiddleName</STRONG> 
  975. <BR><STRONG>DependentBirthdate</STRONG> 
  976. <BR><STRONG>GenderLabel</STRONG> 
  977. <BR><STRONG>DependentSSN</STRONG> 
  978.  
  979. <HR>
  980.  
  981.  
  982. <A NAME=#GetForId>
  983.   <H3>GetForId</H3>
  984. </A>
  985.  
  986.     <H4>Overview</H4>
  987. The <STRONG>GetForId</STRONG> method returns a <STRONG>Recordset</STRONG> containing information on the specified
  988. employee.
  989.  
  990.     <H4>Input Parameters</H4>
  991. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  992. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id of the employee
  993.  
  994.     <H4>Methods Called</H4>
  995. No methods called
  996.  
  997.     <H4>Stored Procedures Called</H4>
  998. No stored procedures called
  999.  
  1000.     <H4>Tables Affected</H4>
  1001. No tables affected
  1002.  
  1003.     <H4>Return Value</H4>
  1004. A <STRONG>Recordset</STRONG> is returned containing:
  1005. <BR><STRONG>DependentId</STRONG>
  1006. <BR><STRONG>FirstName</STRONG>
  1007. <BR><STRONG>LastName</STRONG>
  1008. <BR><STRONG>MiddleName</STRONG>
  1009. <BR><STRONG>KnownAs</STRONG>
  1010. <BR><STRONG>NTUserName</STRONG>
  1011. <BR><STRONG>DependentSSN</STRONG>
  1012. <BR><STRONG>DependentGenderId</STRONG>
  1013. <BR><STRONG>DependentBirthdate</STRONG>
  1014. <BR><STRONG>Address1</STRONG>
  1015. <BR><STRONG>Address2</STRONG>
  1016. <BR><STRONG>City</STRONG>
  1017. <BR><STRONG>State</STRONG>
  1018. <BR><STRONG>PostCode</STRONG>
  1019. <BR><STRONG>Country</STRONG>
  1020. <BR><STRONG>HomePhone</STRONG>
  1021. <BR><STRONG>BusinessPhone</STRONG>
  1022. <BR><STRONG>Fax</STRONG>
  1023. <BR><STRONG>Email</STRONG>
  1024. <BR><STRONG>PeriodEarnings</STRONG>
  1025. <BR><STRONG>Exemptions</STRONG>
  1026.  
  1027. <HR>
  1028.  
  1029.  
  1030. <A NAME=#LookupEmployee>
  1031.   <H3>LookupEmployee</H3>
  1032. </A>
  1033.  
  1034.     <H4>Overview</H4>
  1035. The <STRONG>LookupEmployee</STRONG> method returns a <STRONG>Recordset</STRONG> containing 
  1036. the <STRONG>EmployeeId</STRONG> of the current user.
  1037.  
  1038.     <H4>Input Parameters</H4>
  1039. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  1040. <BR><STRONG>strLogonUser</STRONG>: The Logon_User value returned by the browser, containing
  1041. the Windows NT user name of the current user
  1042.  
  1043.     <H4>Methods Called</H4>
  1044. No methods called
  1045.  
  1046.     <H4>Stored Procedures Called</H4>
  1047. No stored procedures called
  1048.  
  1049.     <H4>Tables Affected</H4>
  1050. No tables affected
  1051.  
  1052.     <H4>Return Value</H4>
  1053. A <STRONG>Recordset</STRONG> is returned containing:
  1054. <BR><STRONG>EmployeeId</STRONG>
  1055.  
  1056. <HR>
  1057.  
  1058.  
  1059. <A NAME=#NewBenefits>
  1060.   <H3>NewBenefits</H3>
  1061. </A>
  1062.  
  1063.     <H4>Overview</H4>
  1064. The <STRONG>NewBenefits</STRONG> method creates a new record for each benefit for the 
  1065. year specified, for the specified employee.
  1066.  
  1067.     <H4>Input Parameters</H4>
  1068. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  1069. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id of the employee
  1070. <BR><STRONG>intBenefitYear </STRONG>: The benefit year currently in effect
  1071.  
  1072.     <H4>Methods Called</H4>
  1073. <BR><STRONG><A HREF=#AddBenefit>BenefitList.AddBenefit</A></STRONG>
  1074.  
  1075.     <H4>Stored Procedures Called</H4>
  1076. No stored procedures called
  1077.  
  1078.     <H4>Tables Affected</H4>
  1079. <STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeBenefit>EmployeeBenefit</A></STRONG>
  1080.  
  1081.     <H4>Return Value</H4>
  1082. No value returned
  1083.  
  1084. <HR>
  1085.  
  1086.  
  1087. <A NAME=#RemoveDependent>
  1088.   <H3>RemoveDependent</H3>
  1089. </A>
  1090.  
  1091.     <H4>Overview</H4>
  1092. The <STRONG>RemoveDependent</STRONG> method marks a dependent's records as status 
  1093. "Delete". This method is used in removing a dependent from an employee's records.
  1094.  
  1095.     <H4>Input Parameters</H4>
  1096. <STRONG>strFileDSN</STRONG>: The file DSN that should be used in executing this method
  1097. <BR><STRONG>lngEmployeeId</STRONG>: The employee Id of the employee whose dependent is being removed
  1098. <BR><STRONG>lngDependentId</STRONG>: The dependent Id of the dependent who is being removed
  1099.  
  1100.     <H4>Methods Called</H4>
  1101. No methods called
  1102.  
  1103.     <H4>Stored Procedures Called</H4>
  1104. No stored procedures called
  1105.  
  1106.     <H4>Tables Affected</H4>
  1107. <STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeDependent>EmployeeDependent</A></STRONG>
  1108. <BR><STRONG><A HREF=HIWBenefitsDatabase.asp#EmployeeBenefitDependent>EmployeeBenefitDependent</A></STRONG>
  1109.  
  1110.     <H4>Return Value</H4>
  1111. No value returned
  1112.  
  1113. <HR>
  1114.  
  1115.  
  1116. <A NAME=#UpdateEmployee>
  1117.   <H3>Update</H3>
  1118. </A>
  1119.  
  1120.     <H4>Overview</H4>
  1121. The <STRONG>Update</STRONG> method updates demographic information for the specified employee, setting fields
  1122. to the specified values. Note that this is the <STRONG>Employee.Update</STRONG> method; there is also a
  1123. <STRONG>BenefitList.Update</STRONG> method.
  1124.  
  1125.     <H4>Input Parameters</H4>
  1126. <STRONG>strFileDSN</STRONG>: File DSN that should be used in executing this method
  1127. <BR><STRONG>lngEmployeeId</STRONG>: Employee Id of the employee whose record is being updated
  1128. <BR><STRONG>lngDependentId</STRONG>: Dependent Id of the employee's dependent record
  1129. <BR><STRONG>strFirstName</STRONG>: Employee first name
  1130. <BR><STRONG>strLastName</STRONG>: Employee last name
  1131. <BR><STRONG>strMiddleName</STRONG>: Employee middle name
  1132. <BR><STRONG>strKnownAs</STRONG>: Employee nickname
  1133. <BR><STRONG>strDependentSSN</STRONG>: Employee SSN
  1134. <BR><STRONG>lngDependentGenderId</STRONG>: Employee Gender Id
  1135. <BR><STRONG>datDependentBirthdate</STRONG>: Employee birthdate
  1136. <BR><STRONG>strAddress1</STRONG>: Employee address line 1
  1137. <BR><STRONG>strAddress2</STRONG>: Employee address line 2
  1138. <BR><STRONG>strCity</STRONG>: Employee city
  1139. <BR><STRONG>strState</STRONG>: Employee state
  1140. <BR><STRONG>strPostCode</STRONG>: Employee postal code
  1141. <BR><STRONG>strCountry</STRONG>: Employee country
  1142. <BR><STRONG>strHomePhone</STRONG>: Employee home phone
  1143. <BR><STRONG>strBusinessPhone</STRONG>: Employee business phone
  1144. <BR><STRONG>strFax</STRONG>: Employee fax number
  1145. <BR><STRONG>strEmail</STRONG>: Employee email address
  1146. <BR><STRONG>lngExemptions</STRONG>: Employee number of exemptions
  1147.  
  1148.     <H4>Methods Called</H4>
  1149. No methods called
  1150.  
  1151.     <H4>Stored Procedures Called</H4>
  1152. No stored procedures called
  1153.  
  1154.     <H4>Tables Affected</H4>
  1155. <STRONG><A HREF=HIWBenefitsDatabase.asp#Employee>Employee</A></STRONG>
  1156. <BR><STRONG><A HREF=HIWBenefitsDatabase.asp#Dependent>Dependent</A></STRONG>
  1157.  
  1158.     <H4>Return Value</H4>
  1159. No value returned
  1160.  
  1161. <HR>
  1162.  
  1163.  
  1164. <A NAME=#UpdateDependent>
  1165.   <H3>UpdateDependent</H3>
  1166. </A>
  1167.  
  1168.     <H4>Overview</H4>
  1169. The <STRONG>UpdateDependent</STRONG> method updates demographic information for the specified dependent, 
  1170. setting fields to the specified values.
  1171.  
  1172.     <H4>Input Parameters</H4>
  1173. <STRONG>strFileDSN</STRONG>: File DSN that should be used in executing this method
  1174. <BR><STRONG>lngDependentId</STRONG>: Dependent Id of the dependent record being updated
  1175. <BR><STRONG>strDependentSSN</STRONG>: Dependent SSN
  1176. <BR><STRONG>lngDependentGenderId</STRONG>: Dependent Gender Id
  1177. <BR><STRONG>datDependentBirthdate</STRONG>: Dependent birthdate
  1178.  
  1179.     <H4>Methods Called</H4>
  1180. No methods called
  1181.  
  1182.     <H4>Stored Procedures Called</H4>
  1183. No stored procedures called
  1184.  
  1185.     <H4>Tables Affected</H4>
  1186. <STRONG><A HREF=HIWBenefitsDatabase.asp#Dependent>Dependent</A></STRONG>
  1187.  
  1188.     <H4>Return Value</H4>
  1189. No value returned
  1190.  
  1191. <P>
  1192.             </FONT>
  1193.           </TD>
  1194.         </TR>
  1195.       </TABLE>
  1196.     </TD>
  1197.   </TR>
  1198. </TABLE>
  1199. <!--END TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND MAIN CONTENT-->
  1200.  
  1201. <BR>
  1202. <BR>
  1203.  
  1204. <CENTER>
  1205. <!--BEGIN LEGAL INFORMATION-->
  1206. <TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
  1207.   <TR>
  1208.     <TD>
  1209.       <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="1">
  1210.         <A HREF="../legal.htm">
  1211.           ©1997 Microsoft Corporation. All rights reserved. Terms of Use.
  1212.         </A>
  1213.       </FONT>
  1214.       <P>
  1215.     </TD>
  1216.   </TR>
  1217. </TABLE>
  1218. </CENTER>
  1219. <!--END LEGAL INFORMATION-->
  1220. </BODY>
  1221. </HTML>
  1222. <!--END HTML-->
  1223.  
  1224. <%
  1225.  
  1226.   '
  1227.   ' SetURLCallHIW saves the name of the page in the application that called HIW page
  1228.   '
  1229.   Sub SetURLCallHIW
  1230.     ' Extract the last directory from path
  1231.     Dim strPathInfo, strLastChar, intLocation, ShortString, strLastDir
  1232.     strPathInfo = Request.ServerVariables("HTTP_REFERER")
  1233.     ' now str has a value like: "http://servername/exair/benefits/Default.asp"
  1234.     ' we need to extract "benefits"
  1235.     strLastChar = ""
  1236.     ShortString = strPathInfo
  1237.     intLocation = 0
  1238.     
  1239.     ' Get position of beginning of file name
  1240.     Do Until strLastChar = "/"
  1241.       strLastChar = right(ShortString, 1)
  1242.       ShortString = left(ShortString, len(ShortString)-1)
  1243.       intLocation = intLocation + 1
  1244.     Loop
  1245.     
  1246.     ' Now get position of beginning of last directory name
  1247.     strLastChar = ""
  1248.     Do Until strLastChar = "/"
  1249.       strLastChar = right(ShortString, 1)
  1250.       ShortString = left(ShortString, len(ShortString)-1)
  1251.       intLocation = intLocation + 1
  1252.     Loop
  1253.     strLastDir = mid(strPathInfo, len(strPathInfo) - (intLocation - 2), 10)
  1254.     
  1255.     ' If last directory not 'HowItWorks', then save the calling URL
  1256.     If strLastDir <> "HowItWorks" Then
  1257.       Session("URLCallHIW") = strPathInfo
  1258.     End If
  1259.   End Sub
  1260.  
  1261. %>