alexctk's picture From alexctk rss RSS  subscribe Subscribe

DataBinding VS2005 v2 



 
Views:  8899
Downloads:  59
Published:  June 12, 2007
 
2
save to favorite
ask author to add audio Ask author to add audio
Share plick with friends Share
mark as inappropriate Mark as inappropriate
 
Related Plicks
Ajax In .NET

Ajax In .NET

From: gavi
Views: 1461 Comments: 0
Ajax In .NET
 
统计复习(Statistic review)

统计复习(Statistic review)

From: wdilliam
Views: 1936 Comments: 0
Statistic review
 
Presentation Webparts

Presentation Webparts

From: emily
Views: 2695 Comments: 0

 
Windows Smart Client Applicaton (vs2005)

Windows Smart Client Applicaton (vs2005)

From: alexctk
Views: 2771 Comments: 0

 
inside flash kr

inside flash kr

From: emily
Views: 958 Comments: 0
What is the essence of Flash?
That is, what are the key values that led to the product’s extraordinary success?

Flash is

f (more)

 
See all 
 
More from this user
CHINA

CHINA

From: alexctk
Views: 9722
Comments: 0

WhatIsaStock

WhatIsaStock

From: alexctk
Views: 969
Comments: 0

The Next Programming Language

The Next Programming Language

From: alexctk
Views: 789
Comments: 0

disruptive

disruptive

From: alexctk
Views: 936
Comments: 0

1027 Windows FormsNETFrameworkCl ass Library2

1027 Windows FormsNETFrameworkClass Library2

From: alexctk
Views: 1591
Comments: 0

Windows Smart Client Applicaton (vs2005)

Windows Smart Client Applicaton (vs2005)

From: alexctk
Views: 2771
Comments: 0

See all 
 
Place your Ad here for $2.00 a month
SalesForce CRM
Leader in on-demand Customer Relationship Management. Full Featured CRM starting at $65/user/month.
 
 
 URL:          AddThis Social Bookmark Button
Embed Thin Player: (fits in most blogs)
Embed Full Player :
 
 

Name

Email (will NOT be shown to other users)

 

 
 
Comments:
 
 
Notes:
 
 
Slide 1: 建置高效能 Windows 表單 資料存取程式 許薰尹 技術經理 精誠資訊恆逸教育訓練中心
Slide 2: 議程大綱 ADO.NET 2.0 概覽 Visual Studio 2005 資料存取工具 資料繫結技巧 非同步處理機制 結論
Slide 3: 新的資料存取 控制項 BindingNavigator BindingSource DataGridView 新的 IDE 功能 DataSources 視窗 DataSet Designer Smart Tags Data Wizards SQL Server 2005 批次更新 資料異動通知 MARS 資料存取的創新 ADO.NET 2.0 DataSet 的 Binary remoting 選擇 DataTable 擁有如 DataSet 操作能力 非同步資料存取 ADO.NET 2.0 Providerindependent API Provider Factory XSLT Edit/Debug XQuery 模型上沒有 任何變動
Slide 4: .NET 中的資料存取技術 ADO.NET 2.0 概覽
Slide 5: ADO.NET 2.0 概覽 DataSet DataTableCollection .NET Data Provider Connection Transaction DataAdapter SelectCommand InsertCommand UpdateCommand DeleteCommand DataTable DataRowCollection DataColumnCollection Command Parameters ConstraintCollection DataReader DataRelationCollection XML Database
Slide 6: ADO.NET 2.0 命名空間 System Data Common ODBC OLEDB OracleClient Sql SqlClient SqlServerCe SqlTypes Xml
Slide 7: DataSet DataSet 增進效能與延展性 對大量資料的 DataSet 效能明顯提升 支援 Binary serialization Tables Table Columns Column Constraints Constraint Rows Row Relations Relation Object Collection 可序列化 DataTable 整合 DataReader 從 DataReader 載入 資料 從 DataTable 建立 DataReader
Slide 8: ADO.NET 2.0 新功能 伺服器列舉能力 非同步資料處理 批次更新與資料分頁 一個批次作業,更新多筆紀錄 使用 DataAdpater 的 UpdateBatchSize 屬性 增強 DataSet 功能 增強 Provider API 功能 .NET Data Provider Enumeration Provider Independent API Schema Discovery
Slide 9: ADO.NET 2.0 新功能 SqlClient 專屬 MARS ( 多作用中結果集 ) 大量資料複製 (Bulk Copy) 支援 Max 資料型別 支援 使用者自訂型別 (UDT) 資料庫資料更新通知機制 Snapshot Isolation 交易機制 資料庫鏡射 (Database Mirroring) 支援 SQLXML 3.0 資料提供者統計資訊 (Provider Statistics) 更具安全性的密碼變更策略
Slide 10: ADO.NET 2.0 增強新功能
Slide 11: Visual Studio 2005 資料存取 IDE 工具
Slide 12: 全新的 IDE 工具 新的資料存取視窗與對話盒 Data Source Window Data Preview Dialog 提供新的資料存取精靈 Data Source Configuration Wizard TableAdapter Configuration Wizard TableAdapter Query Configuration Wizard 改良版的設計師 DataSet Designer
Slide 13: Data Sources 視窗 可以拖曳欄位建立畫面 可以選取欲使用的 UI 控制項 建立 DataGridView 控制項 建立個別的控制項 拖曳欄位至表單將產生 : DataSet, TableAdapter, BindingSource BindingNavigator 以及 nav/add/delete/save controls Bound control(s)
Slide 14: 資料來源選項 資料庫 (DataSet) 任何 ADO.NET 資料來源 Web 服務 繫結到 Web Service 參數化的方法,以查詢、 更新、刪除和新增資料 物件 (Object) 繫結到類別的實體
Slide 15: Data Preview 視窗 預覽 Typed DataSet 中的資料 支援 Design-time 編輯能力 更節省時間 使用 Typed FillBy 方法
Slide 16: 具型別資料集增強功能 具型別資料集 (Typed DataSet) 包含 DataTables, Relations, Constraints 支援從伺服器總管 (Server Explorer) 視窗拖曳能力 以 XML schema 與程式碼後置類別為基礎 分離程式設計師的程式和工具自動產生的程式 NorthwindDataSet.vb ( 設計師的程式 ) NorthwindDataSet.Designer.vb ( 工具自動產生 ) Partial class 避免覆蓋程式碼 增強延展性 新增 TableAdapter 封裝 DataAdater 與 Connection,Command 可視為 Typed DataAdpater
Slide 17: TableAdapters 強型別的標準 DataAdapter Table + DataAdpater = TableAdapter 可以包含查詢 ( 提供方法以進行 selects, updates, inserts, deletes) 查詢以 DataSet 的方法形式存在 擁有 DBDirect 方法 提供 ADO.NET Command 物件和連線模型的 存取 擁有 Connection 屬性 連線字串通常儲存在組態檔
Slide 18: TableAdapter 資料互動模型 TableAdapter 資料庫 Data connection Data adapter Data command collection .Update(col1, col2, …) as Int .Insert(col1, col2, …) as Int .Delete(pkCol1, [pkCol2]) as Int .Fill(DataTable, [param]) as Int .FillByName(DataTable, fName) as Int .GetData([param]) as DataTable .GetByName(fName) as DataTable .Update(DataSet) as .Update(DataTable) Int Typed DataSet XML
Slide 19: 資料繫結 單向—自動將資料關聯到控制項顯示 設定相關屬性 不需手動處理 雙向—自動處理控制項中資料的變更 從控制項 (Control) 寫回資料來源 不需手動處理檢查資料的變更 .NET 支援 提供更多 Web 與 Windows 控制項 內建在基礎 Control 等級,可繼承加以衍生 介面等級
Slide 20: 資料繫結 多筆紀錄資料繫結 單一值資料繫結 Red Bike ProductID 1 2 Name Red Bike Blue Bike Price 299.99 299.99  Discontinued?
Slide 21: Data Source 組態精靈 簡單的資料繫結範例
Slide 22: 新的資料繫結模型 新增、及增強的元件和控制項 具型別資料集 (Typed DataSet) Data Component ( 概念上 ) 包含 DataTable, TableAdapter, TableAdpater Query 可以利用 DataSet Designer 建立及編輯 BindingSource 元件 BindingNavigator Smart Tag
Slide 23: BindingSource 元件 扮演控制項和真正資料來源兩者之間的中 介者 設計時期 CurrencyManager 支援 Objects Web Services DataSets DataSource, DataMember 屬性 指向 Typed DataSet, DataTable
Slide 24: BindingSource 功能 簡化 currency manager 與 binding context 提供功能 排序,分頁,條件過濾 自動產生資料載入、新增、刪除程式碼 可結合 BindingNavigator 瀏覽資料 預設就會新增 BindingNavigator 可以自訂 提供 Filter, Sort 屬性
Slide 25: BindingNavigator 搭配 BindingSource 以瀏覽、或維護資料 和 舊版 VB data control 不同 擁有 UI 元件 特殊的 toolstrip 可以自訂 關聯到 ToolStrip 控制項的成員可進行特 殊的行為 DeleteItem = bindingNavigatorDeleteItem (ToolStripButton)
Slide 26: 簡單資料繫結 (SimpleBinding) 單一資料的資料繫結 間接繫結 控制項的某一屬性繫結到 BindingSource 的成 員 BindingNavigator.BindingSource = BindingSource 直接繫結 建立 Binding 物件,並加到控制項的 DataBindings 集合 EX: 將 CustomerID 欄位繫結到 TextBox 的 Text 屬性
Slide 27: 複雜資料繫結 (Complex Binding) 多筆紀錄的資料繫結 間接繫結 BindingSource DataGridView.DataSource = BindingSource 直接繫結 DataSet/DataTable/DataView/Object Collection/Objects 設定 DataSource,DataMember, DisplayMember, ValueMember EX: 將 Customer 資料表繫結到 DataGridView 控制項
Slide 28: 資料繫結運作方式 Column DataSource Complex Control Simple Control DataTable Property DataBinding DataMember BindingSource DataSource BindingNavigator DataSet BindingSource Changes control contents via navigation, maintenance
Slide 29: 拖曳繫結 可以變更繫結的控制項 建立 list/lookup binding DisplayMember ValueMember SelectedValue Use of SmartTag More Smart Defaults 圖片繫結
Slide 30: 拖放繫結 (Drag and Drop Binding ) 與圖片繫結
Slide 31: Master-Detail 資料繫結 繫結到子資料列 使用 Typed DataSet Relations/Foreign Keys 當做資料來源 利用拖曳技術輕鬆達成資料繫結 拖曳到子資料表,建立資料繫結
Slide 32: DataSet Designer 特色 以視覺化方式設計 DataSets 利用拖曳能力建立關聯 (relationships) 不須要再使用 XSD editor 利用 Property sheet 設定屬性 自動根據資料庫的定義建立關聯
Slide 33: DataSet Designer 特色 可以設計 Typed DataAdapters 自動產生 Fill 方法 可以建立多個 Fill 與 Get 方法 對應到查詢以及預存程序 使用 Add Query 新增自訂查詢 利用 Partial Class 增加 DataSet 延展能力 新增自訂驗證邏輯 不須繼承或變更產生的程式碼
Slide 34: Master-Detail Binding
Slide 35: 查詢 在 TableAdapter 中新 增查詢 利用 Search Criteria Builder 建立條件式查 詢 支援參數化查詢
Slide 36: 新增查詢
Slide 37: 智慧型預設值設定 設定控制項名稱 Control names Label 標題 使用 Typed DataSets 中欄位的 Caption 屬 性控制標題 自動將 Typed DataSet 和 DataTable 加到工 具箱
Slide 38: 下拉式選單繫結
Slide 39: 自訂控制項繫結 簡單控制項 / 繼承 組合式控制項 組態 Data Sources window 以支援控制項 加到工具箱 控制項需實作新的 data binding 屬性 (Attribute) DefaultBindingPropertyAttribute ComplexBindingPropertiesAttribute LookupBindingPropertiesAttribute
Slide 40: 自訂控制項繫結
Slide 41: 物件繫結 (Object Binding) 繫結到單一物件 繫結到 BindingList<t> 允許新增 : BindingSource 與 BindingList<t> 上的 AddingNew 事件 支援 Master-Detail 資料繫結 設計方式 指向包含型別定義的組件 從組件中選取型別 顯露 Public 屬性以進行資料繫結
Slide 42: 物件繫結
Slide 43: Web Service 繫結 繫結到 Web Service 回傳型別 將既有的或新增的 Web 參考型別自動地 新增到 Data Source 設計方式 新增 Data Source- 選取 Web Service 項目 啟動 Add Web Reference 精靈 從 Web Method 萃取回傳型別 在專案中建立 Web 參考 將 Web Method 回傳型別以物件方式顯露以進 行資料繫結
Slide 44: Web Service 繫結
Slide 45: 客製化 DataGridView 顯示文字 , 圖片 , 按鈕 , 超連結… . 以方格為基礎 (Cell-based) 非 row-based Cell 將會自動繼承樣式 ( 字型 , 顏色 , 格式 ) Cell 等級的事件處理如 Mouse 事件
Slide 46: 設計時期設定樣式 可以不使用程式碼設定樣式 變更 cell-style 屬性 Alignment Color Formatting Font 可以自訂 cell styles 根據內容 支援漸層繪圖
Slide 47: 設計時期設定樣式 欄位凍結 設定屬性 可以多個欄位 執行時期重新定位 設定屬性 將欄位拖曳到新位置 (ALT+Click)
Slide 48: 設計時期設定樣式 支援 Windows themes 自動變更 使用內建的 themes 使用自訂的 themes Row 與 column 選取模式 利用點選方式選取 row 或 column 不需額外程式碼
Slide 49: DataGridView 控制項
Slide 50: 進階議題 驗證與 ErrorProvider 整合 使用 DataSet partial 類別提供驗證動作 使用 e.Row.SetColumnError 設定錯誤,不要丟 出例外 自行實作 IDataErrorInfo 資料繫結支援格式化 , Null 等支援
Slide 51: 資料驗證與 ErrorProvider 整合
Slide 52: Windows Forms 2.0 非同步存取技術
Slide 53: 非同步資料存取 Client 應用程式 避免使用者介面 停滯 反應速度變快 避免等待 DB4 增進升產力 應用程式將具使 用者親和力 DB3 DB1 DB2
Slide 54: 非同步資料存取實作 降低複雜度 更抽象 程式設計師倍覺親切 非同步資料存取 控制項支援非同步機制 .NET WebClient 非同步處理類別 Background worker 元件 (RAD 非同步 ) Web Service 非同步機制 ADO.NET 非同步執行模型
Slide 55: BackgroundWorker Form(UI) BackgroundWorker WorkCompleted() BackgroundWorker ProgressChanged Event() BackgroundWorker RunWorkerAsync() BackgroundWorker ReportProgress() UI Thread 自動從 TreadPool Hook BackgroundWorker DoWork() Method 取得執行緒 不允許更新 UI…
Slide 56: 非同步存取能力
Slide 57: 總結 ADO.NET 大幅增加資料存取效能 新的資料繫結能力幫助快速建立程式 輕鬆透過 DataGridView 客製化資料展現 簡化非同步程式撰寫
Slide 58: http://www.microsoft.com/taiwan/msdn

   
Time on Slide Time on Plick
Slides per Visit Slide Views Views by Location
close
Please fill out the form below. You will be asked to make your payment to Myplick (Eastar Technologies) via Paypal. Your request will be processed within 24 hours after your submission.
 
Title (max 25 characters)
Link (placed on title)
Content (max 100 characters)
You have successfully submitted your ad request. Please send your payment to ericandlei@myplick.com via PAYPAL.
Ad submission failed. Please report the problem to ericandlei@myplick.com.