Web Application with Dataase

Slides:



Advertisements
Similar presentations
Setup Computer Based Training Launch Reg Manager and Log-in Launch Training Manager Create CBT Program Link Training Material (video, document, seminar,
Advertisements

Setup MOC Auto Reports The MOC Auto Reports provides a method to notify people about the status of MOCs. In some jurisdictions, this step is required.
1 CS 3870/CS 5870: Lab4 Save with Invalid Price Keep Order After Updating.
MS-Access XP Lesson 2. Input Mask Property 1.Field : Phone No Data Type : Number Input Mask : Character 0 represent a single digit and phone.
11 ASP.NET Controls II Beginning ASP.NET 4.0 in C# 2010 Chapter 6.
Working with ASP Pages. Slide 2 The Tag (1) Remember that most ASP.NET pages contain a single tag with the runat attribute set It’s possible to have multiple.
1 Lab Session-6 CSIT-121 Spring 2005 Structured Choice The do~While Loop Lab Exercises.
Adding Controls to User Forms. Adding Controls A user form isn’t much use without some controls We’re going to add controls and write code for them Note.
CS 2340: Programming in VB Instructor: Dr. Qi Yang Office: 213 Ullrich Phone: YangQ 1.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
CS 2340 Programming in VB.NET Instructor: Dr. Qi Yang Office: 213 Ullrich Phone: YangQ 1.
Microsoft Access 2000 Creating Tables and Relationships.
Copyright © 2001 by Wiley. All rights reserved. Chapter 10: Advanced Database Operations Revising Vintage Videos Setting RecordSource at run time DBGrid.
Online Shopping JavaScript project for CS 175 JavaScript for Web Development, Spring 2009 By Sita Akella.
Navigating database with windows forms.. Tiered applications  Provide a means to develop many presentations of the same app  Makes changes to the back.
© Minder Chen, ASP.NET 2.0: Introduction - 1 ASP.NET 2.0 Minder Chen, Ph.D. Framework Base Class Library ADO.NET: Data & XML.
1 CS 3870/CS 5870: Note 11 Authentication and Authorization Membership Provider.
1 CS 3870/CS 5870 Note04 Session Variables and Post Back.
1 CS 3870/CS 5870: Note 13 Lab 6 Authentication and Authorization Roles Management.
1 CS 3870/CS 5870: Note 07 Lab 3 Lab 4 Test 1: Two Tables.
Module 7: Creating a Microsoft ASP.NET Web Application.
More on Tables Open your table in design view Click here!
Windows Forms Navigating database with windows forms.
1 CS 3870/CS 5870: Note05 Prog3 Web Application with Database.
1 Final Review. 2 Final Exam  30% of your grade for the course  December 9 at 7:00 p.m., the regular class time  No makeup exam or alternate times.
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 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.
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.
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.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
JSP in Action. JSP Standard Actions forward, include, useBean, setProperty, getProperty, text, element, and plugin Additional actions param, params,
Beginning ASP.NET in C# and VB Chapter 9
1 Chapter 6: Creating Oracle Data Block Forms. 2 Forms  Application with a graphical user interface that looks like a paper form  Used to insert, update,
1. Prog3 Try and Catch Testing 2 Catching Database Errors Protected Sub DetailsView1_ItemDeleted( sender As Object, e As DetailsViewDeletedEventArgs)
CS 3870/CS 5870 Web Service.
A variable is a name for a value stored in memory.
Unit 9.1 Learning Objectives Data Access in Code
Web Application with Database
CS 3870/CS 5870 Web User Controls.
Decision Structure - 1 ISYS 350.
CS 1430: Programming in C++ No time to cover HiC.
Session Variables and Post Back
Database vs. DBMS Database Database Management System
Tutorial 10 – Class Average Application Introducing the Do…Loop While and Do…Loop Until Repetition Statements Outline Test-Driving the Class Average.
CS 2340: Programming in VB Instructor: Dr. Qi Yang Office: 213 Ullrich
MIS 3200 – Unit 4 Complex Conditional Statements else if switch.
Decision Structure - 1 ISYS 350.
CS 3870/CS 5870 Web User Controls Events (II).
Anatomy of an ASP.NET Page
CS 1430: Programming in C++ No time to cover HiC.
Part A – Doing Your Own Input Validation with Simple VB Tools
CS 3870 Prog5 Shopping Bag.
In Class Programming BIS1523 – Lecture 11.
Decision Structures ISYS 350.
CS 3870 Web User Control Events.
Static and Dynamic Web Pages
© 2016, Mike Murach & Associates, Inc.
Using List Controls with SQL Server
Decision Structure - 1 ISYS 350.
Additional Topics in VB.NET
Adding Record To Your Database
CS 3870/CS 5870 Test 2 (50 points) Thursday
Web Application with Dataase
Decision Structure - 1 ISYS 350.
MIS 3200 – Unit 5.1 Iteration (looping) Working with List Items
MIS 3200 – Unit 2.2 Outline What’s the problem with bad data?
Presentation transcript:

Web Application with Dataase CS 3870/CS 5870: Note06 Prog3 Web Application with Dataase

AutoPostBack Control property Button Textbox Others Default: True Default: False Others Should double check

Page Shopping Property AutoPastBack of Textbox Must be True to fire Textchanged event (When focus leaves the textbox)

Textchanged Event of Textbox txtID ‘ Clear other textboxes id = txtID.Text.Trim Dim row as Data.DataRow row = SQLDataClass.tblProducts.Rows.Find(id) If row Is Nothing Then ‘ not found . . . txtID.Focus() Else ‘ Found txtQuanity.Focus() End If

Textchanged Event of Textbox txtID If row Is Nothing Then ‘ not found Session(“Prog3_ID”) = “” txtID.Focus() Else ‘ Found txtName.Text = row(1) price = row(2) txtPrice.Text = FormatCurrency(price) Session("Prog3_Price") = price Session("Prog3_ID") = id txtQuanity.Focus() End If

Textchanged Event of txtQuantity If Session("Prog3_ID") = "" Then txtID.Focus() Exit Sub End If ‘ Otherwise, need to parse txtPrice or search database price = Session("Prog3_Price") subTotal = quanity * price tax = subTotal * 0.055 grandTotal = subTotal + tax ‘ Display result

DBNull ‘ Page Updating ‘ Procedure DisplayRow ‘ finding the row txtID.Text = row(0) txtName.Text = row(1) txtPrice.Text = FormatCurrency(row(2)) // Description is not required If TypeOf (row(3)) Is DBNull Then txtDescription.Text = "" Else txtDescription.Text = row(3) End If ManageButtons()

Validating Input txtID txtQuantity No need to do it Database will check it txtQuantity Validator No Validator Your choice Prog3 of CS3870 does not use Validator

Grading You will lose 15 points if page Default.aspx cannot access the database. You will lose 10 points if page Updating.aspx or page Shopping.aspx cannot work correctly with the database.

Grading You must follow the Programming Rules

Comment Block For code files only Including Global.asax and SQLDataClass Not for *.aspx or .master files

Programming Rules Your Web pages should be the same as the sample pages.

Prog3 Global.asax Web.config <customErrors mode="Off"/> <compilation debug=“true" targetFramework="4.5"> Price: reject 0 Quantity: accept 0

Test 1 50 points Tuesday (week 5), October 3 Lab 206 2:00 – 4:00 Based on Prog3

Test 1 Grading Cannot display records in GridView: -15 Cannot display individual records: -15 Formatting GridView: 5 points Placing controls: 5 points Checking input: 5 points Help: -5