Weitere ähnliche Inhalte Ähnlich wie SetFocus Portfolio (20) Kürzlich hochgeladen (20) SetFocus Portfolio15. Zip must be in format of either ##### or #####-####. 20. If book to be checked out is already on loan, must be checked in first. 28. Conversion of a HTML/CSS layout implemented with a MasterPage and content pages. 29. Use of Skins and CSS to modify design layout characteristics. 31. Use of validation controls (required, range and expression) to validate input before postback. 32. Use of various AJAX controls such as UpdatePanel, UpdateProgress as well as Ajax Toolkit controls to provide partial updates and improved user interactions. 35. Use of JavaScript library jQuery was implemented for effects and animations.4010025174625Description<br />The visual interface was created by converting a HTML/CSS layout into a MasterPage and each corresponding content page used various ASP.NET web controls.<br />Each web page had their own validation controls and used an instance of the Business Layer class to initiate methods that executed from the Data Access layer. <br />Communication of the resulting data from the Data Access layer was accomplished by either using ObjectDataSource controls or ADO.NET objects such as Connection, Command, and DataSet.<br />The UI frontend has an instance and reference to the Business layer class: <br />using System;<br />using System.Collections.Generic;<br />using System.Linq;<br />using System.Web;<br />using System.Web.UI;<br />using System.Web.UI.WebControls;<br />using FS.LibraryBusiness;<br />private BusinessLogic businessLogic = new BusinessLogic();<br />SetFocus Project #4 – ASP.NET Web Application<br />Sample Code:<br />protected void btnAddAdult_Click(object sender, EventArgs e)<br />{<br /> try<br /> {<br />AdultMember adultMember = new AdultMember();<br /> Member member = new Member();<br /> adultMember.FirstName = txtFirstName.Text.Trim();<br /> adultMember.MiddleInitial = txtMiddleName.Text.Trim();<br /> adultMember.LastName = txtLastName.Text.Trim();<br /> adultMember.Street = txtAddress.Text.Trim();<br /> adultMember.City = txtCity.Text.Trim();<br /> adultMember.State = ddlState.SelectedValue.ToString();<br /> adultMember.ZipCode = txtZip.Text.Trim();<br /> adultMember.PhoneNumber = txtPhone.Text.Trim();<br /> businessLogic.AddMember(adultMember);<br /> member = businessLogic.GetMember(adultMember.MemberID);<br /> lblStatus.Text = newMember.MemberID.ToString() + quot;
was addedquot;
;<br />}<br />catch (LibraryException lex){<br />switch (lex.LibraryErrorCode){<br /> case ErrorCode.GenericException:<br /> lblStatus.Text = quot;
Error: Database Error please contact ITquot;
; break;<br /> case ErrorCode.AddAdultFailed:<br /> lblStatus.Text = quot;
Error: Adding Adult Member failedquot;
; break;<br /> default:<br />lblStatus.Text = quot;
Error: quot;
+ lex.Message;break;<br />}}<br />catch (Exception ex){ lblStatus.Text = quot;
Error: quot;
+ ex.Message;}<br />SetFocus Project #4 – ASP.NET Web Application<br />Sample Code:<br />protected void btnAddItem_Click(object sender, EventArgs e){<br />try<br /> {<br /> Item item = new Item();<br /> item.ISBN = int.Parse(txtISBN.Text);<br /> item.Author = txtAuthor.Text;<br /> item.Title = txtTitle.Text;<br /> item.Cover = radioListCover.SelectedItem.Value;<br /> <br /> short copy_no = businessLogic.AddItem(item.ISBN, item.Title, item.Author);<br /> if (copy_no != 0)<br /> {<br /> lblStatus.Text = quot;
Item added with Copy Number of quot;
+ copy_no;<br /> }<br /> resetControls();<br /> }<br /> <br /> catch (LibraryException lex)<br /> {<br /> switch (lex.LibraryErrorCode)<br /> {<br /> case ErrorCode.GenericException:<br /> <br />lblStatus.Text = quot;
Error: Database Error please contact ITquot;
;<br /> break;<br /> <br />case ErrorCode.MissingRequiredItems:<br /> <br />lblStatus.Text = quot;
Error: Missing Required Itemsquot;
;<br /> break;<br /> <br />default:<br /> lblStatus.Text = quot;
Error: quot;
+ lex.Message;<br /> break;<br /> }<br /> }<br /> catch (Exception ex)<br /> {<br /> lblStatus.Text = quot;
Error: quot;
+ ex.Message;<br /> }<br /> }<br />}<br />SetFocus Project #4 – ASP.NET Web Application<br />Sample Code:<br />protected void btnCheckinConfirm_Click(object sender, EventArgs e){try{<br />short isbn = short.Parse(GridView1.SelectedRow.Cells[1].Text);short copyNumber = short.Parse(GridView1.SelectedRow.Cells[2].Text);<br /> businessLogic.CheckInItem(isbn, copyNumber);<br />GridView1.DataBind();setStatus(quot;
ISBN: quot;
+ isbn + quot;
CopyNumber: quot;
+ copyNumber + quot;
has been checked inquot;
);<br />}<br /> catch (LibraryException lex)<br /> { switch (lex.LibraryErrorCode)<br />{ case ErrorCode.GenericException:<br />setStatus(quot;
Error: Database Error please contact ITquot;
);break;<br /> case ErrorCode.CheckInFailed:<br />setStatus(quot;
Error: Checkin Failedquot;
);break;<br /> default:<br />setStatus(quot;
Error: quot;
+ lex.Message);break;<br /> }<br />}<br />catch (Exception ex){<br />setStatus(quot;
Error: quot;
+ ex.Message);<br />}<br />SetFocus Project #4 – ASP.NET Web Application<br />MasterPage:<br /><%@ Master Language=quot;
C#quot;
CodeFile=quot;
Site.master.csquot;
Inherits=quot;
Sitequot;
%><br /><!DOCTYPE html PUBLIC quot;
-//W3C//DTD XHTML 1.0 Transitional//ENquot;
quot;
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdquot;
><br /><head id=quot;
Head1quot;
runat=quot;
serverquot;
><br /> <br /> <link href=quot;
master.cssquot;
rel=quot;
stylesheetquot;
type=quot;
text/cssquot;
/> <br /> <link href=quot;
page.cssquot;
rel=quot;
stylesheetquot;
type=quot;
text/cssquot;
/> <br /> <br /> <script src=quot;
../scripts/jquery-1.4.2.min.jsquot;
type=quot;
text/javascriptquot;
></script><br /> <br /></head><br /><body><br /> <form id=quot;
form1quot;
runat=quot;
serverquot;
><br /> <br /> <asp:SiteMapDataSource ID=quot;
SiteMapDataSource1quot;
runat=quot;
serverquot;
/> <br /> <br /> <div id=quot;
wrapquot;
><br /> <br /> <div id=quot;
headerquot;
><br /> <h1><asp:Label ID=quot;
lblSiteHeadingquot;
runat=quot;
serverquot;
></asp:Label></h1><br /> </div><br /> <br /> <div id=quot;
navquot;
><br /> <asp:Menu ID=quot;
Menu1quot;
Width=quot;
300pxquot;
runat=quot;
serverquot;
Orientation=quot;
Horizontalquot;
<br /> StaticEnableDefaultPopOutImage=quot;
Falsequot;
DataSourceID=quot;
SiteMapDataSource1quot;
<br /> CssClass=quot;
menuquot;
><br /> </asp:Menu><br /> <br /> <asp:LoginStatus ID=quot;
LoginStatus1quot;
runat=quot;
serverquot;
CssClass=quot;
login_statusquot;
<br /> LogoutPageUrl=quot;
~/Login.aspxquot;
LogoutAction=quot;
Redirectquot;
/><br /> <br /> </div><br /> <br /> <div id=quot;
mainquot;
><br /> <asp:ContentPlaceHolder ID=quot;
ContentPlaceHolderMainquot;
runat=quot;
serverquot;
><br /> </asp:ContentPlaceHolder><br /> <br /> </div><br /> <br /> <div id=quot;
sidebarquot;
> <br /> <asp:ContentPlaceHolder ID=quot;
ContentPlaceHolderSidebarquot;
runat=quot;
serverquot;
><br /> </asp:ContentPlaceHolder><br /> </div><br /><div id=quot;
footerquot;
>Copyright © 2010 LibraryCheckout.com</div><br /></div><br />SetFocus Project #4 – ASP.NET Web Application<br />Screenshots:<br />