Nj 09 T2 David Frischknecht

19
.NET Portfolio David A. Frischknecht [email protected] Home - 973-702-8025 Cell – 570-228-6547

description

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

Transcript of Nj 09 T2 David Frischknecht

Page 1: Nj 09 T2 David Frischknecht

.NET Portfolio

David A. [email protected] - 973-702-8025Cell – 570-228-6547

Page 2: Nj 09 T2 David Frischknecht

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

Page 3: Nj 09 T2 David Frischknecht

• 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.

Page 4: Nj 09 T2 David Frischknecht

• 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

Page 5: Nj 09 T2 David Frischknecht

Starting point of application All functions available from Library menu

Page 6: Nj 09 T2 David Frischknecht

Data entry screen Flags input format errors

Page 7: Nj 09 T2 David Frischknecht

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

Page 8: Nj 09 T2 David Frischknecht

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

Page 9: Nj 09 T2 David Frischknecht

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

Page 10: Nj 09 T2 David Frischknecht

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

Page 11: Nj 09 T2 David Frischknecht

Requires valid username and password

Page 12: Nj 09 T2 David Frischknecht

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

Page 13: Nj 09 T2 David Frischknecht

Retrieves member information Flags overdue items Allows checkout of additional items

Page 14: Nj 09 T2 David Frischknecht

Flags input format errors

Page 15: Nj 09 T2 David Frischknecht

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

Page 16: Nj 09 T2 David Frischknecht

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

Page 17: Nj 09 T2 David Frischknecht

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

Page 18: Nj 09 T2 David Frischknecht

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( ) ;

}

}

}

Page 19: Nj 09 T2 David Frischknecht

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