... customer account system Chapter 13: Advanced Customer Orders Your e-commerce application is shaping up nicely You’ve added customer account functionality, and you’re keeping track of customer addresses ... Dominic Shakeshaft, Jim Sumser Project Manager: Kylie Johnston Copy Edit Manager: Nicole LeClerc Copy Editor: Julie McNamee Assistant Production Director: Kari Brooks-Copony Production Editor: ... 20, 2005 4:51 AM CHAPTER ■■■ Laying Out the Foundations N ow that you’ve convinced the client that you can create a cool web site to complement the client’s store activity, it’s time to stop celebrating...
Ngày tải lên: 09/08/2014, 14:20
... specific connection object DbConnection conn = factory.CreateConnection(); // Set the connection string conn.ConnectionString = connectionString; // Create a database specific command object DbCommand ... generic DbConnection reference: // Obtain a database specific connection object DbConnection conn = factory.CreateConnection(); So, in practice, the connection object will actually contain a SqlCommand ... /// Class contains generic data access functionality to be accessed from /// the business tier /// public static class GenericDataAccess { // static constructor static GenericDataAccess()...
Ngày tải lên: 09/08/2014, 14:20
Beginning ASP.NET 2.0 E-Commerce in C# 2005 From Novice to Professional PHẦN 3 docx
... loaded once by the static constructor of the class: public static class BalloonShopConfiguration { // Caches the connection string private readonly static string dbConnectionString; // Caches the ... 19, 2005 9:51 AM 124 CHAPTER ■ CREATING THE PRODUCT CATALOG: PART II SELECT ProductCategory.ProductID, ProductCategory.CategoryID, Product.Name FROM ProductCategory INNER JOIN Product ON Product.ProductID ... OnCatalogPromotion FROM Product INNER JOIN ProductCategory ON Product.ProductID = ProductCategory.ProductID INNER JOIN Category ON ProductCategory.CategoryID = Category.CategoryID WHERE Product.OnDepartmentPromotion...
Ngày tải lên: 09/08/2014, 14:20
Beginning ASP.NET 2.0 E-Commerce in C# 2005 From Novice to Professional PHẦN 4 ppt
... products to your customer On each payment, you need to carefully check that the product prices correspond to the correct amounts, because it’s very easy for anyone to add a fake product to the ... PayPal to redirect back to your web site after the customer completes or cancels a payment ■Caution You need to use the correct email address for the money to get into your account Press F5 to execute ... http://www.online-payment-processing.com • 2Checkout: http://www.2checkout.com • AnyPay: http://www.anypay.com • CCNow: http://www.ccnow.com • Electronic Transfer: http://www.electronictransfer.com • Moneybookers:...
Ngày tải lên: 09/08/2014, 14:20
Beginning ASP.NET 2.0 E-Commerce in C# 2005 From Novice to Professional PHẦN 5 doc
... Product.ProductID = ProductCategory.ProductID WHERE ProductCategory.CategoryID = @CategoryID CreateProduct The CreateProduct stored procedure is called to create a new product and assign it to a category ... product from a category public static bool RemoveProductFromCategory(string productId, string categoryId) { // get a configured DbCommand object DbCommand comm = GenericDataAccess.CreateCommand(); ... Controls[0]).Checked.ToString(); string onCatalogPromotion = ((CheckBox)grid.Rows[e.RowIndex].Cells[7] Controls[0]).Checked.ToString(); // Execute the update command bool success = CatalogAccess.UpdateProduct(id,...
Ngày tải lên: 09/08/2014, 14:20
Beginning ASP.NET 2.0 E-Commerce in C# 2005 From Novice to Professional PHẦN 6 docx
... CountOldCarts(byte days) { // get a configured DbCommand object DbCommand comm = GenericDataAccess.CreateCommand(); // set the stored procedure name comm.CommandText = "ShoppingCartCountOldCarts"; ... methods to the ShoppingCartAccess class (located in ShoppingCartAccess.cs) They are used to interact with the two stored procedures you wrote earlier // Counts old shopping carts public static int CountOldCarts(byte ... ShoppingCartCountOldCarts call: CREATE PROCEDURE ShoppingCartCountOldCarts (@Days smallint) AS SELECT COUNT(CartID) FROM ShoppingCart WHERE CartID IN (SELECT CartID FROM ShoppingCart GROUP BY CartID HAVING...
Ngày tải lên: 09/08/2014, 14:20
Beginning ASP.NET 2.0 E-Commerce in C# 2005 From Novice to Professional PHẦN 7 pps
... get encryptor and encryption stream DESCryptoServiceProvider encryptor = new DESCryptoServiceProvider(); CryptoStream encryptionStream = new CryptoStream(tempStream, encryptor.CreateEncryptor(key, ... to the SecurityLib directory called SecureCardException.cs with code as follows: using System; namespace SecurityLib { public class SecureCardException : Exception { public SecureCardException(string ... decryptor and decryption stream DESCryptoServiceProvider decryptor = new DESCryptoServiceProvider(); CryptoStream decryptionStream = new CryptoStream(tempStream, decryptor.CreateDecryptor(key,...
Ngày tải lên: 09/08/2014, 14:20
Beginning ASP.NET 2.0 E-Commerce in C# 2005 From Novice to Professional PHẦN 8 pptx
... { SecureCard secureCard = new SecureCard(profile.CreditCard); creditCard = secureCard.CardNumberX; creditCardHolder = secureCard.CardHolder; creditCardNumber = secureCard.CardNumber; creditCardIssueDate ... creditCardIssueDate = secureCard.IssueDate; creditCardIssueNumber = secureCard.IssueNumber; creditCardExpiryDate = secureCard.ExpiryDate; creditCardType = secureCard.CardType; } catch { creditCard = "Not ... advanced To achieve this, add a new class called CommerceLibAccess to the App_Code directory You’ll actually store two other classes in the same file, as per code in previous chapters (excepting...
Ngày tải lên: 09/08/2014, 14:20
Beginning ASP.NET 2.0 E-Commerce in C# 2005 From Novice to Professional PHẦN 9 pptx
... OnClick="updateButton_Click" />
Ngày tải lên: 09/08/2014, 14:20
Beginning ASP.NET 2.0 E-Commerce in C# 2005 From Novice to Professional PHẦN 10 potx
... Process(OrderProcessor processor) { // set processor reference orderProcessor = processor; // audit orderProcessor.CreateAudit("PSCheckFunds started.", 20100); try { // check customer funds via DataCash ... request.Transaction.TxnDetails.Amount.Currency = "GBP"; request.Transaction.CardTxn.Method = "pre"; request.Transaction.CardTxn.Card.CardNumber = orderProcessor.Order.CreditCard.CardNumber; request.Transaction.CardTxn.Card.ExpiryDate ... request.Transaction.HistoricTxn.Method = "fulfill"; request.Transaction.HistoricTxn.AuthCode = orderProcessor.Order.AuthCode; request.Transaction.HistoricTxn.Reference = orderProcessor.Order.Reference; // get DataCash...
Ngày tải lên: 09/08/2014, 14:20
Tài liệu Beginning ASP.NET 2.0 in VB 2005 From Novice to Professional ppt
... ■ CHAPTER ■ CHAPTER ■ CHAPTER PART ■ CHAPTER ■ CHAPTER ■ CHAPTER ■ CHAPTER ■ CHAPTER ■ CHAPTER ■ CHAPTER ■ CHAPTER PART ■ CHAPTER ■ CHAPTER ■ CHAPTER ■ CHAPTER ■ CHAPTER ■■■ Introducing the NET ... web service technology Chapter 22 shows how to create a basic web service and use it in a client Chapter 23 shows you how to enhance your web service with caching, security, and transactions Part ... Advanced ASP.NET This part includes the advanced topics you can use to take your web applications that extra step Chapters 24 and 25 cover how you can create reusable components and web controls...
Ngày tải lên: 24/01/2014, 08:20
Beginning Object-Oriented Programming with VB 2005: From Novice to Professional pot
... in creating use case diagrams Click the Create an Actor button (see Figure 2-6) Draw the Actor shape on the design surface Change the name of the Actor shape to Member Figure 2-6 Adding an Actor ... button In the class diagram, click the cMember class to add an attribute Deselect the class by clicking on the design surface, right-click the attribute, and select Modify Change the name to ... • A customer is classified as either a corporate customer or a retail customer • Customers can search for flights based on destination and departure times • Customers can book flights indicating...
Ngày tải lên: 14/03/2014, 23:20
Beginning XML with C# 2008: From Novice to Professional potx
... Button control Double-click the Click Me button to go into its Click event handler Type in the code shown in Listing 1-7 Listing 1-7 Click Event Handler of the Button Control private void button1_Click(object ... XML-based protocol called SOAP (as noted earlier in this chapter, SOAP stands for Simple Object Access Protocol) You can think of a web service as a web-callable component Because a web service is supposed ... using Visual Studio To create a Windows Forms–based application, you need to create a project of type Windows Application To begin creating such a project, click File ➤ New Project from the main menu...
Ngày tải lên: 14/03/2014, 23:20
Beginning XML with C# 2008 From Novice to Professional pdf
... Button control Double-click the Click Me button to go into its Click event handler Type in the code shown in Listing 1-7 Listing 1-7 Click Event Handler of the Button Control private void button1_Click(object ... Document Acme Inc. 12345 Star Wars Inc. 23456 ... XML-based protocol called SOAP (as noted earlier in this chapter, SOAP stands for Simple Object Access Protocol) You can think of a web service as a web-callable component Because a web service is supposed...
Ngày tải lên: 23/03/2014, 03:20
Beginning C# 2008 - From Novice to Professional ppsx
... Form1.cs in the Solution Explorer to display a blank form Then click the Toolbox tab to access the controls Click Button, and then click the form to place the button on the form These steps are ... text box Select the button on the form and double-click it The work area changes to source code, with the cursor in the button_Click function Add this source code to function: TextBox1.text = ... Console.WriteLine() in Class1.cs, you were using functionality from the System reference Right-click References and select Add Reference Click the Projects tab Select Example3, and then click OK Example3...
Ngày tải lên: 04/07/2014, 03:21
Beginning C# 2005 Databases From Novice to Professional phần 1 docx
... CHAPTER s CHAPTER s CHAPTER s CHAPTER s CHAPTER s CHAPTER s CHAPTER s CHAPTER s CHAPTER s CHAPTER s CHAPTER s CHAPTER s CHAPTER s CHAPTER s CHAPTER s CHAPTER s CHAPTER s CHAPTER 10 11 12 13 14 ... License Agreement window appears (see Figure 1-3) Check the check box to accept the license, then click Next Figure 1-3 VCSE End-User License Agreement 777Xch01final.qxd 11/18/06 3:45 PM Page CHAPTER ... since SSE can be installed as part of VCSE installation, let’s it that way VCSE can be downloaded from http:// msdn.microsoft.com/vcsharp/downloads /2005/ Go there and click Download Visual C# 2005...
Ngày tải lên: 09/08/2014, 14:20
Beginning C# 2005 Databases From Novice to Professional phần 2 pot
... there to connect to a large number of data sources, an older data access technology, ODBC, is still there to connect to even older data sources such as dBase and Paradox To access ODBC data sources ... Server\MSSQL.1\MSSQL\Data\northwnd.mdf, and select it Then click Test Connection A message box should appear telling you “Test connection succeeded.” Click OK to close it Click OK to save the connection A northwnd.mdf ... need to call the Open method on the connection To execute the query, you first create a command object, passing its constructor the SQL to run and the connection on which to run it Next, you create...
Ngày tải lên: 09/08/2014, 14:20
Beginning C# 2005 Databases From Novice to Professional phần 3 ppsx
... try block with the following bold code: try { // open connection conn.Open(); // connect command to connection cmd.Connection = conn; Console.WriteLine("Connnected command to this connection."); ... the Connection String in the Connection Constructor In ConnectionSql, you created the connection and specified the connection string in separate steps Since you always have to specify a connection ... associated with each other in any way It’s only when you assign the connection to the command’s Connection property that they become associated: // connect command to connection cmd.Connection...
Ngày tải lên: 09/08/2014, 14:20
Beginning C# 2005 Databases From Novice to Professional phần 4 potx
... sql2; // create connection SqlConnection conn = new SqlConnection(connString); try { // open connection conn.Open(); // create command SqlCommand cmd = new SqlCommand(sql, conn); // create data ... string sql = @" select productname, unitprice, unitsinstock, discontinued from products "; // create connection SqlConnection conn = new SqlConnection(connString); 153 777Xch07final.qxd 154 11/18/06 ... security = true; database = northwind "; // query string sql = @" select contactname from customers "; // create connection SqlConnection conn = new SqlConnection(connString); try { // open connection...
Ngày tải lên: 09/08/2014, 14:20
Beginning C# 2005 Databases From Novice to Professional phần 5 doc
... unitprice from products "; // create connection SqlConnection conn = new SqlConnection(connString); try { // create data adapter SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = new SqlCommand(qry, ... 777Xch08final.qxd 11/18/06 2:44 PM Page 189 CHAPTER s INTRODUCING DATASETS AND DATA ADAPTERS // query string sql = @" select contactname, country from customers "; // create connection SqlConnection ... create connection SqlConnection conn = new SqlConnection(connString); try { // create data adapter SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = new SqlCommand(sql, conn); // create...
Ngày tải lên: 09/08/2014, 14:20