TAILIEUCHUNG - Professional ASP.NET 1.0 Special Edition- P45

Professional Special Edition- P45:Those of us who are Microsoft developers can't help but notice that .NET has received a fair amount of visibility over the last year or so. This is quite surprising considering that for most of this period, .NET has been in its early infancy and beta versions. I can't remember any unreleased product that has caused this much interest among developers. And that's really an important point, because ignoring all the hype and press, .NET really is a product for developers, providing a great foundation for building all types of applications | if ProductCode null GetCustomerID ProductCode PopulateShoppingCartList UpdateSelectedItemStatus The Productcode parameter is optional because the shopping cart can also be displayed by clicking on the shopping cart symbol shown in the navigation bar. If this is the method by which the page is accessed then we don t want to add any items to the shopping cart. The CustomerlD function used here returns the unique ID for the current customer which is then passed as a parameter to the AddShoppingCartltem function. If the customer has not registered and logged in the ID returned by the CustomerlD function is the current session ID otherwise it is the current user name String GetCustomerID if return else if Session AnonUID null Session AnonUID return Session AnonUID .ToString The implementation of the AddShoppingCartItem method of the CartDB business object is worth reviewing at this point because it contains two interesting sections of code public void AddShoppingCartItem string customerName string productcode DataSet previousItem GetShoppingCartItem customerName productcode if 0 . 0 UpdateShoppingCartItem int 0 .Rows 0 ShoppingCartID int 0 .Rows 0 Quantity 1 else products products new m_ConnectionString DataSet productDetails productCode String description String 0 .Rows 0 ProductDescription String productName String 0 .Rows 0 ProductName double unitPrice double 0 .Rows 0 UnitPrice String insertStatement INSERT INTO ShoppingCarts ProductCode ProductName Description UnitPrice CustomerName Quantity values productCode @productName @description unitPrice customerName 1 SqlConnection myConnection new SqlConnection m_ConnectionString SqlCommand myCommand

TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
260    8    0    09-08-2020
2    7    0    09-08-2020
3    5    0    09-08-2020
7    6    0    09-08-2020
25    4    0    09-08-2020
TÀI LIỆU LIÊN QUAN
19    16    0
182    15    0
138    6    0
3    7    0
142    12    0