CST238 Week 7 Questions / Concerns? Announcements – HW#2 due today (project concept/preliminary design) – Check-off Take Home lab#6 Friday is the last.

Slides:



Advertisements
Similar presentations
1 Northwind Traders Order Entry. 2 Northwind Traders Call Center Add an Order Entry capability to the Northwind Traders Call Center application. Start.
Advertisements

VB List(Of type) A List can be thought of as an array that automatically adjusts its size as elements are added and removed A List may hold only objects.
Information System Design Lab 5&6. User Interface Design.
And so to Code. Forward, Reverse, and Round-Trip Engineering Forward Engineering Reverse Engineering Round-Trip Engineering.
CST238 Week 8 Questions / Concerns? Announcements – Check-off Take Home lab#7 GUI Bloopers presentations (#5) New topics – Printing Richtext box Graphics.
Chapter 14.3 LINQ to SQL Programming in Visual Basic 2010: The Very Beginner’s Guide by Jim McKeown Databases – Part 3.
ASP.NET Data Binding. Slide 2 Lecture Overview Understanding the ASP.NET data binding model.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Programming Based on Events
Introduction to ADO.Net, VB.Net Database Tools and Data Binding ISYS 512.
Customizing Outlook. Forms Window in which you enter and view information in Outlook Outlook Form Designer The environment in which you create and customize.
Introduction to ADO.Net and Visual Studio Database Tools ISYS 512.
Introduction to ADO.Net, VB.Net Database Tools and Data Binding ISYS 512.
From VS C# 2010 Programming, John Allwork 1 VS2010 C# Programming - DB intro 1 Topics – Database Relational - linked tables SQL ADO.NET objects Referencing.
Some Basic Database Terminology
Object Oriented Design and UML
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
Introduction to ADO.Net and Visual Studio Database Tools ISYS 512.
1 Lesson 6 — Database Programming Microsoft Visual Basic.NET, Introduction to Programming.
Doncho Minkov Telerik School Academy academy.telerik.com Technical Trainer
CS&E 1111 AcQueries Writing Simple Queries in Access Displaying on specific data fields Filtering data using criteria Objectives: Learn how to use the.
CST238 Week 6 Questions / Concerns? Announcements – HW#2 due next Monday (project concept/preliminary design) – Check-off Take Home lab#5 Comment about.
BIM313 – Advanced Programming Techniques Object-Oriented Programming 1.
DEV397 Windows Forms Databinding Mike Henderlight Program Manager Windows Forms Microsoft Corporation.
Neal Stublen Populating a Database  SQLExpress should be installed with Visual Studio  The book provides a.sql file for populating.
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.
Arrays Part 9 dbg. Arrays An array is a fixed number of contiguous memory locations, all containing data of the same type, identified by one variable.
Object Oriented Software Development 9. Creating Graphical User Interfaces.
Introduction to Building Windows 8.1 & Windows Phone Applications.
Using Adapter Wizard ISYS 512. Data Adapter Wizard – 2 nd Level of Using ADO.Net Configure Data Adapter and generating a dataset: –From the Data tab of.
Discover, Master, Influence1 Windows Presentation Foundation David Burela Senior Developer, Readify.
Chapter Thirteen Working with Access Databases and LINQ Programming with Microsoft Visual Basic th Edition.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
Windows Presentation Foundation (WPF). Introduction Separates appearance of user interface from behavior Appearance usually specified by XAML Behavior.
Data Binding with Tabular Data Control. Objective To understand Dynamic HTML data binding. To be able to sort and filter data directly on the client without.
Introduction to ADO.Net and VS Database Tools and Data Binding ISYS 350.
Module 8: Creating User Controls. Overview Adding User Controls to an ASP.NET Web Form Creating User Controls.
AVCE ICT – Unit 7 - Programming Session 16 – Database and VB.
1 OOP - An Introduction ISQS 6337 John R. Durrett.
DataBinding. Objectives List and explain the types of binding. Explain Binding Context and CurrencyManager class. List and explain the properties and.
Databases and ADO.NET Programming Right from the Start with Visual Basic.NET 1/e 11.
ASP.NET Data Binding. Slide 2 Lecture Overview Understanding the ASP.NET data binding model.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
Understand Databound Controls Windows Development Fundamentals LESSON 4.2A.
The Windows Forms DataGrid A Complex-Bound.NET GUI Control Mike FITZSIMON SYSTEMSARCHITECT F ITZSIMON IT C ONSULTING PTY LTD.
Introduction to ADO.Net and Visual Studio Database Tools ISYS 350.
Flash Remoting From CF Using ColdFusion MX and Flash MX to create an efficient and user friendly interface.
0 Copyright 2012 FUJITSU Interstage BOP SQL Query Tutorial Todd Palmer October 2012.
Chapter 9 Working with Databases. Copyright © 2011 Pearson Addison-Wesley Binding to ListBox and ComboBox Controls List and combo boxes are frequently.
COMPUTER PROGRAMMING I Apply Procedures to Develop List Box and Combo Box Objects.
Presented by Alexey Vedishchev Developing Web-applications with Grails framework American University of Nigeria, 2016 Form Submission And Saving Data To.
Data Binding, Binding Properties Doncho Minkov Telerik School Academy Technical Trainer
Adam Schultz MVVM and WPF. MVVM Model, View, ViewModel A software architecture designed to separate out User Interface design, Business Logic, and Data.
Writing Simple Queries in Access
In Windows 8 Store Applications
Chapter 9 Programming Based on Events
Computing with C# and the .NET Framework
Creative Databinding With Delphi 8 for .NET
Module 5: Common Type System
Avalon – Using Data In Your Applications
Lecture Set 10 Windows Controls and Forms
How to work with bound controls and parameterized queries
Using List Controls with SQL Server
Web Development Using ASP .NET
Working With Databases
Chapter 10 Accessing Database Files
Class Diagram.
Data Structures and ADTs
Introduction to ADO.Net and Visual Studio Database Tools.
Presentation transcript:

CST238 Week 7 Questions / Concerns? Announcements – HW#2 due today (project concept/preliminary design) – Check-off Take Home lab#6 Friday is the last day to withdraw from class. GUI Bloopers presentations (#3&#4) New topics – Data Binding Coming up: – GUI Presentation #5 & #6 next Monday – WPF vs Windows Forms – Work on Final Project Take Home Lab#7

Why Data Binding? Windows Forms Problem – There is no clear separation of user interface and data. – Controls and data are tightly coupled. Data binding doesn’t address this problem of tightly coupled UI and data, but it saves programmers some work: – Don’t have to write code to move data in and out of controls.

Data Binding One-way: Automatically populating controls with data – Set a few properties Two-way: Automatically propagating changes to data – From control to data source

Data Binding Core capability of.NET controls – Web and Windows – Built in at base Control level Interface-based – An interface contains only the signatures of methods, properties, or events.methodsproperties – A class or struct that implements the interface must implement the members of the interface that are specified in the interface definition.

Data Binding Simple data binding Bind a single value from a data collection to a single control property Ex: customer name to Text property on Textbox Complex data binding Bind collection of data to control that presents multiple values from collection Ex: customers table in grid, customer name values in combo box.

Data Binding Simple data binding – Create a Binding object – Add to DataBindings collection of control Complex data binding – Set data source – Set data member – DisplayMember and ValueMember for ComboBox and List Box controls

C#: Fields & Properties of an object Fields – Internal data / state of an object. (ex. age) – Fields should not be public. – How do you access the field then? Through methods (GetAge, SetAge) Method – Behavior. – Getters/setters are not really behavior though. Property – Another way to access the field

C#: Property class Student { private int age; //private field public int Age //Public property { get {return age;} set { age = value;} }… Student aStudent = new Student(); aStudent.age = 35; aStudent.Age = 35; //value is 35 if (aStudent.Age == 35) …

C#: Property class Student { private int age; //private field public int Age //Public property { get {return age;} set { age = value;} }… public int Age {get; set;}

Simple Data Binding Binding object which binds control properties to object properties. aStudent = new Student("Smith", "Gail", " ", true); LastnameBox.DataBindings.Add("Text", aStudent, "Lastname"); FirstnameBox.DataBindings.Add("Text", aStudent, "Firstname"); IDBox.DataBindings.Add("Text", aStudent, "ID"); RegisteredCheckbox.DataBindings.Add("Checked", aStudent, "Registered"); aStudent Lastname Smith Firstname Gail ID Registered true

Simple Data Binding Binding object which binds control properties to object properties. aStudent = new Student("Smith", "Gail", " ", true); LastnameBox.DataBindings.Add("Text", aStudent, "Lastname“, true, DataSourceUpdateMode.OnPropertyChanged); FirstnameBox.DataBindings.Add("Text", aStudent, "Firstname“, true, DataSourceUpdateMode.OnPropertyChanged); IDBox.DataBindings.Add("Text", aStudent, "ID“, true, DataSourceUpdateMode.Never); RegisteredCheckbox.DataBindings.Add("Checked", aStudent, "Registered“, true, DataSourceUpdateMode.OnPropertyChanged); Lastname Smith Firstname Gail ID Registered true

Complex Data Binding Bind a collection of data to a control Collection must implement IList or IListSource interface Student Major List demo – Tab Control – Combo box & binding DisplayMember (MajorName object property), ValueMember (MajorCode object property) DataSource – Listbox, query & binding DataSource, DisplayMember – Datagrid view DataSource

Take-Home Lab #7 Create a Category class with 2 properties: – CategoryID (int) – CategoryName (string) Create a Product class with 4 properties: – ProductName (string) – CategoryID (int) – Unit Price (float) – OnSale (bool)

Take Home Lab #7 Create a form: – Combo box to show the list of product categories – Listbox to show the products – Textboxes and checkbox bound to selected product.