Unit 8.2 Learning Objectives How data can be used – The Money Ball Example The Money Ball Example Data Warehouses – The Role of Data Warehouses The Role.

Slides:



Advertisements
Similar presentations
BASIC SKILLS AND TOOLS USING ACCESS
Advertisements

MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
Accessing Your Data Using Reports, Grids and Queries.
Chapter 9 Customizing Data with Web Controls. ASP.NET 2.0, Third Edition2.
MIS 3200 – Unit 4 Complex Conditional Statements – else if – switch.
Microsoft Office 2010 Access Chapter 1 Creating and Using a Database.
Managing Grades with Excel Viewing Help To view Help 1.Open Excel on your computer. 2.In the top right hand corner of the Excel Screen type in the.
Figure 1. Hit analysis in 2002 of database-driven web applications Hits by Category in 2002 N = 73,873 Results Reporting 27% GME 26% Research 20% Bed Availability.
Customizing Forms and Writing QuickBooks Letters Lesson 15.
Database Updates Made Easy In WebFocus Using SQL And HTML Painter Sept 2011 Lender Processing Services 1.
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
Customizing forms and writing QuickBooks Letters Lesson 15.
ACCESS CHAPTER 1. OBJECTIVES Tables Queries Forms Reports Primary and Foreign Keys Relationship.
Advanced Forms Lesson 10.
Working with a Database
Chapter 1 Databases and Database Objects: An Introduction
Creating a Web Site to Gather Data and Conduct Research.
Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin TECHNOLOGY PLUG-IN T8 DECISION MAKING USING ACCESS.
PHP meets MySQL.
® Microsoft Office 2013 Access Building a Database and Defining Table Relationships.
UNIT 9.2 Learning Objectives A Real world Application of Databases – The Money Ball Example The Money Ball Example Data Warehouses – The Role of Data Warehouses.
UNIT 9.2: Learning Objectives Agile Development – Bruce Feiler on Agile Programming Database access from code – Database Cycle Review – SQL Command Types.
XP New Perspectives on Integrating Microsoft Office XP Tutorial 2 1 Integrating Microsoft Office XP Tutorial 2 – Integrating Word, Excel, and Access.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
McGraw-Hill/Irwin ©2009 The McGraw-Hill Companies, All Rights Reserved Business Driven Information Systems 2e Plug-In T6: Basic Skills and Tools Using.
Lesson 17 Getting Started with Access Essentials
Microsoft Access 2000 Presentation 2 Creating Databases Part I (Creating Tables)
MS-ACCESS BY SANGEETHA PARTHASARATHY Topics to be covered §Comparing Values in Selection Criteria §Calculating Values in a Query §Changing the appearance.
Unit 8.3 Learning Objectives Insert users into the ASP.NET Membership system from code Capture data being sent to the database Capture Exceptions that.
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.
Access Manual 2 By Dhawala Kovuri Elham S.Khorasani Ismail Guneydas.
Press Esc to Exit ©2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in.
® Microsoft Office 2010 Building a Database and Defining Table Relationships.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T6: Basic Skills and Tools Using Access 2010 Business Driven Technology.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
Office Management Tools II Ms Saima Gul. Office Management Tools II Ms Saima Gul.
ASP.NET The Clock Project. The ASP.NET Clock Project The ASP.NET Clock Project is the topic of Chapter 23. By completing the clock project, you will learn.
Analysing Data with Excel Viewing Help To view Help 1.On the Start menu, point to Programs, and then click Microsoft Excel. 2.On the Help menu,
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 15 Advanced Tables.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
McGraw-Hill/Irwin © The McGraw-Hill Companies, All Rights Reserved TECHNOLOGY PLUG-IN T6 Basic Skills Using Access.
Access  Getting Started  Creating Tables  Designing Tables Worksheet #8.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 3 BACKNEXTEND 3-1 LINKS TO OBJECTIVES Modify a Table – Add, Delete, Move Fields Modify a Table.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Reference: “ASP.NET 2.0 Illustrated” by Alex Homer and Dave Sussman. -ch3 illustrated book
Lesson 7 – Microsoft Excel 2010 Working with Tables, PivotTables, and PivotCharts.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
1 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 12 DATABASE DESIGN AND DEVELOPMENT: A VISUAL APPROACH Chapter 12 Accessing.
McGraw-Hill/Irwin © The McGraw-Hill Companies, All Rights Reserved TECHNOLOGY PLUG-IN T8 Decision Making Using Access.
MIS 3200 – Unit 5.1 Iteration (looping) – while loops – for loops Working with List Items.
Modify Tables and FieldsModify Tables and Fields Lesson 4 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft.
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.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
Unit 8.2 Learning Objectives Data Warehouses – The Role of Data Warehouses The Role of Data Warehouses – Group Exercise Accessing Data in Views – Accessing.
Chapter 28. Copyright 2003, Paradigm Publishing Inc. CHAPTER 28 BACKNEXTEND 28-2 LINKS TO OBJECTIVES Table Calculations Table Properties Fields in a Table.
Access Queries and Forms. Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
COMPUTER SKILLS MS-ACCESS. Introduction Access is a piece of software known as a database management system. At its most basic level, it can be used to.
1 Customizing Forms and Writing QuickBooks Letters Lesson 15.
Unit 9.1 Learning Objectives Data Access in Code
Unit 8.1: Introducing Databases
Unit 8.2 How data can be used Accessing Data in Views
Unit 9.2 Database access from code Database Cycle Review
Unit I: Collecting Data with Forms
Unit 9.3 Learning Objectives Review database access in code
MIS 3200 – Unit 6.1 Moving between pages by redirecting
Presentation transcript:

Unit 8.2 Learning Objectives How data can be used – The Money Ball Example The Money Ball Example Data Warehouses – The Role of Data Warehouses The Role of Data Warehouses – Group Exercise Accessing Data in Views – Accessing data in Graphical Web Controls – Working with Templated Data – Working with Hidden Cells – Group Exercise

How Data can be used Example: MoneyballMoneyball Batting average Stolen bases Runs batted in On-base % Slugging % On-base + Slugging (OPS)

Databases Real world Application Money Ball Business Intelligence Microsoft BI, IBM Cognos Database and Query Development Database creation and use MS Visual Web Developer MS SQL Server

Data warehouses Please answer the following questions based on Intricity’s Video on Benefits of a Data Warehouse Intricity’s Video on Benefits of a Data Warehouse 1.What is a Data Warehouse? 2.What is the impact of the fact that databases can take in one row of data at a time? 3.When the video says “You are doing it anyway, what is it talking about?” 4.List any two benefits of data warehousing.

Collections of Rows GridViews and DetailsViews contain a “collection” of Rows Each Row contains a collection of Cells Rows Cells gvFeesdvFee

Locations of Cells DetailsView dvFee – The Fee amount (i.e ) dvFee.Rows[2].Cells[1] GridView: gvFees ( “Select” is Column 0) – The FID of (i.e. 1) is in gvFees.Rows[0].Cells[1] – The Weight Fee (i.e. 12.5) is in gvFees.Rows[2].Cells[3]

Types of Cells: Standard and Templated Standard cellsTemplates Come from DatabaseYes, alwayssometimes Created manuallyNeverAlways in ItemTemplates Data typeStringweb control (e.g. DDL) Used forDisplay, editInsert, display, edit, validation Accessed byCell LocationCell Location + FindControl

Accessing Data in Standard Cells If The cell does NOT contain a CheckBox, and It has NOT been converted to a Template Then Your data is in the Text property of the Cell Example: Otherwise Use the FindControl utility Example: Label lblFees = gvFee.Rows[3].Cells[2].FindControl(“lblFee”)) as Label; Label lblFees = new Label(); lblFee.Text = gvFees.Rows[3].Cells[2].Text;

Basic Templates Guidelines To create/use templates, remember three things 1.Web control type (e.g. Label) 2.Its name (e.g. “lblFeeDescription”), 3.Its location (e.g. in ItemTemplates ). Why use to Templates To add validators To insert new values into the database

To use templated data, convert them directly into labels. Template Example: DetailsView

Hiding data in DetailViews

The Data is NOT where you think it is What is the location of the fee? dvFee.Rows[2].Cells[1] Invisible field is still here

How to tell Examine at the “SelectedFields” window – Fee Description is still the second field (it is row 1) – And the Fee is still the third field (row 2)

Finding Data in GridViews All Data is located in the row selected by the user The SelectedIndex is used to index the row and is -1 if no row is selected

All rows of a GridView Use a special loop called “foreach” – Loops through a collection of rows – One row at a time The collection being looped through The type of object being extracted from the collection

Unit 8 L2 For this exercise we are going to modify your Unit 5 L2 assignment, replacing the fees ListBox with a fees GridView 1.Start by Opening your ASPPub and copying your yournameU5L2.aspx files into the Unit8 folder. 2.Rename the files to yournameU8L2 3.Change the page heading from UNIT 5 L2… to UNIT 8 L2 WORKING GRIDVIEW

Unit 8 L Delete the fees ListBox and put a GridView in its place. Give the GridView the (ID) of gvFees 5.Click on the GridView’s SmartMenu, click the dropdown next to Choose Data Source and select – Select SQL Database and change its ID to sdsFees – Click OK and select the connection you created in U8L1

Unit 8 L2 - 3 – Click Next, select the Fees table and select all the fields individually – Click Next and click Text Query to see the records in the table, then click Finish 6.Apply an Auto Format to the Gridview and change its width to 300px. 7.Select Edit Columns from the GridViews SmartMenu – Select TemplateField from Available Fields and press Add

Unit 8 L2 – 4 – Click the Up Arrow key to move the TemplateField to the top of the Selected fields list – Select FID from Selected fields and change its Visible property to false – Select the FeeDescription field change its HeaderText property to Description Change its Styles, HeaderStyle, HorizontalAlign to Left – Select the Fee field and change its DataFormatString to {0:f2}

Unit 8 L2 - 5 – Click OK and then EditTemplates, you should be looking at your new ItemTemplate Add a CheckBox to the ItemTemplate Change its (ID) to ckbSelect Change its Text to Select End Template Editing – You should have something that looks something like this

Unit 8 L Delete the WHILE loop button and all its associate code (the easiest way to do this may be do double-click the button to get to the code, select all the click method code and delete it, switch back to design view and delete the button) 9.Delete the FOR loop button and all its associate code 10.Double-click the sales tax button and locate and delete the code used in Unit 5 to process the ListBox (leave the lines that calculate the tax and those that write to the Label)

Unit 8 L In place of the ListBox code write a foreach loop to process the GridView rows: – Find the CheckBox. Remember the data type & cast it – Is it Checked? – Locate the Fee and add it to decFees (remember, the invisible FID field still takes up a Cell!) 12.Run the page and try – A sales with no fees – A sales with one or more fees – Check your answers! foreach (GridViewRow gvRow in gvFees.Rows) {

Unit 8 L Once you are sure that your calculations work – Add code to reset the checkboxes This should be a foreach loop that – Locates the CheckBox in the GrideViewRow and – Sets its Checked property to false 14.Test the page with the same data as before to be sure you get the same answers and that the checkboxes are reset – Once you are sure the page works, link it to your MIS3200 profile page and save your complete ASPPub to ASPNET as you have done before – Post a link to your MIS3200 portfolio page in the dropbox

Think About It! A DetailsView and a GridView always look like tables. Think of some applications where you might want to display data in a different way. A FormView shows one record at a time, like the DetailsView, but it isn’t divided into Rows and Cells. How do you think you would access data in a FormView.