CS 3870 Prog5 Shopping Bag.

Slides:



Advertisements
Similar presentations
1 CS 3870/CS 5870: Lab4 Save with Invalid Price Keep Order After Updating.
Advertisements

Training Presentation Creating a Shopping Cart. The Home/Shop page is the starting point for creating a shopping cart. To get to the Home/Shop page go.
Working with Session and Application Objects. Postback and Variables Variables declared in a web page including ADO.Net objects may be reinitialized and.
Working with Session. Postback and Variables Variables declared in a web page including ADO.Net objects may be reinitialized and lose their values.
Chapter 3: Develop A Multi-Page Web Application Liu, Jie Professor Department of Computer Science Western Oregon University.
A02 Creating my website NAME ______________. UNIT 2 – A02 – Creating my Website The purpose of this assessment objective is to create 5 web pages containing.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
ASP.NET Part 3 Instructor: Charles Moen CSCI/CINF 4230.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College
ASP.NET Part 4 Instructor: Charles Moen CSCI/CINF 4230.
Beginning Web Site Development Module 1 – Dynamic Web Site Development Fundamentals of building dynamic Web sites with ASP.NET 2.0 and C# Version.
ITS 328 CHAPTER 3: STORING DATA IN MEMORY 1. Storing Data in Memory After today you will be able to: ◦Explain how a DataTable stores data ◦Add new data.
SHOPPING CARTS CHAPTER 19. E-COMMERCE Typically, an e-commerce site will have public pages and admin pages.
BIT 285: ( Web) Application Programming Lecture 14: Thursday, February 19, 2015 SQL Database and LINQ Instructor: Craig Duckett.
Internet Technologies and Web Application Web Services With ASP.NET Tutorial: Introduction to.
1 CS 3870/CS 5870: Note 11 Authentication and Authorization Membership Provider.
Working with GridView Control: Adding Columns. Adding Buttons to a Bound GridView: 1. Drag the WebProduct table from Data connection to a page 2. Demo.
11 Using ADO.NET II Textbook Chapter Getting Started Last class we started a simple example of using ADO.NET operations to access the Addresses.
1 CS 3870/CS 5870 Note04 Session Variables and Post Back.
Working with the Application Object. Session VS Application Object The Session object helps to preserve data on a per user basis. What if we want to initialize.
1 Project 3: Chomp (Not graded). 2 Project 3 The game of Chomp was described in a Math Trek column in Science News:
Global.asax file. Agenda What is Global.asax file How to add the Global.asax file What are the default events available Explanation to Application_Level.
1 CS 3870/CS 5870: Note 13 Lab 6 Authentication and Authorization Roles Management.
Dynamic Dropdown Lists 1. Objectives You will be able to Use Dropdown Lists to solicit multiple choice user input in an ASPX web page. Populate a Dropdown.
1 CS 3870/CS 5870: Note 07 Lab 3 Lab 4 Test 1: Two Tables.
Website Security ISYS 512. Authentication Authentication is the process that determines the identity of a user.
 Page_Init  Page_Load  cmdINew_Click  cmdISave_Click  cmdIDelete_Click  cmdISubmit_Click  cmdIClear_Click  gridLineItem_RowEditing  gridLineItem_RowDeleting.
1 CS 3870/CS 5870: Note05 Prog3 Web Application with Database.
CSCI 6962: Server-side Design and Programming JSF DataTables and Shopping Carts.
CSCI 4230 Homework #3 Group Three Samer Al Jefri * Kevin Odom * David Hood * JD * Phil.
ASP.NET - insert - delete -update DataTables (disconnected datasets) Shopping Basket.
1 CS 3870/CS 5870: Note 20 Web Service. 2 What is Web Service? Providing functionality online to other applications, Web and Windows applications. The.
1 CS387/CS587: Note 08 Shopping Bag DataTable. 2 DataClass Public Shared Function NewShoppingBag() As Data.DataTable Dim bag As New Data.DataTable bag.Columns.Add("Product.
1 CS387/CS587: Note05 Lab 3. 2 Global.asax Must not be under any sub-folder Application_Start Application_End Application_Error Session_Start Session_End.
1 CS 3870/CS 5870: Note 12 Authentication and Authorization Membership Provider.
1.NET Web Forms ADO.NET Structure © 2002 by Jerry Post.
1 CS 3870/CS 5870: Note 16 Web User Controls. Prog 7 Copy Prog6 to Prog7 Modify all files for Prog7 Remove Web.config from sub-folders Make sure Prog7.
1 CS387/CS587: Note04 Lab 3. 2 Master Page All Web pages will be similar Should be created before other web pages Add New Items Controls on the Master.
CSCI 4230 Homework #3 Group Three Samer Al Jefri * Kevin Odom * David Hood * JD Wells * Philippe Gambling.
1 CS 3870/CS 5870: Note 13 Web Service. 2 What is Web Service? Providing functionality online to other Web applications SOAP Simple Object Access Protocol.
1 CS 3870/CS 5870: Note 14. Prog5 Due 10 PM Wednesday, Oct 21 Authentication and Authorization 2.
1 CS 3870/CS 5870: Note07 Prog 4. Master Pages Creating a master page based on another master page MainMasterPage –For all Progs and Tests Prog4MasterPage.
1111 Creating ASPX Controls Programatically Objectives You will be able to Dynamically add controls to a page. Dynamically alter properties of controls.
Data tastes like chicken, if chicken was data.. Databinding What is it? Associating a set of data with a control Why use it? Its much easier than associating.
1 Project 4 Address Lookup. Project 4 Write an ASP.NET app that permits users to retrieve addresses from a potentially large list of addresses. There.
11 User Controls Beginning ASP.NET in C# and VB Chapter 8.
Creating a Web Site Creating a new Web site Defining and using folders Creating and editing Web pages Viewing pages in a Web browser.
Trick #1: Post Pictures in Discussion Board Blackboard Tips & Tricks Barbara Dent and Susan Beasley Thomas Jefferson High School for Science and Technology.
1. Prog3 Try and Catch Testing 2 Catching Database Errors Protected Sub DetailsView1_ItemDeleted( sender As Object, e As DetailsViewDeletedEventArgs)
Windows 7 Ultimate To Load Click Simulation PPSX
Authentication and Authorization
CS 3870/CS 5870 Web Service.
© 2016, Mike Murach & Associates, Inc.
Web Application with Database
CS 3870/CS 5870 Web User Controls.
Session Variables and Post Back
Web Application with Dataase
How to Create a Simple Web Service and Use it in ASP.Net
ASP.NET and ADO.NET.
CS 3870 Prog6 Roles Management Due Monday, November 5 Group Assignment.
CS 3870/CS 5870 Web User Controls Events (II).
CS 3870 Web User Control Events.
Static and Dynamic Web Pages
CS 3870/CS 5870 Test 2 (50 points) Thursday
Web Application with Dataase
Your Presentation Name
Working with Session and Application Objects
A02 Creating my website NAME ______________.
5/6/2019 Session 8.2 Postback, ViewState
Shopping Cart Demo.
Presentation transcript:

CS 3870 Prog5 Shopping Bag

Prog 5 MainMasterPage Prog5MasterPage same as Prog4 Create a new master page

Prog 5 New folder Prog5 New pages Default.aspx Updating.aspx Shoppin.aspx Checkout.aspx Then could copy content from Prog4 Modify as necessary

Prog 5 Do them after Shopping Bag is completed Main Web Site folder Login.aspx CreateUser.aspx UserName: csse cs3870@UWP Do them after Shopping Bag is completed

New Page Checkout Maintain a shopping bag for each session Add items into the shopping bag when shopping GridView to display all items in the shopping bag on checkout Clear the bag when checkout

Shopping Bag Your Choice DataTable ArrayList New class: in folder App_Code . . .

Shopping Bag: Using DataTable // SQLDataClass using System.Data; public static DataTable NewShoppingBag() { DataTable table = new DataTable(); table.Columns.Add("ProductID"); table.Columns.Add("ProductName"); table.Columns.Add("Quantity"); table.Columns.Add("UnitPrice"); table.Columns.Add("Cost"); table.PrimaryKey = new DataColumn[] { table.Columns[0] }; return table; }

Global.vb void Session_Start(object sender, EventArgs e) { //Prog5 Session["Prog5_Bag"] = SQLDataClass.NewShoppingBag(); }

Page Shopping //New Button “Add to Shopping Bag” //Adds the last calculated item to the shopping bag. protected void btnAddToBag_Click(object sender, EventArgs e) { DataTable bag = (DataTable) Session["Prog5_Bag"]; DataRow row = bag.NewRow(); row[0] = txtID.Text; row[1] = txtName.Text; row[2] = txtPrice.Text; row[3] = txtQuantity.Text; row[4] = txtSubTotal.Text; DataRow oldRow = bag.Rows.Find(row[0]); if (oldRow != null) bag.Rows.Remove(oldRow); bag.Rows.Add(row); . . . }

Page Checkout protected void Page_Load(object sender, EventArgs e) { GridView1.DataSource = (DataTable)Session["Prog5_Bag"]; GridView1.DataBind(); }

Page Checkout protected void btnCheckout_Click(. . .) { // End the current session // will clear all session variables Session.Abandon(); // Logout of Membership FormsAuthentication.SignOut() // Go to Login.aspx // Response.Redirect("~/Login.aspx"); Response.Redirect(FormsAuthentication.LoginUrl); }