Devry CIS407 ilabs (all ilabs week 1-7)Devry CIS407 ilabs (all ilabs week 1-7)iLab 1 of seven: âAnnual Wage Calculatorâ ASP.NET Internet Utility
i L A B O V E R V I E W
Situation/Abstract
On this iLab, you’ll create an Annual Wage Calculator ASP.NET internet software utilizing Visible Studio.NET 2008.
For the iLabs, you’ll use the Microsoft Visible Studio 2008 software program
software. You could have two choices for utilizing this software:
⢠Chances are you’ll use a replica of Visible Studio 2008 that’s put in in your native PC. or
⢠Chances are you’ll run Visible Studio 2008 over the Internet
⢠All through this course, you can be creating an online software for a
fictitious firm known as CoolBiz Productions, Inc. To get aware of
the event surroundings, comply with the Lab Steps to create a easy
Annual Wage Calculator ASP.NET internet software. You can be including to
this software every week.
Directions for Week 1 iLab: âHowdy World, and moreâ ASP.NET Internet Utility
Click on on the hyperlink above to view the tutorial.
Please watch this tutorial earlier than starting the iLab.
The tutorial has audio.
Overview of Fictitious Firm
CoolBiz Productions, Inc.
We’re a mid-size indie (impartial) movie studio that’s in want of a
payroll system. We have now outgrown our present system, a easy
spreadsheet, to the extent that it takes three individuals over one week to
pay everybody on a well timed foundation.
Overview of Our Firm
We have now over 2,000 full-time and part-time workers. We produce comedy,
fiction, and science fiction movies with budgets of $250Kâ$20 million.
We have now produced over 50 movies since we first started 20 years in the past.
We’re very worthwhile and have robust hyperlinks to most of the industryâs strongest individuals.
Present Payroll System
Our present system consists of largely handbook processing utilizing an MS Excel spreadsheet to regulate who will get paid.
The system consists of the three payroll workers members reviewing every of
the full-time workers membersâ wages, calculating what number of hours they
labored primarily based on their hourly charge, and paying them by issuing a test.
The test must be entered in one other worksheet for every of the
individuals who had been paid in order that we are able to inform when it went out, how a lot it
was for, and if it was cashed or not. If a [Date_Cashed] is entered, we
deduct that quantity from our working payroll capital account to trace how
a lot cash now we have for payroll.
This course of is then repeated for all part-time workers and impartial contractors.
Our Wants
We’d like a extra automated solution to pay our workers. We have to use the identical
logical stream as a foundation, but enhance on it by having a solution to
1. simply calculate the projected annual wage primarily based on charge and variety of hours;
2. search, enter, replace, and delete workers and impartial worker info in a single place;
three. search, enter, replace, and delete payroll automation info for
the worker to arrange recurring funds or one-time funds;
four. produce reviews to indicate the next: (a) abstract of who acquired paid
per week, (b) abstract of all funds per week, (c) particulars of any
worker to-date (enable entry of a selected worker ID);
5. enable transactions to be rolled again in case we pay somebody an excessive amount of;
6. make use of transaction processing in case the system unexpectedly shuts down;
7. make sure the system is safe (logins required);
eight. enable solely licensed payroll personnel to regulate all features of the system;
9. enable solely licensed payroll personnel to view transactions and consumer exercise;
10. enable solely licensed payroll personnel to e-mail reviews to customers utilizing the e-mail on file; and
11. incorporate error dealing with into all processes within the system and e-mail any errors to the technical assist individuals.
Deliverables
All information are positioned within the subdirectory of the web site. The web site
ought to perform as follows: You need to have a web page that, when run,
shows a web page displaying the textual content âHowdy, World.â You must also have a
second web page that’s the annual wage calculator that correctly
calculates the annual wage, given an hourly charge and the variety of
hours projected to be labored in a 12 months. After you have verified each
pages work, save your web site, zip up all information, and submit within the
Dropbox.
i L A B S T E P S
STEPS 1 via three: Create Web site and Dwelling Web page (10 factors)
On this ilab, we’ll discover ways to create a easy ASP.NET internet
software utilizing Microsoft Visible Studio.NET 2008. The appliance will
show the textual content âHowdy, Worldâ on the house web page.
1. Open Microsoft Visible Studio 2008.
Click on on picture to enlarge.
Visible Studio Startup
2.
Click on right here for textual content description of this picture.
three. Create a brand new ASP.NET web site known as âPayrollSystem.â To do that, choose âFile, New Web site.â
Click on right here for textual content description of this picture.
When the âNew Websiteâ dialog opens, choose âASP.NET Websiteâ because the
Template, choose âFile Systemâ because the Location, and choose âVisible C#â
because the Language. Click on Browse and navigate to the folder the place you need
to avoid wasting your web site. Add âPayrollSystemâ on the finish of the file path.
Click on OK if you’re prompted to create a brand new folder. Click on OK within the New
Web site dialog to complete creating the web site.
Click on on picture to enlarge.
New Web site Dialog
Click on right here for textual content description of this picture.
three. Edit the Default.aspx file (the house web page in your website) so as to add the
message âHowdy, World.â To do that, if vital, click on the Design
button beneath the enhancing window to change to Design view, then click on in
the enhancing window and kind âHowdy, Worldâ (with out the quotes).
Click on on picture to enlarge.
Edit in Design View
Click on right here for textual content model of this picture.
Click on the Save button on the toolbar to avoid wasting the modifications to Default.aspx.
Click on right here for textual content description of this picture.
STEPS four via 5: Begin Debugging (10 factors); NOTE: Citrix customers have completely different steps!
four. To make sure that all the things is working correctly, click on the Begin
Debugging button on the toolbar, or press the F5 key on the keyboard, or
pull down the Debug menu and choose âBegin Debugging.â
Click on right here for textual content description of this picture.
5. If the âDebugging Not Enabledâ dialog field seems, choose the choice
so as to add or modify the Internet.config file to allow debugging and click on OK.
You need to solely have to do that the primary time you debug the positioning.
Click on on picture to enlarge.
Allow Debugging
6.
Click on right here for textual content description of this picture.
NOTE: To execute the applying, you may have these choices:
A. In case you are utilizing Citrix, press CTRL + F5 to Begin With out Debugging. You’ll not be deducted factors for this half.
B. In case you are utilizing a standalone model, press F5 to Begin with
Debugging, or you’ll be able to press CTRL + F5 to Begin With out Debugging
STEP 6 via 7 : Show the âHowdy, Worldâ internet web page (10 factors)
6. The Web Explorer internet browser will open and show your Default.aspx web page containing the âHowdy, Worldâ message.
Click on on picture to enlarge.
Howdy World in Browser
7.
Click on right here for textual content description of this picture.
eight. Cease debugging and return to the design mode by closing the browser.
9. Add a brand new kind to your internet software known as
frmSalaryCalculator.aspx. Make certain âPlace Code in separate fileâ is
checked whenever you add the shape. So as to add a brand new kind, click on (single-click,
not double-click) on the venture node within the resolution explorer.
With the venture node highlighted, right-click on the venture node
and choose âAdd New Itemâ from the popup menu. The next dialog will
be displayed:
Choose the identify of the shape you’ll add frmSalaryCalculator.aspx.
Make certain âPlace code in separate fileâ is checked and âChoose grasp
pageâ is unchecked.
10. You’ll create a web-based wage calculator on this new web page. To
do that, open the aspx web page in Design view and, from the Toolbox, add
three labels, two textual content field controls, and a button management. You possibly can add
controls by dragging the management from the Toolbox â Normal part
onto your kind. Your kind ought to appear to be this:
11. Change the textual content displayed in every label in order that the primary label
shows âAnnual Hoursâ; the second label ought to show âRateâ and the
third label ought to show â$â. (Trace: To alter the textual content displayed,
change the Textual content property of every management.)
12. Change the button textual content to show âCalculate Wage.â (Trace: To
change the textual content displayed because the button label, change the Textual content property
of the button.) Your kind ought to now appear to be this:
13. Set the ID property of the highest textual content field to txtAnnualHours. Set
the ID property of the second textbox to txtRate. Set the ID of the
backside label (the one we set the textual content property to â$â) to lblSalary.
(Observe: We set these IDs as we can be accessing the management values from
the C# code. You possibly can set the button ID and the opposite two labelsâ ID
properties as properly, however we wonât be accessing them from our code.)
14. In Design view, add a C# occasion handler for the button-click occasion by
double-clicking on the Calculate Wage button. This can place you in
the web page code behind file the editor. (Do not forget that ASP.Internet pages have a
file containing the HTML markup with an extension of .aspx and a C#
âcode behindâ file with an extension of .aspx.cs.) That is the code that
needs to be displayed: (For those who modified the ID of the button, it will likely be a
completely different methodology identify.)
Click on right here for textual content file of this picture.
This code can be known as every time the consumer presses the button. It’s
vital to keep in mind that code within the code behind web page executes on the
server â not on the userâs browser. Which means when the button is
pressed, the web page is submitted again to the net server and is processed
by the ASP.Internet software server on the internet server. It’s this code
(between the on this methodology) that can execute on the server.
As soon as it’s performed executing the web page can be despatched again to the browser. Any
modifications we make to the web page or controls on the web page can be proven to
the consumer within the up to date web page.
15. On this methodology, add code that can get the textual content within the
txtAnnualHours textual content field, convert it to a Double, and retailer it in a
double variable. Add code that can get the textual content from the txtRate textual content
field, convert it to a Double, and retailer it in one other variable. Create a
third variable of sort Double and set its worth to the annual hours
variable worth multiplied by the speed double variable worth. Take this
ensuing worth and convert it to a string (textual content), and replace the
lblSalary Textual content property with this new string.
Hints:
A controlâs property may be accessed by merely utilizing the management ID
adopted by a . adopted by the identify of the property. For instance, the
worth saved within the Textual content property of the txtAnnualHours management may be
accessed through the use of this: txtAnnualHours.Textual content. Textual content properties on controls
are of sort string.
To transform a string to a Double you should use the Convert class. If we had
a string variable known as str1 and a double variable known as myNumber,
the C# code to transform this could be as follows:
Click on right here for textual content file of this picture.
When changing from one sort to a different, we’re assuming that the worth
saved within the sort being transformed is appropriate with the kind we’re
changing to. Within the instance above, if the worth saved in str1 was not
sort appropriate with a Double (for instance âtigerâ) an error can be
raised.
To set the worth of a management on an online kind, you’ll be able to entry the management
and set the property instantly. If I had a label management known as lblCar
and I needed to replace the textual content that was displayed within the label, I may
do one thing like this:
Click on right here for textual content file of this picture.
Observe that following code can be incorrect and trigger an error:
Click on right here for textual content file of this picture.
lblCar is a Label â it isnât a string so we canât assign a string
on to it, however we are able to assign a string on to the Textual content property
of the label.
The entire base sorts in C# (double, int and so forth) have a ToString() methodology
you’ll be able to name. For those who had a double variable that you simply needed to transform to
a string and set that string to my labelâs textual content, you’d do the
following:
Click on right here for textual content file of this picture.
This may take no matter worth was saved within the myNumber Double and convert it to a string.
So as to add a $ to output you should use string concatenation in C# like this:
Click on right here for textual content file of this picture.
16. Set your new kind as the beginning web page by clicking as soon as on the shape
identify within the Answer Explorer after which right-clicking on the shape identify
and deciding on âSet as Begin Web page.â Now you can take a look at your software and
make sure that it really works appropriately as you probably did with the Howdy World kind
above. You possibly can change backwards and forwards between which kind runs whenever you
run your software by setting the completely different kinds as the beginning web page.