CIS407a Full Course ( All Discussions,Ilabs,quizzes,Course projects)- July 2016

Ace your studies with our custom writing services! We've got your back for top grades and timely submissions, so you can say goodbye to the stress. Trust us to get you there!


Order a Similar Paper Order a Different Paper

DISCUSSIONS

 

CIS407a week 1 discussion DQ 1 & DQ 2

DQ 1 Web-Based vs. Windows-Based (graded)

 

Compare and contrast web-based and windows-based applications. What are the pros and cons of each?

 

DQ 2 Lab Forum (graded)

 

This discussion is used to discuss the programming labs and techniques. Please post any programming questions or hints and tips that you have concerning this week’s programming lab. At a minimum, post at least three notes that highlight the key programming techniques and/or problems that you had with this week’s lab.

 

CIS407a week 2 discussion DQ 1 & DQ 2

DQ 1 Sites That Make Good Use Of Input (graded)

 

Find and post sites that make good use of input. Explain why you think the site makes good use of input.

DQ 2 Lab Forum (graded) Lab Forum (graded)

 

This discussion is used to discuss the programming labs and techniques. Please post any programming questions or hints and tips that you have concerning this week’s programming lab. At a minimum, post at least three notes that highlight the key programming techniques and/or problems that you had with this week’s lab.

 

CIS407a week 3 discussion DQ 1 & DQ 2

DQ 1 Ethical and Legal Issues on Monitoring (graded)

 

Discuss ethical issues on user monitoring. How is this done legally? (Please answer this from the perspective of monitoring on the server, not an employee being monitored when he or she goes to particular websites.) Ethical and Legal Issues on Monitoring (graded)

 

DQ 2 Lab Forum (graded)

 

Lab Forum (graded) This discussion is used to discuss the programming labs and techniques. Please post any programming questions or hints and tips that you have concerning this week’s programming lab. At a minimum, post at least three notes that highlight the key programming techniques and/or problems that you had with this week’s lab. Lab Forum (graded) .

 

CIS407a week 4 discussion DQ 1 & DQ 2

DQ 1 Web Controls for Displaying Data (graded)

 

Discuss the similarities and differences among the various web controls that ASP.NET provides for displaying data such as the GridView, DetailsView, and FormsView controls. When would you use each of these controls and why?

 

DQ 2 Lab Forum (graded)

 

This discussion is used to discuss the programming labs and techniques. Please post any programming questions or hints and tips that you have concerning this week’s programming lab. At a minimum, post at least three notes that highlight the key programming techniques and/or problems that you had with this week’s lab.

 

CIS407a week 5 discussion DQ 1 & DQ 2

 

DQ 1 Transaction COMMIT and ROLLBACK (graded)

 

Discuss when the transaction COMMIT and ROLLBACK features might be used. DQ 2 Lab Forum (graded) This discussion is used to discuss the programming labs and techniques. Please post any programming questions or “hints and tips” that you have concerning this week’s programming lab. At a minimum, post three notes that highlight the key programming techniques and/or problems that you had with this week’s lab.

 

cis407a week 6 discussion DQ 1 & DQ 2

 

DQ 1 Web Security Issues (graded)

 

Discuss good or bad Web security practices for software developers, database administrators, and network security administrators. Explain your rationale.

 

DQ 2 Lab Forum (graded)

 

This discussion is used to discuss the programming labs and techniques. Please post any programming questions or hints and tips that you have concerning this week’s programming lab. At a minimum, post three notes that highlight the key programming techniques and/or problems that you had with this week’s lab.

 

CIS407a week 7 discussion DQ 1 & DQ 2

DQ 1 Error Handling (graded)

 

Discuss different ways to respond to errors, such as notifying the user onscreen, writing to an error log, notifying the developer via e-mail, and others. What are the advantages and disadvantages of each approach? When would you apply each method?

 

DQ 2 Lab Forum (graded)

 

This discussion is used to discuss the programming labs and techniques. Please post any programming questions or hints and tips that you have concerning this week’s programming lab. At a minimum, post three notes that highlight the key programming techniques and/or problems that you had with this week’s lab.

 

 

 

QUIZZES

 

<pstyle=”box-sizing: border-box;=”” margin:=”” 0px=”” 10px;=”” color:=”” rgb(51,=”” 51,=”” 51);=”” font-family:=”” “helvetica=”” neue”,=”” helvetica,=”” arial,=”” sans-serif;=”” font-size:=”” 14px;=”” line-height:=”” 20px;=”” background-color:=”” rgb(255,=”” 255,=”” 255);”=””>CIS407a week 2 quiz

 

1. Question : (TCO 2) The _____ is generated automatically by ASP.NET.

 

SSL

 

HTTP

 

HTML

 

FTP

 

 

 

Question 2. Question : (TCO 2) Ensuring that a Web page is compatible with as many browsers as possible is called _____ .

 

IE

 

cross-browser compatibility

 

HTML5

 

workarounds

 

 

 

Question 3. Question : (TCO 2) A(n) _____ style is created by coding a style attribute for an HTML element.

 

rule

 

self-closing

 

extra

 

inline

 

 

 

Question 4. Question : (TCO 2) The number of pixels between cells in a table can be specified by _____.

 

cell spacing

 

width

 

colspan

 

rowspan

 

 

 

Question 5. Question : (TCO 2) As you enter code in Visual Studio, the _____ feature provides drop-down lists of coding options that you can enter by selecting and pressing the Tab key.

 

IntelliSense

 

Comment

 

Event

 

Toolbox

 

 

 

Question 6. Question : (TCO 2) The difference between check box and radio button controls is that _____.

 

only one check box in a group can be checked at the same time

only one radio button in a group can be checked at the same time

you can only use the Checked property to check whether a check box is checked

you can’t have just one radio button on a form

 

 

 

Question 7. Question : (TCO 2) The CheckedChanged event is raised for a radio button whenever the checked property of _____.

 

the button changes to checked

 

the button changes

 

any button in the group changes to checked

 

any button in the group changes

 

 

 

Question 8. Question : (TCO 2) The Rows and SelectionMode properties apply to _______.

 

all controls

 

textboxes

 

listboxes

 

dropdown boxes

 

 

 

Question 9. Question : (TCO 2) The hyperlink control provides an easy way to _____ to another page.

 

group

 

link

 

check

 

stick

 

 

 

Question 10. Question : (TCO 2) The ________ displays a text box and button for users to browse, select, and upload a file.

 

Text box control

 

Upload text box control

 

Upload file control

 

File menu

 

 

 

CIS407aweek 3

 

1. Question : (TCO 3) By default, session state objects are tracked by the use of _____.

 

query strings

 

brownies

 

applications

 

cookies

 

 

 

Question 2. Question : (TCO 3) The Application_Start event is typically used to _____.

 

initialize the values of session state items

 

initialize the values of application state items

 

retrieve application statistics from ASP.NET

 

add components to the global.asax file

 

 

 

Question 3. Question : (TCO 3) A global.asax file for a website provides _____.

 

event handlers for application events

 

application properties and methods

 

the attributes for an application

 

the options for an application

 

 

 

Question 4. Question : (TCO 3) Master page events are like content page events, but the master page events occur _____ the content page events.

 

before

 

after

 

at the same time

 

master page events do not occur

 

 

 

Question 5. Question : (TCO 3) Which of the following is true for friendly URLs?

 

They mirror the directory structure of the website.

 

They don’t include the file names of the pages that are being requested.

They can include query strings.

 

They often improve browser performance.

 

 

 

Question 6. Question : (TCO 3) Before you can use a navigation control, you must _____.

 

configure the web.config

 

configure the global.asax

 

configure the web.sitemap

 

configure the security settings

 

 

 

Question 7. Question : (TCO 3) The _____ control displays the navigation as menu options.

 

Master page

 

TreeView

 

Menu

 

Listbox

 

 

 

Question 8. Question : (TCO 3) Application-state variables are _____.

 

global variables for each ASP.NET application

 

local variables for a file

 

not useful for data connections

 

not able to be modified in ASP.NET pages

 

 

 

Question 9. Question : (TCO 3) _____ variables are maintained while the browser is opened.

 

Session

 

Application

 

Class

 

Cookie

 

 

 

Question 10. Question : (TCO 3) _____ values are a mode of session state that stores values in the memory space of a standalone Microsoft Windows Service. This service runs outside of the IIS or ASP.NET application server process and memory space.

 

StateServer variable level

 

InProc server

 

Database

 

Global.asax

 

 

 

CIS407a week 4 quiz

 

1. Question : (TCO 4) What does a relational database use to relate tables in the database to each other?

 

Foreign key

 

Trigger key

 

View key

 

Host key

 

 

 

Question 2. Question : (TCO 4) If a row in one table is related to one or more rows in another table, the tables are said to have (a) _____.

 

no relationship

 

many-to-many relationships

 

one-to-one relationship

 

one-to-many relationship

 

 

 

Question 3. Question : (TCO 4) Which of the following SQL statements can be generated automatically by the Configure Data Source wizard?

 

Insert

 

Update

 

Delete

 

All of the above

 

 

 

Question 4. Question : (TCO 4) When should you place the text and controls that define a template for a data list within a table?

 

When the data list contains two or more columns

 

When you need to align the columns in two or more templates

When you need to apply formatting to the template

 

A and B only

 

 

 

Question 5. Question : (TCO 5) Which of the following can you not do from the Fields dialog box for a GridView control?

 

Add a bound control

 

Add a Command button

 

Add a validation control

 

Convert a bound field to a template field

 

 

 

Question 6. Question : (TCO 5) You can use the PagerSettings element of a GridView control to do all but one of the following. Which one is it?

 

Control what buttons appear in the pager area.

 

Control the number of rows that is displayed on a page.

 

Control whether text or images appear on the page buttons.

 

Control where the pager area appears.

 

 

 

Question 7. Question : (TCO 5) Which of the following statements sets the value of an insert parameter named ParentName for a data source named SqlDataSource1 to the value of the Text property of a control named txtParentName?

 

SqlDataSource1=txtParentName.Text;

 

SqlDataSource1.InsertParameters[“ParentName”].DefaultValue = txtParentName.Text;

Sql.InsertParameters[“ParentName”].DefaultValue = txtParentName.Text;

SqlDataSource1.InsertParameters[“ParentName”] = txtParentName.Text;

 

 

Question 8. Question : When you develop an application using a 3-layer architecture, the layer that provides the user interface is called the _____ layer.

 

Presentation

 

Middle/Business

 

Data

 

Solution

 

 

 

Question 9. Question : (TCO 5) Which of the following methods do you use to read the next row from a SqlDataReader object?

 

Next

 

ReadNext

 

Read

 

NextRow

 

 

 

Question 10. Question : (TCO 5) Displaying data in .NET requires what three objects?

 

Connection, query, dataset

 

Connection, query, data field

 

Server, client, application

 

Connection, adapter, dataset

 

 

 

 

 

 

CIS407a week 5 quiz

 

cis407a week 5 quiz

1. Question : (TCO 6) Web applications can implement transactions by using methods that _____.

 

initiate a transaction

 

commit the transaction

 

revert the transaction back to the original state of the database

All of the above

 

 

 

Question 2. Question : (TCO 6) _____ starts the transaction process.

 

Instantiate Transaction

 

Process Transaction

 

Begin Transaction

 

Commit Transaction

 

 

 

Question 3. Question : (TCO 6) Validation is done when when you click a button whose _____ property is set to True.

 

InitialSetting

 

CommitTransaction

 

ProcessValidation

 

CausesValidation

 

 

 

Question 4. Question : What does the following SQL statement add to the Times table?

Insert Into Times (TimesDueDays)

Values (500)

 

A row with a value of 500 for the TimesDueDays column

 

500 rows with a column of TimesDueDays

 

All rows where the TimesDueDays column has a value of 500

 

A TimesDueDays column with a default value of 500

 

 

 

Question 5. Question : (TCO 6) Which of the following templates are you most likely to use with a DetailsView control?

 

Item

 

EditItem

 

InsertItem

 

All of the above

 

 

 

Question 6. Question : (TCO 6) A _____ in a database relates a row from one table to one or more rows from another table.

 

one-to-one relationship

 

one-to-many relationship

 

many-to-many relationship

 

mutually exclusive JOIN

 

 

 

Question 7. Question : TCO 6) What button is removed when you click the Edit button for a row in a GridView control?

 

The Update and Cancel buttons are removed.

 

All data are removed.

 

The Delete button is removed.

 

No button is removed.

 

 

Question 8. Question : (TCO 6) The result set retrieved by the following Select statement contains rows that have _____.

Select Balance, Number

From Accounts

Where Balance < 200

 

all of the columns from all of the rows in the Accounts table

 

two of the columns from all of the rows in the Account table

 

all of the columns from the Accounts table from all of the rows where Balance is less than 200

two of the columns from the Accounts table from all of the rows where Balance is less than 200

 

 

Question 9. Question : (TCO 6) Concurrency occurs when _____.

 

an update or delete operation is refused

 

two or more users retrieve and then try to update data in the same row of a table at the same time

an update or delete operation is resubmitted to the database

a program checks if a row has changed before updating or deleting ite. xml

 

 

 

 

Question 10. Question : (TCO 6) Which of the following templates are you most likely to use with a DetailsView control?

 

Item

 

EditItem

 

InsertItem

 

All of the above

 

 

 

 

 

CIS407a week 6 quiz

cis407a week 6 quiz

 

1. Question : (TCO 7) The definition for an ObjectDataSource control requires all but one of the following attributes. Which one is it?

 

ID

 

TypeName

 

SelectMethod

 

UpdateMethod

 

 

 

Question 2. Question : (TCO 8) The process of validating the identity of a user is called _____.

 

authorization

 

authentication

 

controls

 

responses

 

 

 

Question 3. Question : (TCO 7) Which of the following is not a benefit of user controls?

 

Decreased development time

 

Reduced maintenance time

 

Consistency throughout application

 

Increased test time

 

 

 

 

Question 4. Question : (TCO 7) The ASP.NET Ajax client-side framework is loaded on the _____ for an ASP.NET Web application.

 

browser

 

panel

 

trigger

 

JavaScript

 

 

 

Question 5. Question : (TCO 8) A login page should always be named _____.

 

Login.docx

 

Security.aspx

 

Login.aspx

 

Form.aspx

 

 

 

Question 6. Question : (TCO 8) To determine whether you’re transmitting data over a secure connection, you can _____.

 

check the appSettings section of the web.config file

 

refer to the URL in the browser’s address bar

 

check for a Lock icon in the browser’s title bar

 

watch for the security alert that’s displayed whenever you’re about to establish a secure connection

 

 

 

Question 7. Question : (TCO 7) By default, the controls in a/an _____ are updated whenever the page is posted back to the server.

 

ScriptManager control

 

Page_Load method

 

UpdatePanel control

 

ScriptManagerProxy control

 

 

 

Question 8. Question : (TCO 7) Which of the following SQL statements will search for a given last name in the tblEmployees table based on a search variable name’s strSearch?

 

“select * from tblEmployees = ‘” + strSearch”’”

 

“select * from tblEmployees where FirstName = ‘” + strSearch”’”

“select * from tblEmployees where LastName = ‘” + strSearch+”’”

“select * from tblEmployees where LastName = + strSearch

 

 

 

Question 9. Question : (TCO 7) The _____ part of ASP.NET Web pages can contain a combination of Web controls.

 

HTML

 

Code Behind

 

Source

 

Design

 

 

 

Question 10. Question : (TCO 7) For which of the following purposes is a digital secure certificate not used?

 

To establish the identity of the client

 

To establish the identity of the server

 

To determine if a security alert is displayed before a secure connection is established

To provide information needed to encrypt data

 

 

 

 

 

CIS407a week 7 quiz

cis407a week 7 quiz

1. Question : (TCO 9) A SQL data source is a control that can be used to get data from a SQL _____ file such as a Microsoft SQL Server file.

 

cookie

 

database

 

row

 

session

 

 

 

Question 2. Question : (TCO 9) A(n) _____ is a point in code that developers can set where the system will stop to allow time for examining code and using other debug options.

 

Set Point

 

Break Point

 

Debug Point

 

Debug Mode

 

 

 

Question 3. Question : (TCO 9) To test a website in two or more browsers using IIS Express, you need to run the website in your default browser from Visual Studio and then _____.

 

start the other browsers and copy the URL from the default browser to the other browsers

find the website in the Windows Explorer and double-click on the aspx file for the starting page

start the other browsers and enter the location of the aspx file for the starting page

find the website in the Windows Explorer and double-click on the aspx.cs file for the starting page

 

 

 

Question 4. Question : (TCO 9) To send an e-mail message, you use the Send method of the _____ class.

 

Pop

 

SmtpClient

 

LoginClient

 

MyClient

 

 

Question 5. Question : (TCO 9) SMTP sends e-mails in _____ format.

 

either text or binary

 

text

 

binary

 

hexadecimal

 

 

 

Question 6. Question : (TCO 9) In the code-behind file for a Web page, you can catch exceptions that occur at the _____.

 

procedure level only

 

page level only

 

procedure and page levels

 

procedure, page, and application levels

 

 

 

Question 7. Question : (TCO 9) The _____ file controls the configuration of the ASP.Net Web application.

 

Solution

 

Project

 

Web.config

 

Error handler.err

 

 

 

Question 8. Question : (TCO 9) Which statement best describes the operation of the following code?

if (!IsPostBack)

ddlProducts.DataBind();

 

If the page is being requested for the first time, bind a drop-down list to a data source.

If the page isn’t being requested for the first time, bind a drop-down list to a data source.

If the page is being requested for the first time, bind a data source to a drop-down list.

If the page isn’t being requested for the first time, bind a data source to a drop-down list.

 

 

Question 9. Question : (TCO 9) Which of the following is a benefit of statements that use the Redirect method of the HttpResponse class to send the user a new Web page named Inventory.aspx?

 

Response.Session(“Inventory.aspx”);

 

Response.Redirect(“Inventory.aspx”);

 

Response (“Inventory.aspx”);

 

(“Inventory.aspx”);

 

 

 

Question 10. Question : (TCO 9) A generic IP for the SMTPServer setting in e-mail is _____.

 

127.0.0.1

 

1.1.1.1

 

100.0.0.0

 

“local”

 

CIS407a all week course project

<pstyle=”color: rgb(136,=”” 136,=”” 136);=”” font-family:=”” verdana,=”” arial,=”” sans-serif;=”” font-size:=”” 11px;=”” background-color:=”” rgb(253,=”” 253,=”” 253);”=””>Web Application Development With Lab

 

 

Project Description

The Course Project is simply the cumulative result of completing Labs 1 through 7. In Lab 1, you will create a basic PayrollSystem Web application that represents a payroll processing website for a company. Each subsequent lab will add more features to this application. By the time that you complete Lab 7, you will have a finished Web application with a good deal of functionality. You will be able to log in to your application, enter personnel records to be stored in a database, retrieve and display previously entered records, perform transactions, monitor user activity, and send e-mail notifications of errors.

After you complete Lab 7, but before submitting the project, you should thoroughly test all Web pages and the functionality added to the PayrollSystem website over all of the labs. Also, review the feedback that you have received from your instructor on the previous labs and correct any deficiencies noted. After all problems have been fixed and everything from Labs 1–7 works correctly, simply zip up the entire PayrollSystem website after completing Lab 7 and submit it as your Course Project.

The following sections summarize the features that you will add to the website each week. All of these features should be present and working in the Course Project in order for you to receive full credit.

See the Syllabus section “Due Dates for Assignments & Exams” for due date information.

Guidelines

Week 1: Annual Salary Calculator ASP.NET Web Application

· In this lab, you will create a simple ASP.NET Web application using Microsoft Visual Studio 2012 that displays the text “Hello, World” on the home page. You will also add a page and build an Annual Salary Calculator on that page. This will be used as the foundation for all subsequent labs.

Week 2: User Input Web Pages

· In this lab, you will create an ASP.NET Web application main form containing a list of hyperlinks and images. You will also add a form with five text boxes and a Submit button. You will use the form to send information to a second form (which you will also create), where data from the first form will be displayed so it can be verified by the user.

Week 3: User Activity Monitoring

· In this lab, you will save user activity data in a database. A record of each user’s IP address and the current date and time will be created whenever a user visits the Personnel form. You will be able to view a list of all previous user activity records. You will add validation to the form added in Week 2 to validate the user input.

Week 4: Web Forms With Database Interaction

· In this lab, you will start with the form created in Week 2 and add functionality to INSERT records into a database table and SELECT records for display to the user. You will also add a search feature to search for records to display.

Week 5: Transaction Processing

· In this lab, you will add transaction processing to the database INSERT functionality from the previous week to make it operate more reliably. Changes to the database will be committed (made permanent) only if all operations in a transaction are completed successfully. If any operation in a transaction fails, the entire transaction will be rolled back (undone) so that the database is left in its original state. This prevents the storing of incomplete or inconsistent information in the database when an error occurs. You will add client-side validation controls. You will also add an editable list of database records that will allow the user to view, update, and delete employee records.

Week 6: Login and Security Levels

· In this lab, you will create a login form, use the login control, validate a user based on the login name and password, and allow access to the system if it’s authorized or prevent the user from accessing the system if unauthorized. You will add the ability to add new users, modify existing users, delete users, and view all users.

Week 7: Error Notification via E-mail

· In this lab, you will incorporate error handling into the log-in process so that a notice of each invalid login attempt is automatically e-mailed to the technical support staff. You will add additional security features to make the Web application more secure. You will also add security logic to specific forms in the Web application.

 

ilabs

 

ilab 1

<pstyle=”color: rgb(136,=”” 136,=”” 136);=”” font-family:=”” verdana,=”” arial,=”” sans-serif;=”” font-size:=”” 11px;=”” background-color:=”” rgb(253,=”” 253,=”” 253);”=””>Deliverables

 

All files are located in the subdirectory of the website. The website should function as follows: You should have a page that, when run, displays a page showing the text “Greetings and Salutations. I will master ASP.NET in this course.” You should also have a second page that is the annual salary calculator that properly calculates the annual salary, given an hourly rate and the number of hours projected to be worked in a year. Once you have verified that both pages work, save your website, zip up all files, and submit in the Dropbox.

 

Please watch the tutorial before beginning the iLab.

 

 

Table of Contents

Tutorial Part 1

Tutorial Part 2

Tutorial Part 3

Tutorial Part 4

Play00:00MuteFullscreen

 

Transcript

iLab Steps

NOTE

Submit your assignment to the Dropbox, located at the top of this page. For instructions on how to use the Dropbox, read these step-by-step instructions.

 

(See the Syllabus section “Due Dates for Assignments & Exams” for due dates.)

 

In this iLab, you will create an Annual Salary Calculator ASP.NET Web application using Visual Studio.NET.

 

For the iLabs, you will use the Microsoft Visual Studio software application. You have two options for using this application:

 

You may use a copy of Visual Studio that is installed on your local PC. If you do not already have this software, there is a link in the Syllabus (in the Textbook and Required Materials section) that you can follow to obtain a copy at low or no cost through the Student Software Fulfillment Center.

or

You may run Visual Studio over the Web from the iLab (Citrix) server. Instructions for using the iLab (Citrix) server are on the iLab page under Course Home.

Throughout this course, you will be creating a Web application for a fictitious company called ACIT (Academy of Computing and Information Technology). To get familiar with the development environment, follow the Lab Steps to create a simple Annual Salary Calculator ASP.NET Web application. You will be adding to this application each week.

 

Overview of Fictitious Company

 

Image of Academy of Computing and Innovation Technology

 

The Academy of Computing and Information Technology is a mid-size indie (independent) film studio that is in need of a payroll system. We have outgrown our current system, a simple spreadsheet, to the extent that it takes three people over one week to pay everyone on a timely basis.

 

Overview of Our Company

 

We have over 2,000 full-time and part-time employees. We produce comedy, fiction, and science fiction films with budgets of $250K–$20 million. We have produced over 50 films since we first began 20 years ago.

 

We are very profitable and have strong links to many of the industry’s most powerful people.

 

Current Payroll System

 

Our current system consists of mostly manual processing using an MS Excel spreadsheet to control who gets paid.

 

The system consists of the three payroll staff members reviewing each of the full-time staff members’ wages, calculating how many hours they worked based on their hourly rate, and paying them by issuing a check.

 

The check needs to be entered in another worksheet for each of the people who were paid so that we can tell when it went out, how much it was for, and if it was cashed or not. If a [Date_Cashed] is entered, we deduct that amount from our working payroll capital account to track how much money we have for payroll.

 

This process is then repeated for all part-time staff and independent contractors.

 

Our Needs

 

We need a more automated way to pay our staff. We need to use the same logical flow as a basis, yet improve on it by having a way to

 

easily calculate the projected annual salary based on rate and number of hours;

search, enter, update, and delete staff and independent employee information in one place;

search, enter, update, and delete payroll automation information for the employee to set up recurring payments or one-time payments;

produce reports to show the following: (a) summary of who got paid per week, (b) summary of all payments per week, (c) details of any employee to-date (allow entry of a specific employee ID);

allow transactions to be rolled back in case we pay someone too much;

make use of transaction processing in case the system unexpectedly shuts down;

ensure the system is secure (logins required);

allow only authorized payroll personnel to control all aspects of the system;

allow only authorized payroll personnel to view transactions and user activity;

allow only authorized payroll personnel to e-mail reports to users using the e-mail on file; and

incorporate error handling into all processes in the system and e-mail any errors to the technical support people.

Required Software

Microsoft Visual Studio.Net

 

Access the software at https://lab.devry.edu.

Steps: 1, 2, and 3

STEPs 1–3: Create Website and Home Page

Please watch this video for a similar example to the one we are doing. It introduces event handlers, getting data from textboxes, performing basic calculations, and formatting the output to be displayed:

 

In this iLab, we will learn how to create a simple ASP.NET Web application using Microsoft Visual Studio.NET. The application will display the text “Hello, World” on the home page.

 

1. Open Microsoft Visual Studio.

 

Image of main screen

 

2. Create a new ASP.NET website called “PayrollSystem.”

 

To do this, select File -> New -> Web Site

 

Image of navigation to new website option

 

You will get the following screen which shows Visual Basic.

 

Image of Visual Basic screen new web site menu

 

Select Visual C# template on the left of your screen if it is not already selected. Notice that your screen will now show Visual C# instead of Visual Basic.

 

image of new website screen with Visual C# selected

 

Click Browse at the bottom of the screen to change Web Location, if necessary to get the screen below.

 

image of new web location

 

Notice that my Web Location is now different.

 

Select ASP.NET Empty project and click OK to get the screen below.

 

image of empty project screen

 

Right-click on the project name from Solution Explorer, then select Add->Add New Item to get the following screen.

 

Image of Add New Item navigation screen

 

Image of new item screen

 

Select Web Form, accept Default.aspx file, and click Add to get:

 

Image of default code screen

 

Click Design at the bottom left-hand of the window to show the following:

 

Image of Design View screen

 

Edit the Default.aspx file (the home page for your site) to add the message “Greetings and Salutations. I will master ASP.NET in this course.”

 

To do this, if necessary, click the Design button below the editing window to switch to Design view, then click in the editing window and type ” Greetings and Salutations. I will master ASP.NET in this course.” (without the quotes) to get the following screen.

 

Image of Design View screeen with test

 

Click the Save button on the toolbar to save the changes to Default.aspx.

 

STEPs 4–5: Start Debugging; NOTE: Citrix users have different steps!

3. To ensure that everything is working properly, click the Start Debugging button on the toolbar, or press the F5 key on the keyboard, or pull down the Debug menu and select Start Debugging.

 

Image of debugging screen

 

Save and run by Right-Click-> Run from Browser.

 

Image of menu option for debugging

 

Press Yes.

 

Image of message to save file

 

Click the Start Debugging button on the toolbar, or press the F5 key on the keyboard, or pull down the Debug menu and select “Start Debugging.”

 

Image of blank debugging screen

 

Image of start debugging option selected

 

Image of debugging not enabled message

 

Notice that this time the project build and website validation started.

 

If the Debugging Not Enabled dialog box appears, select the option to add or modify the Web.config file to enable debugging and click OK. You should only have to do this the first time you debug the site.

 

You will get a clean run just as you did previously. Your output screen looks like the screen below.

 

Image of output screen

 

NOTE: To execute the application, you have these options:

 

If you are using Citrix, press CTRL + F5 to Start Without Debugging. You will not be deducted points for this part.

If you are using a standalone version, press F5 to Start with Debugging, or you can press CTRL + F5 to Start Without Debugging.

Create the Salary Calculator Form

 

1. Right click on the Project name. Choose Add, then Select Web Form to get the screen below.

 

Image of Add Web Form menu

 

And you get the Add New Item screen, shown below.

 

Image of result Add new item screen

 

2. Select the name of the form you will add frmSalaryCalculator.aspx. Make sure “Place code in separate file” is checked and “Select master page” is unchecked.

 

You will create a Web-based salary calculator on this new page.

 

Click the Design view.

 

Add the Tools Window using View-> Toolbox.

 

Image of Toolbox option selected

 

Image of toolbox menu

 

3. You can choose to adjust the ToolBox to tab with Solution Explorer to look like the following screen.

 

Image of blank screen when toolbox to tab is adjusted

 

You will create a Web-based salary calculator on this new page.

 

To do this, open the aspx page in Design view and, from the Toolbox, drag a label into the form, click after the label and add about 5 spaces, then drag a textbox control after the label.

 

Press Enter after the textbox to put the cursor on the next line.

 

Add another label and textbox below the first set and press Enter.

 

Then add a button control. Finally, on the last line, add another label. Your form should look like the screen displayed below.

 

Image of calculator screen with labels and button

 

4. If necessary, add the Property Window as shown in the screen below, using View->Properties Window.

 

Image of Property Window

 

5. Now we will modify the page to add proper labels and give the textboxes names.

 

Change the text displayed in each label so that the first label displays Annual Hours; the second label should display Rate; and the third label should display $.

To change the text displayed, click on the label control. This causes the property window to show all properties of the label, then change the Text property of the control in the Properties window.

Set the ID property of the top textbox to txtAnnualHours.

Set the ID property of the second textbox to txtPayRate. Set the ID of the bottom label (the one we set the text property to “$”) to lblAnnualSalary. (Note: We set these IDs as we will be accessing the control values from the C# code. You can set the button ID and the other two labels’ ID properties as well, but we won’t be accessing them from our code.)

Change the button text to display Calculate Salary. (Hint: To change the text displayed as the button label, change the Text property of the button.) The ID of the button should be btnCalculateSalary.Your form should now look like the screen displayed below.

Image of calculator screen with blank values

 

This code will be called each time the user presses the button. It is important to remember that code in the code behind page executes on the server, not on the user’s browser. This means that when the button is pressed, the page is submitted back to the Web server and is processed by the ASP.Net application server on the Web server. It is this code (between the { and } in this method) that will execute on the server. Once it is done executing, the page will be sent back to the browser. Any changes we make to the page or controls on the page will be shown to the user in the updated page.

 

In this method, add code that will get the text in the txtAnnualHours text box, convert it to a Double, and store it in a double variable.

Add code that will get the text from the txtPayRate text box, convert it to a Double, and store it in another variable.

Create a third variable of type Double and set its value to the annual hours variable value multiplied by the rate double variable value.

Take this resulting value and convert it to a string (text), and update the lblAnnualSalary Text property with this new string.

Let’s look at a similar example. After reviewing this example, write the code needed to calculate the annual salary.

 

CostOfRoom Calculator is the alternate example, which demonstrates the skills you need to complete this assignment. See video at the top of this lab document and screenshots below.

What follows is an example of code-behind the Calculate button for the CostOfRoom Calculator:

 

Code-behind the calculate button

A control’s property can be accessed by simply using the control ID followed by a . followed by the name of the property. For example, the value stored in the Text property of the txtAnnualHours control can be accessed by using this: txtAnnualHours.Text. Text properties on controls are of type string.

 

The output of the CostOfRoom calculator is shown in the screen below with Length, Width, Cost Per Square Unit labels and input boxes, and the Calculations button.

 

Image of output CostOfRoom Calculator with length, width, cost per square unit values and calculations.

 

Use small values for length and width.

Use large values for length and width and see the formatting of the output.

 

Image of CostOfRoom calculator with revised values for length, width, cost per square unit and calculations.

 

To convert a string to a Double you can use the Convert class. If we had a string variable called str1 and a double variable called myNumber, the C# code to convert this would be as follows:

 

 

When converting from one type to another, we are assuming that the value stored in the type being converted is compatible with the type with which we are converting. In the example above, if the value stored in str1 was not a type compatible with a Double (for example, tiger), an error would be raised.

 

All of the base types in C# (double, int etc) have a ToString() method that you can call. If you had a double variable that you wanted to convert to a string and set that string to my label’s text, you would do the following:

 

This would take whatever value was stored in the myNumber Double and convert it to a string.

 

Set your new form as the start page by clicking once on the form name in the Solution Explorer and then right-clicking on the form name and selecting Set as Start Page. You can now test your application and make sure it works correctly as you did with the Hello World form above. You can switch back and forth between which form runs when you run your application by setting the different forms as the start page. The final result should look something like the screen below with the Annual Hours, Pay Rate, Calculate Salary button, and result.

 

Image of result screen Annual Hours, Pay Rate, Calculate Salary button, and result.

 

Once you have verified that your project works, save your project, zip all files, and submit in the Dropbox.

 

NOTE: Please download and review the Doc Sharing files Web Lab and Citrix.zip, which contain information on how to FTP to the University website and how to use Citrix for the assignments.

 

<pstyle=”color: rgb(136,=”” 136,=”” 136);=”” font-family:=”” verdana,=”” arial,=”” sans-serif;=”” font-size:=”” 11px;=”” background-color:=”” rgb(253,=”” 253,=”” 253);”=””>iLab 2 of 7: User Input Pages

 

In this lab, we will demonstrate how to create an ASP.NET Web application having a single form with five text boxes and a Submit button. We will use the form to send information to a second form where data from the first form will be displayed. We will also add a main navigation page with two different ways of linking to other pages.

 

Please watch the tutorial before beginning the iLab.

 

 

Table of Contents

Tutorial: Part 1

Tutorial: Part 2

Tutorial: Part 3

Tutorial: Part 4

Tutorial: Part 5

Tutorial: Part 6

Tutorial: Part 7

Tutorial: Part 8

Play00:00MuteFullscreen

 

Transcript

Deliverables

NOTE

Submit your assignment to the Dropbox, located at the top of this page. For instructions on how to use the Dropbox, read these step-by-step instructions.

 

(See the Syllabus section “Due Dates for Assignments & Exams” for due dates.)

 

All files are located in the subdirectory of the website. The website should function as follows: When you run the website, you will be presented with a page (frmMain) that allows you to go to the different parts of the website that you are developing. You will be able to go to the Annual Salary Calculator that we added last week and to the data entry form for personnel this week. When you go to the personnel data entry page, you should be able to enter data in the frmPersonnel form and have it displayed in the frmPersonnelVerified form. Your salary calculator will also be available from the main page and will calculate properly when you enter data. Each page should link back to the main page via the ACIT logo hyperlink. Once you have verified that it works, save your website, zip up all files, and submit in the Dropbox. Each page (except frmMain) will include the ACIT logo that is hyperlinked back to frmMain.

 

Required Software

Microsoft Visual Studio.Net

 

Access the software at https://lab.devry.edu.

Steps: 1, 2, and 3

Lab Steps

STEP 1: Create Web Forms

Open the payroll system website from Lab 1.

 

 

2. Create a new form called frmPersonnel. To do this, pull down the website menu, select Add New Item, then type frmPersonnel.aspx for the name.

 

 

And you will get the following screen:

 

 

Change Default.aspx to frmPersonnel.aspx.

 

 

And get the following Screen:

 

 

3. Go to the Design mode of the form by clicking the Design tab (as opposed to the Source tab).

 

4. From the ToolBox, drag and drop an Image control.

 

5. Next, right click on the Project folder name in the Solution folder. Click Add-> New Folder and name the folder Images.

 

 

6. Right click on the Images folder and choose Add->Existing item. We will add our logo to our Images folder. Be sure to choose All Files from the Files of Type and navigate to where you saved the image. The logo image is located in Doc Sharing in our course for you to download to your own machine or upload to Citrix.

 

7. After you have loaded the logo to the project, select the image control on your page.

 

8. On the Properties window, choose the ImageURL property and the ellipse to the right of this property to open a Browse dialog box and add the ACITLogo to the page.

 

 

9. The Logo should appear on your page as shown.

 

 

 

10. From the ToolBox, drag-and-drop a Panel control underneath the logo image.

 

11. Click the A/Z button in the Properties dialog so that all of the properties are sorted alphabetically.

 

 

12. Change the height property of the Panel to 250px and the width to 300px. To do this, select the Panel, then go to the Properties pane (usually in the lower right corner of the Visual Studio.NET Design view; if you don’t see it, click the View Properties window OR press the F4 key). Scroll down the list, then type the value in for each property.

 

13. Change the panel’s HorizontalAlign property to left.

 

 

14. Save your work!

 

15. From the ToolBox, drag-and-drop five Labels and five TextBoxes onto the Panel. To make each Label/TextBox pair appear on a separate line, put the cursor after each TextBox, then press the [ENTER] key (much like you would a with a word processing program).

 

 

Rename the Label’s properties as defined below. You can do this by selecting each Label, scrolling to the property, and then typing in the value.

 

Property Value

Label1 – Text First Name:

Label2 – Text Last Name:

Label3 – Text Pay Rate:

Label4 – Text Start Date:

Label5 – Text End Date:

Rename each TextBox’s property as defined below. You can do this by selecting each TextBox, scrolling to the property, and then typing in the value.

 

Property Value

TextBox1 – (ID) txtFirstName

TextBox2 – (ID) txtLastName

TextBox3 – (ID) txtPayRate

TextBox4 – (ID) txtStartDate

TextBox5 – (ID) txtEndDate

Change each button’s ID and Text properties as defined below. You can do this by selecting each button, scrolling to the property, and then typing in the value.

 

Property Value

Button1 – (ID) btnSubmit

Button1 – Text Submit

Button2 – (ID) btnCancel

Button2 – Text Cancel

Save your work!

 

16. If you would like, you can make the labels the same size by selecting the first label, pressing and holding Control, and selecting the rest of the labels. Then, choose Format-> Make Same Size ->Width as shown below:

 

 

17. When we click the Submit button, we want the contents of the form to be passed to another form. In the Solution Explorer, right click on the project name and choose Add-> Add New Item. Choose Web Form and name the form frmPersonnelVerified.aspx.

 

18. On this form, we will add an image and panel like the previous form. Within the panel, add a label and a textbox. The width of the panel should be 650 and the height 250. The label should say Information to Submit. The textbox ID should be txtVerifiedInfo. Also, change the TextMode Property of the textbox to MultiLine, the height to 80, and the width to 400.

 

Click the Design tab for the frmPersonalVerified.aspx, and add a Label and a TextBox. Set the properties as follows:

 

Property Value

Label – Text Information to submit

Textbox – (ID) txtVerifiedInfo

Textbox – Height 80px

Textbox – Width 400px

Textbox – TextMode Multiline

 

19. Next, we will write the code that will load the information from the frmPersonnel page to the frmPersonnelVerified page. Be sure that your cursor is not selecting the panel. Double click on the blank part of the page to open the page_load event handler and add the following code.

 

 

20. Return to the frmPersonnel Web page, click the btnSubmit button, go to the PostBackUrL property and set it to frmPersonalVerified.aspx by clicking the ellipse to the right of the property to open a Browse dialog, and click frmPersonalVerified.aspx there. This will insert the correct path to the PostBackUrl Property.

 

 

21. Test your Web page. On the frmPersonnel.aspx page, right click and choose View in Browser. Test the application with test data and press Submit. You should see your test data appear in the frmPersonnelVerified page.

 

 

STEP 2: Adding Navigation

22. Add a new Web form called frmMain.aspx

 

Add the ACIT Logo to the top of the form and a panel below the image with height = 350 and width = 500.

Add an ImageButton control, then, space over, and next, add a LinkButton.

23. For the Image button, you will need to download an image from the Internet or create an image yourself. Right click on the Images folder and choose Add->Existing item and browse to add the image that you want to use as part of your project.

 

24. Click on the ImageButton and the ImageUrl property. Then, select the image that you added to the project. Modify the text of the LinkButton to Annual Salary Calculator.

 

25. Set the PostBackURL property for the image and the link to the frmSalaryCalculator.aspx from last week.

 

26. Right click on the frmMain.aspx and choose Set As Start Page.

 

27. Test your Web page. Press F5, or click the Start Debugging (Citrix users, press Start Without Debugging) button on the toolbar, or pull down the Debug menu and select Start Debugging. Test your link. Does it take you to the Annual Salary Calculator page?

 

NOTE: To execute the application, you have these options:

 

If you are using Citrix, press CTRL + F5 to Start Without Debugging. You will not be deducted points for this part

If you are using a standalone version, press F5 to Start with Debugging, or you can press CTRL + F5 to Start Without Debugging.

 

On your own:

 

Repeat this process to create an image and link for the frmPersonnel.aspx page. Remember to set the PostbackURL properties.

On the frmPersonnel page, make the ACIT logo be a link that will take the user to the frmMain page. Use an ASP.Net Hyperlink control to do this task.

Update the frmPersonnel, frmPersonnelVerified, and frmSalaryCalculator to include the ACIT logo at the top of each page with the logo set as a hyperlink that will return to the frmMain page.

On the frmPersonnel page, make it so that if the user presses the Cancel button, then that user is taken back to the frmMain.

STEP 3: Verify and Submit

28. Save your work and run the project. You should be able to go to both areas of your site and enter the information in the pages. Your calculator should properly calculate without errors, and then on the frmPersonel Web page, you can click the Submit button and have it display in the frmPersonalVerified Web page. Once you have verified that it works, save your project, zip up all files, and submit in the Dropbox.

 

NOTE: Make sure that you include comments in the C# code where specified (where the “//Your comments here” is mentioned), or else a 5-point deduction per item (form, class, function) will be made. This includes code that you will be creating in the coming weeks. To comment on the code, you basically put two forward slashes to start the comment; anything after the slashes on that line is disregarded by the compiler. Then, type a brief statement on what is happening in the line under it. Comments show professionalism and are a must in systems. As a professional developer, comments will set you apart from others and make your life much easier if maintenance and debugging are needed.

 

ilab 3

<pstyle=”color: rgb(136,=”” 136,=”” 136);=”” font-family:=”” verdana,=”” arial,=”” sans-serif;=”” font-size:=”” 11px;=”” background-color:=”” rgb(253,=”” 253,=”” 253);”=””>iLab 3 of 7: User Activity Monitoring (30 points)

 

In this lab, we will demonstrate how to save user activity data in a database. We will be creating a new form to display the user activity data, a new dataset to contain the data, a data access class to structure the code, and a function within the data access class to save users’ activity data when users visit the Personnel form page (frmPersonnel.aspx). We will also be adding server side validation to the frmPersonnel form you added in the previous lab and update the main menu for the new functionality.

 

Please watch the tutorial before beginning the iLab.

 

Table of Contents

Tutorial: Part 1

Tutorial: Part 2

Tutorial: Part 3

Tutorial: Part 4

Play00:00MuteFullscreen

 

Transcript

Deliverables

NOTE

Submit your assignment to the Dropbox, located at the top of this page. For instructions on how to use the Dropbox, read these step-by-step instructions.

 

(See the Syllabus section “Due Dates for Assignments & Exams” for due dates.)

 

All files are located in the subdirectory of the project. The project should function as specified: When you visit the Personnel form page (frmPersonnel.aspx), a record should be saved in the tblUserActivity table with the IP address, form name accessed (frmPersonnel), and the date accessed. When you click the View Activity button, you should see at least one record with this information. When the user goes to the frmPersonnel web form and enters data, the following business rules are to be enforced.

 

Fields may not be empty or filled with spaces. If any field is empty, turn that field background color to yellow and add to/create an error message to be shown in the error label.

The end date must be greater than the start date. If the end date is less than the start date turn both date fields yellow and add to/create an error message to be shown in the error label.

If all fields validate properly, then the session state items should be set properly and the user should see the frmPersonnelVerified form with all the values displayed. You will also add a new item to frmMain that will take the user to the new frmUserActivity form you added. Add the proper link and a hyperlinked image to allow the user to select this new option. Once you have verified that everything works, save your website, zip up all files, and submit it to the Dropbox.

 

Required Software

Microsoft Visual Studio.Net

 

Access the software at https://lab.devry.edu.

Steps: 1, 2, and 3

Lab Steps

STEP 1: Step Title

1. Open Microsoft Visual Studio.NET.

 

2. Open the PayrollSystem website by clicking on it in the Recent Projects list, or by pulling down the File menu, selecting Open Website, navigating to the folder where you previously saved the PayrollSystem, and clicking Open.

 

3. Download the PayrollSystem_DB.accdb file from Doc Sharing and save it on your local computer. (Note: your operating system may lock or block the file. Once you have copied it locally, right click on the file and select Properties and then Unblock if available). Then add it to the PayrollSystem website as follows: In Visual Studio, in the Solution Explorer click Website, Add Existing Item, then navigate to the PayrollSystem_DB.accdb file you downloaded, and click the Add button.

 

Make sure you select file types, which include *.accdb, *.accdb, etc. Otherwise, you will not be able to see the database file to select.

 

 

4. Now we need to create a new connection to the PayrollSystem_DB.accdb. To begin, click View Server Explorer.

 

5. When the Server Explorer toolbox appears, click the Connect to Database button.

 

 

6. When the Add Connection dialog appears, click the Change button. In the Change Data Source dialog, select MS Access Database File; Uncheck Always use this Selection; then click OK.

 

 

Press Continue to get the following screen.

 

 

7. Click the Browse button to navigate to the PayrollSystem_DB.accdb file in your website folder, then click Open. (NOTE: Be sure you select the PayrollSystem_DB.accdb file in your PayrollSystem website folder, not the one you originally downloaded from Doc Sharing!) Click Test Connection. You should receive a message that the test connection succeeded. Click OK to acknowledge the message, then click OK again to close the Add Connection dialog.

 

 

8. The PayrollSystemDB.accdb should be added to the Server Explorer. Expand the database, then expand the Tables entry under the database until you see tblUserActivity. Leave the Server Explorer window open for now as you will be returning to it in a moment.

 

9. Create a new dataset by selecting Website-> Add New Item. Under Templates, select the Dataset item. Enter dsUserActivity.xsd for the name. Click Add.

 

 

10. If the following message appears, select Yes. You want to make this dataset available to your entire website.

 

 

11. If the TableAdapter Configuration Wizard dialog appears, click Cancel. (We will be configuring a Data Adapter for this dataset later in C# code, so we do not need to run this wizard.)

 

 

12. Drag-and-drop the tblUserActivity table from the Server Explorer window into the dsUserActivity dataset in the editor window.

 

NOTE: If you see a message that says your connection uses a local data file that is not in the current project, that indicates you did not select the correct PayrollSystem_DB.accdb file when you created your data connection. To fix this problem, click No, then right-click on PayrollSystemDB.accdb in the Server Explorer window and choose Modify Connection. Click the Browse button, navigate to the PayrollSystemDB.accdb file that is in your PayrollSystem website folder, and click Open. Test the connection, then click OK.

 

 

Click the Save icon on the toolbar to save the dsUserActivity.xsd dataset.

 

(You can now close the Server Explorer window if you wish.)

 

13. Create a new class to contain the C# code that will access this dataset. To do so, click Website, Add New Item. In the Add New Item dialog, select the Class template, and enter clsDataLayer for the name. Make sure the Language is set to Visual C#. Click Add.

 

 

14. If the following message appears, select Yes. You want to make this class available to everything in your solution.

 

 

15. Add the following to the top of your class, below any other using statements created for you by Visual Studio.

 

Add to top of class

// Add your comments here

using System.Data.OleDb;

using System.Net;

using System.Data;

16. Add the following three functions inside the squiggly braces for the public class clsDataLayer class, above the beginning of the public clsDataLayer() constructor and save the class.

 

Class

// This function gets the user activity from the tblUserActivity

public static dsUserActivity GetUserActivity(string Database)

{

// Add your comments here

dsUserActivity DS;

OleDbConnection sqlConn;

OleDbDataAdapter sqlDA;

// Add your comments here

sqlConn = new OleDbConnection(“PROVIDER=Microsoft.ACE.OLEDB.12.0;” + “Data Source=” + Database);

// Add your comments here

sqlDA = new OleDbDataAdapter(“select * from tblUserActivity”, sqlConn);

// Add your comments here

DS = new dsUserActivity();

// Add your comments here

sqlDA.Fill(DS.tblUserActivity);

// Add your comments here

return

</pstyle=”color:></pstyle=”color:></pstyle=”color:></pstyle=”color:></pstyle=”box-sizing:>

Writerbay.net

Looking for top-notch essay writing services? We've got you covered! Connect with our writing experts today. Placing your order is easy, taking less than 5 minutes. Click below to get started.


Order a Similar Paper Order a Different Paper