Csc317 Answer Scheme Oct 2006

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Csc317 Answer Scheme Oct 2006 as PDF for free.

More details

  • Words: 335
  • Pages: 4
home.asp Online Mileage Claim System

The Financial Department of Company ABC

<strong> Perjalanan (km)

<strong> Mileage Rate (RM)

First 500

0.60/km

For every subsequence km after first 500km

0.55/km



claimForm.asp Claim Form

Milage Claim

Staff Number
Name
Distance Travelled (km)
Positions <select name="Positions">
Group (km) A  

B   C  
claimProcess.asp <%@ LANGUAGE="JAVASCRIPT"%> Claim Process <% var StaffId = Request.Form("StaffId"); var name = Request.Form("name"); var distance = Request.Form("distance"); var position = Request.Form("Positions "); var group = Request.Form("group"); var claimamount; if (distance <= 500) claimamount = distance * 0.6; else { var first500 = 500 * 0.6; var x = distance - 500; var next500 = x * 0.55; claimamount = first500 + next500; } var conObj=Server.CreateObject ("ADODB.Connection"); conObj.Open("claim_dsn");

var sqlStr = "INSERT INTO claimrecord VALUES (' " + StaffId + " ' , ' " + name + " ' , ' " + position + " ' , ' " + group + " ' , ' " + distance + " ' , ' " + claimamount + " ' )"; conObj.Execute(sqlStr); conObj.Close(); conObj = null; %>
Record has been saved successfully. Thank you for using this system.
Staff Number: <% Response.write(StaffId)%>
Name: <% Response.write(name)%>
Distance traveled: <% Response.write(distance))%>
Position: <% Response.write(position)%>
Group: <% Response.write(group)%>
Total Claim Amount: <% Response.write(claimamount)%>

Related Documents

Answer Scheme
October 2019 27
Answer Scheme Mac2019.docx
October 2019 23
Answer Scheme Quiz 1
May 2020 16