Nj 09 T2 David Frischknecht

Post on 02-Jul-2015

411 views 0 download

description

My portfolio of the ongoing project I did while at SetFocus.

Transcript of Nj 09 T2 David Frischknecht

.NET Portfolio

David A. Frischknechtfishnet37222@gmail.comHome - 973-702-8025Cell – 570-228-6547

• Library System Overview• Design Highlights• Windows Forms Sample• ASP.NET Web Forms Sample• ADO.NET Code Sample• Stored Procedure Sample

• Introduction• I designed and implemented a library system to handle day-to-day operations

performed by librarians.

• Audience• Librarians will be the primary users of this application.

• Project Goals• Design and develop Windows and Web based applications that allow librarians to add

adult and juvenile members, check in and check out books, and maintain an inventory of the library’s books.

• Develop code that is easily maintainable.• Provide validation for all required fields.• Provide error handling.• Produce a user interface that is intuitive, requiring minimal training for users while

minimizing resource utilization.

• 3 Tiered Architecture• User-friendly interface developed using MDI forms with

menu strip navigation and ASP.NET Web forms using Tree View navigation

• Business rules and validations encapsulated within the Business Tier

• ADO.NET Data Access called Stored Procedures in the SQL Server Database

• Data transported between the layers using Entities and Strongly-Typed Collections

Starting point of application All functions available from Library menu

Data entry screen Flags input format errors

Data entry screen Flags input format errors Requires a valid Adult Member ID

Retrieves member information Flags expired memberships and overdue items Requires a valid Member ID

Lists books on loan in a Data Grid View Allows check out of books Non-modal confirmation message

Retrieves information about items Allows items to be checked in Non-modal message when item is already checked in

Requires valid username and password

Requires valid Member ID Non-modal error message for invalid input

Retrieves member information Flags overdue items Allows checkout of additional items

Flags input format errors

Flags input format errors Requires a valid Adult Member ID Renews Adult Member if expired membership

Retrieves information about items Allows items to be checked in Non-modal message when item is already checked in

Lists books on loan Allows check out of books Non-modal confirmation message Renews Membership if expired

ubl i c voi d CheckOut I t em(short memberNum, i nt i sbn, short copyNum)

usi ng (Sql Connect i on cnn = new Sql Connect i on(Set t i ngs. Def aul t . Li braryConnect i onSt r i ng) )

{

usi ng (Sql Command cmd = cnn. Creat eCommand( ) )

{

cmd. CommandText = " CheckOut I t em" ;

cmd. CommandType = CommandType. St oredProcedure;

cmd. Paramet ers. AddWi t hVal ue( " @member_no" , memberNum) ;

cmd. Paramet ers. AddWi t hVal ue( " @i sbn" , i sbn) ;

cmd. Paramet ers. AddWi t hVal ue( " @copy_no" , copyNum) ;

t ry

{

cnn. Open( ) ;

cmd. Execut eNonQuery( ) ;

}

}

}

ALTER PROCEDURE [dbo] . [Get I t em]@i sbn i nt ,@copy_no smal l i nt

ASBEGI N

SET NOCOUNT ONI F NOT EXI STS (SELECT * FROM copy WHERE ( ( i sbn = @i sbn) AND (copy_no = @copy_no) ) )BEGI N

RAI SERROR( ' I t em does not exi st . ' , 11, 1)RETURN

ENDSELECT copy. i sbn, copy. copy_no, t i t l e. t i t l e, t i t l e. aut hor, l oan. member_no, l oan. out _dat e,

l oan. due_dat eFROM t i t l e I NNER JOI N copy ON t i t l e. t i t l e_no = copy. t i t l e_no

I NNER JOI N i t em ON t i t l e. t i t l e_no = i t em. t i t l e_no AND copy. i sbn = i t em. i sbnLEFT OUTER JOI N l oan ON t i t l e. t i t l e_no = l oan. t i t l e_no AND copy. i sbn = l oan. i sbnAND copy. copy_no = l oan. copy_no

WHERE (copy. i sbn = @i sbn) AND (copy. copy_no = @copy_no)END