3. Framework Project Requirements
Build parts of the business tier for a retail company
involving suppliers and products.
Create and test two assemblies.
o The first assembly is a class library project called
Foundation, containing various interfaces and base
classes.
o The second assembly is a class library project called
AppTypes, containing various entity, collection, and
exception classes used by existing business
processes.
6. IComparible implementation for Product class
Method to instantiate new
instance of SortByCategoryID
nested class
Nested class to compare to
Product objects
9. Library Management System Project
Phase I
Requirements:
Develop a Windows front-end with 4 functions
Add adult member
Add juvenile member
Check in an item
Check out an item
Projects Developed:
Windows Client
Form control
Validation
Business Layer
Business Rule enforcement
Data Access Layer Communication
10. Design Highlights
Layered Architecture
Data transport between layers using Entities
User-friendly Interface.
Tabbed driven Navigation.
Validation of user input at the presentation and
business tiers
Error handling at database, data access, business
and presentation tiers
16. A L TE R PROCE DURE [dbo].[A ddA dult]
-- General Comment:
-- The S tate parameter of all RA IS E RROR calls is the ordinal value
-- of a particular E rrorCode enum for any given L ibraryE xception,
-- for all calls to RA IS E RROR
@member_no smallint = null output, -- Parameter to return the new memberNumber
@firstname varchar(15) = null,
@middleinitial char(1) = null,
@lastname varchar(15) = null,
@street varchar(15) = null,
@city varchar(15) = null,
@state char(2) = null,
@zip char(10 = null,
@phone_no char(13) = null
AS
-- check to make sure that all required inputs have valid values, if no raise S qlE rror and return
IF ( L E N(@firstname) = 0 OR L E N(@lastname) = 0 OR L E N(@street) = 0 OR
L E N(@city) = 0 OR L E N(@state) = 0 OR L E N(@zip) = 0)
B E GIN
RA IS E RROR ('Failed to add adult member, a required field is empty', 11, 8)
RE TURN
E ND
-- B egin the transaction of adding a new adult member
-- Rollback any failed modifications and raise the appropriate S qlE xception
-- Otherwise, commit a successful transaction
B E GIN TRA NS A CTION
INS E RT member
(lastname, firstname, middleinitial)
V A L UE S
(@lastname, @firstname, @middleinitial)
IF (@@error <> 0)
B E GIN
RA IS E RROR ('Insert into member table failed', 11 ,8)
ROL L B A CK TRA NS A CTION
RE TURN
E ND
S E T @member_no = scope_identity();
INS E RT adult
(member_no, street, city, state, zip, phone_no, expr_date)
V A L UE S
(@member_no, @street, @city, @state, @zip, @phone_no, Dateadd(Y Y , 1, Getdate()))
IF (@@error <> 0)
B E GIN
RA IS E RROR ('Insert into adult table failed', 11 ,8)
RE TURN
E ND
COM M IT TRA NS A CTION
Stored procedure AddAdult
17. Library Management System Project
Phase III
Replace Windows front-end with Web front-end
Add Functionality
Add Item either with a new ISBN or new copy of an existing ISBN
Automatic Conversion to Adult Membership for Juvenile 18 years and
over with notification to Librarian
Membership renewal upon Librarian acknowledgement
Add Security
Add a Librarian role
Add 2 users to the Librarian role
Prevent everyone except the Librarian role from accessing the library
functions
18. Automatic Conversion to Adult Membership for Juvenile
18 years and over with notification to Librarian
19. Checks out a book to a member
Can view member info & out standing items to the member
Highlights over due items info
Highlights expired card and offers renewal option
20. Total number of projects: 6
Total number of regular working hours dedicated to
projects: 240
Total number of overtime hours dedicated to projects:
100+
Total lines of C# code written: 13,000+
Total lines of supporting code (XML, HTML, SQL):
1,500+
Note: Additional work was required outside the projects.