SlideShare ist ein Scribd-Unternehmen logo
1 von 12
SetFocus Library System Introduction:   ,[object Object],Audience:  ,[object Object],Project Goals: ,[object Object]
Handle all common library functions (e.g. Check a book out, Add a new library member, etc.) with minimal required training.
Easily maintained code.
Appropriate error handling.
Validation for all entered fields.Code Samples Windows Validation         private bool IsValidMember()         {             bool isValid = true;             if (!IsValidName(firstNameTextBox.Text))             {                 if (FirstName.Length == 0)                     ValidatorErrorProvider.SetError(firstNameTextBox, 
You must provide a valid first name
);                 else                     ValidatorErrorProvider.SetError(firstNameTextBox, 
The first name must be capitalized and contain only letters
);                 isValid = false;             }             else                 ValidatorErrorProvider.SetError(firstNameTextBox, string.Empty);             if (!IsValidName(lastNameTextBox.Text))             {                 if (LastName.Length == 0)                     ValidatorErrorProvider.SetError(lastNameTextBox, 
You must provide a valid last name
);                 else                     ValidatorErrorProvider.SetError(lastNameTextBox, 
The last name must be capitalized and contain only letters
);                 isValid = false;             }             else                 ValidatorErrorProvider.SetError(lastNameTextBox, string.Empty);             if (!IsValidMiddleInitial(MiddleInitial))             {                 ValidatorErrorProvider.SetError(middleInitialTextBox, 
The middle initial must be one capital letter or left blank
);                 isValid = false;             }             else                 ValidatorErrorProvider.SetError(middleInitialTextBox, string.Empty);             if (!IsValidStreet(Street))             {                 ValidatorErrorProvider.SetError(streetTextBox, 
You must provide a valid street address
);                 isValid = false;             }             else                 ValidatorErrorProvider.SetError(streetTextBox, string.Empty);             if (!IsValidCity(City))             {                                      ValidatorErrorProvider.SetError(cityTextBox, 
You must provide a valid city name
);                 isValid = false;             }             else                 ValidatorErrorProvider.SetError(cityTextBox, string.Empty);             if (!IsValidZipcode(Zipcode))             {                 if (Zipcode.Length == 0)                     ValidatorErrorProvider.SetError(zipTextBox, 
You must provide a valid zipcode
);                 else                     ValidatorErrorProvider.SetError(zipTextBox, 
The zipcode must be of the format ##### or #####-####
);                 isValid = false;             }             else                 ValidatorErrorProvider.SetError(zipTextBox, string.Empty);             if (!IsValidPhone(Phone))             {                 ValidatorErrorProvider.SetError(phoneTextBox, 
You must provide a valid phone number in the form (###)###-### or leave it blank
);                 isValid = false;             }             else                 ValidatorErrorProvider.SetError(phoneTextBox, string.Empty);             addMemberButton.Enabled = isValid;             return isValid;         }  This section of code is in the AddNewAdultMember form and is used to validate all the data entered into the form.  I chose to place it all in one method so that in order for the Add Member button to be accessible all required fields had valid information. MemberInfo web page  if (lbl.IsJuvenile(memberNumber))             {                 TimeSpan adultAge = new TimeSpan(365 * 18, 0, 0, 0);                 if ((DateTime.Today - lbl.GetJuvenileMemberBirthdate(memberNumber)) > adultAge)                 {                     try                     {                         lbl.PromoteJuvenile(memberNumber);                         messageLabel.Text += lbl.GetMemberFirstName(memberNumber) + 
 
 + lbl.GetMemberLastName(memberNumber) + 
 converted to an adult./n
;                     }                     catch (LibraryException ex)                     {                         if (ex.LibraryErrorCode == ErrorCode.JuvenileNotOldEnough)                             messageLabel.Text += 
Juvenile conversion failed, juvenile not old enough.
;                         else                             throw;                     }                 }                 birthdateLabelLabel.Visible = true;                 birthdateLabelLabel.Text = 
Birthdate: 
;                 birthdateLabel.Text = lbl.GetJuvenileMemberBirthdate(memberNumber).ToLongDateString();                 adultMemberLabelLabel.Visible = true;                 adultMemberLabelLabel.Text = 
Adult Member No: 
;                 adultMemberNumLabel.Text = lbl.GetJuvenileMemberAdultMemberID(memberNumber).ToString();             }             else             {                 birthdateLabelLabel.Visible = false;                 birthdateLabel.Visible = false;                 adultMemberLabelLabel.Visible = false;                 adultMemberNumLabel.Visible = false;                 } This section of code determines if a member is either an adult or juvenile.  If a juvenile member is eligible to be promoted to an adult the conversion is done and a message is added to the page.  If a member is an adult the birthdate and adultMemberNumber labels are made invisible.  This reduces the number of pages that would need to be maintained if I had coded individual adult and juvenile pages. Data Access Layer error handling catch (SqlException ex)             {                 if (ex.Number == 50009 || ex.Number == 50010)                     throw new LibraryException(ErrorCode.CheckOutFailed, 
You must provide a isbn AND a copy number
);                 if (ex.Number == 50011)                     throw new LibraryException(ErrorCode.ItemNotFound);                 if (ex.Number == 50012)                     throw new LibraryException(ErrorCode.ItemNotLoanable,
Item is not loanable
);                 if (ex.Number == 50002)                     throw new LibraryException(ErrorCode.GenericException);                 if (ex.Number == 50004)                     throw new LibraryException(ErrorCode.CheckOutFailed,
You must provide a member_no
);                 if (ex.Number == 50005)                     throw new LibraryException(ErrorCode.NoSuchMember);                 if (ex.Number == 50013)                     throw new LibraryException(ErrorCode.ItemAlreadyOnLoan);                 if (ex.Number == 50016)                     throw new LibraryException(ErrorCode.MembershipExpired);                 throw;             } Errors that occur in the database are returned as just a number.  This code converts the database error number s to a LibraryException, which is a custom exception written for this application. SetFocus Library System The main interface window provides access to all the main functions via the menu bar or tool strip.  The grid view also provides a context menu for item related tasks. Windows Check In Check in form used to process items that have been returned. Windows Check Out Check out form used to process items when a member wishes to take an item from the library Windows Add Adult Form used to enter a new adult member.  Fields are validated to ensure proper formatting. Windows Add Juvenile Form used to add a new juvenile member.  The Parent ID field is checked against the database to ensure that it is valid. Web Get Member Information Main interface of the web application.  Navigation is done view the links along the left side.  The system has a security feature that only allows registered librarians and volunteers access the interface. Web Member Information Display of member information.  Juvenile members also list the adult member ID and the member’s birth date. Web Add Adult Member Form used for entry of new adult members. Web Add Juvenile Member Form used for entry of new juvenile members. Web Add New Item Form used for entering a new item into the system.  Form has validation of the ISBN so to prevent duplicate items. Web Check In Form for checking in an item upon return. Web Check Out Form for checking on a item from the library system.
Christopher Latham Portfolio
Christopher Latham Portfolio
Christopher Latham Portfolio
Christopher Latham Portfolio
Christopher Latham Portfolio
Christopher Latham Portfolio
Christopher Latham Portfolio

Weitere ähnliche Inhalte

Was ist angesagt?

You code sucks, let's fix it
You code sucks, let's fix itYou code sucks, let's fix it
You code sucks, let's fix itRafael Dohms
 
Javascript 攻佔桌面應用程式:使用 electron
Javascript 攻佔桌面應用程式:使用 electronJavascript 攻佔桌面應用程式:使用 electron
Javascript 攻佔桌面應用程式:使用 electronYao Nien Chung
 
Object Calisthenics Applied to PHP
Object Calisthenics Applied to PHPObject Calisthenics Applied to PHP
Object Calisthenics Applied to PHPGuilherme Blanco
 
Object Calisthenics Adapted for PHP
Object Calisthenics Adapted for PHPObject Calisthenics Adapted for PHP
Object Calisthenics Adapted for PHPChad Gray
 
PHP for Adults: Clean Code and Object Calisthenics
PHP for Adults: Clean Code and Object CalisthenicsPHP for Adults: Clean Code and Object Calisthenics
PHP for Adults: Clean Code and Object CalisthenicsGuilherme Blanco
 
Dompletion: DOM-Aware JavaScript Code Completion
Dompletion: DOM-Aware JavaScript Code CompletionDompletion: DOM-Aware JavaScript Code Completion
Dompletion: DOM-Aware JavaScript Code CompletionSALT Lab @ UBC
 
Zhongl scala summary
Zhongl scala summaryZhongl scala summary
Zhongl scala summarylunfu zhong
 
Building Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModelBuilding Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModelpauldix
 
Building Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModelBuilding Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModelpauldix
 
Building an api using golang and postgre sql v1.0
Building an api using golang and postgre sql v1.0Building an api using golang and postgre sql v1.0
Building an api using golang and postgre sql v1.0Frost
 
Ruby on rails
Ruby on rails Ruby on rails
Ruby on rails Mohit Jain
 
JavaScript: Variables and Functions
JavaScript: Variables and FunctionsJavaScript: Variables and Functions
JavaScript: Variables and FunctionsJussi Pohjolainen
 
Art of Javascript
Art of JavascriptArt of Javascript
Art of JavascriptTarek Yehia
 
Javascript Experiment
Javascript ExperimentJavascript Experiment
Javascript Experimentwgamboa
 
Dependency rejection and TDD without Mocks
Dependency rejection and TDD without MocksDependency rejection and TDD without Mocks
Dependency rejection and TDD without MocksAntya Dev
 
Refactoring in Practice - Sunnyconf 2010
Refactoring in Practice - Sunnyconf 2010Refactoring in Practice - Sunnyconf 2010
Refactoring in Practice - Sunnyconf 2010Alex Sharp
 

Was ist angesagt? (20)

You code sucks, let's fix it
You code sucks, let's fix itYou code sucks, let's fix it
You code sucks, let's fix it
 
Javascript 攻佔桌面應用程式:使用 electron
Javascript 攻佔桌面應用程式:使用 electronJavascript 攻佔桌面應用程式:使用 electron
Javascript 攻佔桌面應用程式:使用 electron
 
Object Calisthenics Applied to PHP
Object Calisthenics Applied to PHPObject Calisthenics Applied to PHP
Object Calisthenics Applied to PHP
 
Object Calisthenics Adapted for PHP
Object Calisthenics Adapted for PHPObject Calisthenics Adapted for PHP
Object Calisthenics Adapted for PHP
 
PHP for Adults: Clean Code and Object Calisthenics
PHP for Adults: Clean Code and Object CalisthenicsPHP for Adults: Clean Code and Object Calisthenics
PHP for Adults: Clean Code and Object Calisthenics
 
Dompletion: DOM-Aware JavaScript Code Completion
Dompletion: DOM-Aware JavaScript Code CompletionDompletion: DOM-Aware JavaScript Code Completion
Dompletion: DOM-Aware JavaScript Code Completion
 
Scala on Your Phone
Scala on Your PhoneScala on Your Phone
Scala on Your Phone
 
Zhongl scala summary
Zhongl scala summaryZhongl scala summary
Zhongl scala summary
 
Building Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModelBuilding Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModel
 
Building Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModelBuilding Web Service Clients with ActiveModel
Building Web Service Clients with ActiveModel
 
Building an api using golang and postgre sql v1.0
Building an api using golang and postgre sql v1.0Building an api using golang and postgre sql v1.0
Building an api using golang and postgre sql v1.0
 
Ecom lec4 fall16_jpa
Ecom lec4 fall16_jpaEcom lec4 fall16_jpa
Ecom lec4 fall16_jpa
 
Ruby on rails
Ruby on rails Ruby on rails
Ruby on rails
 
Web 6 | JavaScript DOM
Web 6 | JavaScript DOMWeb 6 | JavaScript DOM
Web 6 | JavaScript DOM
 
JavaScript: Variables and Functions
JavaScript: Variables and FunctionsJavaScript: Variables and Functions
JavaScript: Variables and Functions
 
Art of Javascript
Art of JavascriptArt of Javascript
Art of Javascript
 
Javascript Experiment
Javascript ExperimentJavascript Experiment
Javascript Experiment
 
Dependency rejection and TDD without Mocks
Dependency rejection and TDD without MocksDependency rejection and TDD without Mocks
Dependency rejection and TDD without Mocks
 
Java script -23jan2015
Java script -23jan2015Java script -23jan2015
Java script -23jan2015
 
Refactoring in Practice - Sunnyconf 2010
Refactoring in Practice - Sunnyconf 2010Refactoring in Practice - Sunnyconf 2010
Refactoring in Practice - Sunnyconf 2010
 

Andere mochten auch

Introduction to AJAX and DWR
Introduction to AJAX and DWRIntroduction to AJAX and DWR
Introduction to AJAX and DWRSweNz FixEd
 
I Pods And I Tunes Power Point Histe Slide Show
I Pods And I Tunes Power Point  Histe Slide ShowI Pods And I Tunes Power Point  Histe Slide Show
I Pods And I Tunes Power Point Histe Slide Showguest4f0a79b
 
Reverse ajax in 2014
Reverse ajax in 2014Reverse ajax in 2014
Reverse ajax in 2014Nenad Pecanac
 
Christopher Latham
Christopher LathamChristopher Latham
Christopher Lathamlathamcl
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajaxNir Elbaz
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slidesSmithss25
 

Andere mochten auch (7)

Introduction to AJAX and DWR
Introduction to AJAX and DWRIntroduction to AJAX and DWR
Introduction to AJAX and DWR
 
I Pods And I Tunes Power Point Histe Slide Show
I Pods And I Tunes Power Point  Histe Slide ShowI Pods And I Tunes Power Point  Histe Slide Show
I Pods And I Tunes Power Point Histe Slide Show
 
Java Script Introduction
Java Script IntroductionJava Script Introduction
Java Script Introduction
 
Reverse ajax in 2014
Reverse ajax in 2014Reverse ajax in 2014
Reverse ajax in 2014
 
Christopher Latham
Christopher LathamChristopher Latham
Christopher Latham
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajax
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slides
 

Ähnlich wie Christopher Latham Portfolio

My Portfolio
My PortfolioMy Portfolio
My Portfolioaemartin4
 
SetFocus Portfolio
SetFocus PortfolioSetFocus Portfolio
SetFocus Portfoliodonjoshu
 
full stack practical assignment msc cs.pdf
full stack practical assignment msc cs.pdffull stack practical assignment msc cs.pdf
full stack practical assignment msc cs.pdfHulkTheDevil
 
Library Project
Library ProjectLibrary Project
Library ProjectMauro_Sist
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypesVarun C M
 
Ensure code quality with vs2012
Ensure code quality with vs2012Ensure code quality with vs2012
Ensure code quality with vs2012Sandeep Joshi
 
javascript-variablesanddatatypes-130218094831-phpapp01.pdf
javascript-variablesanddatatypes-130218094831-phpapp01.pdfjavascript-variablesanddatatypes-130218094831-phpapp01.pdf
javascript-variablesanddatatypes-130218094831-phpapp01.pdfAlexShon3
 
Frank Rodenbaugh Portfolio
Frank Rodenbaugh PortfolioFrank Rodenbaugh Portfolio
Frank Rodenbaugh PortfolioFrankRodenbaugh
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web developmentJohannes Brodwall
 
SummaryHW6 Account ManagementIn HW4, you kept track of multiple.pdf
SummaryHW6 Account ManagementIn HW4, you kept track of multiple.pdfSummaryHW6 Account ManagementIn HW4, you kept track of multiple.pdf
SummaryHW6 Account ManagementIn HW4, you kept track of multiple.pdfARORACOCKERY2111
 
Library Management System - V1.0
Library Management System - V1.0Library Management System - V1.0
Library Management System - V1.0JamesMuturi
 
How to test complex SaaS applications - The family july 2014
How to test complex SaaS applications - The family july 2014How to test complex SaaS applications - The family july 2014
How to test complex SaaS applications - The family july 2014Guillaume POTIER
 
Michael Colon Portfolio
Michael Colon PortfolioMichael Colon Portfolio
Michael Colon Portfoliomichael_colon
 

Ähnlich wie Christopher Latham Portfolio (20)

My Portfolio
My PortfolioMy Portfolio
My Portfolio
 
SetFocus Portfolio
SetFocus PortfolioSetFocus Portfolio
SetFocus Portfolio
 
full stack practical assignment msc cs.pdf
full stack practical assignment msc cs.pdffull stack practical assignment msc cs.pdf
full stack practical assignment msc cs.pdf
 
Library Project
Library ProjectLibrary Project
Library Project
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypes
 
Ensure code quality with vs2012
Ensure code quality with vs2012Ensure code quality with vs2012
Ensure code quality with vs2012
 
javascript-variablesanddatatypes-130218094831-phpapp01.pdf
javascript-variablesanddatatypes-130218094831-phpapp01.pdfjavascript-variablesanddatatypes-130218094831-phpapp01.pdf
javascript-variablesanddatatypes-130218094831-phpapp01.pdf
 
Frank Rodenbaugh Portfolio
Frank Rodenbaugh PortfolioFrank Rodenbaugh Portfolio
Frank Rodenbaugh Portfolio
 
Javascript
JavascriptJavascript
Javascript
 
Grails UI Primer
Grails UI PrimerGrails UI Primer
Grails UI Primer
 
Javascript
JavascriptJavascript
Javascript
 
Leveraging Symfony2 Forms
Leveraging Symfony2 FormsLeveraging Symfony2 Forms
Leveraging Symfony2 Forms
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web development
 
Jason parsing
Jason parsingJason parsing
Jason parsing
 
SummaryHW6 Account ManagementIn HW4, you kept track of multiple.pdf
SummaryHW6 Account ManagementIn HW4, you kept track of multiple.pdfSummaryHW6 Account ManagementIn HW4, you kept track of multiple.pdf
SummaryHW6 Account ManagementIn HW4, you kept track of multiple.pdf
 
Library Management System - V1.0
Library Management System - V1.0Library Management System - V1.0
Library Management System - V1.0
 
How to test complex SaaS applications - The family july 2014
How to test complex SaaS applications - The family july 2014How to test complex SaaS applications - The family july 2014
How to test complex SaaS applications - The family july 2014
 
Lecture7 pattern
Lecture7 patternLecture7 pattern
Lecture7 pattern
 
Michael Colon Portfolio
Michael Colon PortfolioMichael Colon Portfolio
Michael Colon Portfolio
 
The Xtext Grammar Language
The Xtext Grammar LanguageThe Xtext Grammar Language
The Xtext Grammar Language
 

Kürzlich hochgeladen

BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 

Kürzlich hochgeladen (20)

BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 

Christopher Latham Portfolio

  • 1.
  • 2. Handle all common library functions (e.g. Check a book out, Add a new library member, etc.) with minimal required training.
  • 5. Validation for all entered fields.Code Samples Windows Validation private bool IsValidMember() { bool isValid = true; if (!IsValidName(firstNameTextBox.Text)) { if (FirstName.Length == 0) ValidatorErrorProvider.SetError(firstNameTextBox, You must provide a valid first name ); else ValidatorErrorProvider.SetError(firstNameTextBox, The first name must be capitalized and contain only letters ); isValid = false; } else ValidatorErrorProvider.SetError(firstNameTextBox, string.Empty); if (!IsValidName(lastNameTextBox.Text)) { if (LastName.Length == 0) ValidatorErrorProvider.SetError(lastNameTextBox, You must provide a valid last name ); else ValidatorErrorProvider.SetError(lastNameTextBox, The last name must be capitalized and contain only letters ); isValid = false; } else ValidatorErrorProvider.SetError(lastNameTextBox, string.Empty); if (!IsValidMiddleInitial(MiddleInitial)) { ValidatorErrorProvider.SetError(middleInitialTextBox, The middle initial must be one capital letter or left blank ); isValid = false; } else ValidatorErrorProvider.SetError(middleInitialTextBox, string.Empty); if (!IsValidStreet(Street)) { ValidatorErrorProvider.SetError(streetTextBox, You must provide a valid street address ); isValid = false; } else ValidatorErrorProvider.SetError(streetTextBox, string.Empty); if (!IsValidCity(City)) { ValidatorErrorProvider.SetError(cityTextBox, You must provide a valid city name ); isValid = false; } else ValidatorErrorProvider.SetError(cityTextBox, string.Empty); if (!IsValidZipcode(Zipcode)) { if (Zipcode.Length == 0) ValidatorErrorProvider.SetError(zipTextBox, You must provide a valid zipcode ); else ValidatorErrorProvider.SetError(zipTextBox, The zipcode must be of the format ##### or #####-#### ); isValid = false; } else ValidatorErrorProvider.SetError(zipTextBox, string.Empty); if (!IsValidPhone(Phone)) { ValidatorErrorProvider.SetError(phoneTextBox, You must provide a valid phone number in the form (###)###-### or leave it blank ); isValid = false; } else ValidatorErrorProvider.SetError(phoneTextBox, string.Empty); addMemberButton.Enabled = isValid; return isValid; } This section of code is in the AddNewAdultMember form and is used to validate all the data entered into the form. I chose to place it all in one method so that in order for the Add Member button to be accessible all required fields had valid information. MemberInfo web page if (lbl.IsJuvenile(memberNumber)) { TimeSpan adultAge = new TimeSpan(365 * 18, 0, 0, 0); if ((DateTime.Today - lbl.GetJuvenileMemberBirthdate(memberNumber)) > adultAge) { try { lbl.PromoteJuvenile(memberNumber); messageLabel.Text += lbl.GetMemberFirstName(memberNumber) + + lbl.GetMemberLastName(memberNumber) + converted to an adult./n ; } catch (LibraryException ex) { if (ex.LibraryErrorCode == ErrorCode.JuvenileNotOldEnough) messageLabel.Text += Juvenile conversion failed, juvenile not old enough. ; else throw; } } birthdateLabelLabel.Visible = true; birthdateLabelLabel.Text = Birthdate: ; birthdateLabel.Text = lbl.GetJuvenileMemberBirthdate(memberNumber).ToLongDateString(); adultMemberLabelLabel.Visible = true; adultMemberLabelLabel.Text = Adult Member No: ; adultMemberNumLabel.Text = lbl.GetJuvenileMemberAdultMemberID(memberNumber).ToString(); } else { birthdateLabelLabel.Visible = false; birthdateLabel.Visible = false; adultMemberLabelLabel.Visible = false; adultMemberNumLabel.Visible = false; } This section of code determines if a member is either an adult or juvenile. If a juvenile member is eligible to be promoted to an adult the conversion is done and a message is added to the page. If a member is an adult the birthdate and adultMemberNumber labels are made invisible. This reduces the number of pages that would need to be maintained if I had coded individual adult and juvenile pages. Data Access Layer error handling catch (SqlException ex) { if (ex.Number == 50009 || ex.Number == 50010) throw new LibraryException(ErrorCode.CheckOutFailed, You must provide a isbn AND a copy number ); if (ex.Number == 50011) throw new LibraryException(ErrorCode.ItemNotFound); if (ex.Number == 50012) throw new LibraryException(ErrorCode.ItemNotLoanable, Item is not loanable ); if (ex.Number == 50002) throw new LibraryException(ErrorCode.GenericException); if (ex.Number == 50004) throw new LibraryException(ErrorCode.CheckOutFailed, You must provide a member_no ); if (ex.Number == 50005) throw new LibraryException(ErrorCode.NoSuchMember); if (ex.Number == 50013) throw new LibraryException(ErrorCode.ItemAlreadyOnLoan); if (ex.Number == 50016) throw new LibraryException(ErrorCode.MembershipExpired); throw; } Errors that occur in the database are returned as just a number. This code converts the database error number s to a LibraryException, which is a custom exception written for this application. SetFocus Library System The main interface window provides access to all the main functions via the menu bar or tool strip. The grid view also provides a context menu for item related tasks. Windows Check In Check in form used to process items that have been returned. Windows Check Out Check out form used to process items when a member wishes to take an item from the library Windows Add Adult Form used to enter a new adult member. Fields are validated to ensure proper formatting. Windows Add Juvenile Form used to add a new juvenile member. The Parent ID field is checked against the database to ensure that it is valid. Web Get Member Information Main interface of the web application. Navigation is done view the links along the left side. The system has a security feature that only allows registered librarians and volunteers access the interface. Web Member Information Display of member information. Juvenile members also list the adult member ID and the member’s birth date. Web Add Adult Member Form used for entry of new adult members. Web Add Juvenile Member Form used for entry of new juvenile members. Web Add New Item Form used for entering a new item into the system. Form has validation of the ISBN so to prevent duplicate items. Web Check In Form for checking in an item upon return. Web Check Out Form for checking on a item from the library system.