1 / 28

LESSION 6 資料整合 Integrating Data

LESSION 6 資料整合 Integrating Data. 鄧姚文. 課程目標. 控制應用程式的執行. 6.1 了解在視窗應用程式內的資料 6.2 使用視窗表單內的資料 6.3 在 WPF 內使用資料. 6.1 了解在視窗應用程式內的資料. 簡介 ActiveX Data Objects (ADO.NET) 一致性的方法藉由位於 System.Data 命名空間內的 ActiveX Data Objects (ADO.NET) 來存取不同來源的資料 。

tass
Download Presentation

LESSION 6 資料整合 Integrating Data

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LESSION 6資料整合Integrating Data 鄧姚文

  2. 課程目標

  3. 控制應用程式的執行 6.1 了解在視窗應用程式內的資料 6.2 使用視窗表單內的資料 6.3 在WPF 內使用資料

  4. 6.1 了解在視窗應用程式內的資料 • 簡介ActiveX Data Objects (ADO.NET) • 一致性的方法藉由位於System.Data命名空間內的ActiveX Data Objects (ADO.NET) 來存取不同來源的資料。 • 可以與.NET Framework System.Data (ADO.NET)及System.XML 等資料進行連結

  5. ADO.NET 架構 • 主要元件 • DataProvider: 循序的資料處理介面 • DataSet: 記憶體中虛擬的資料庫,由資料表、關聯、參考的限制條件等組成

  6. 圖6-1 ADO.NET 架構 DataProvider DataSet Connection DataTableCollection Command DataRelationCollection Data Store DataReader XML DataAdapter

  7. 表6-1:ADO.NET 元件及它的子元件

  8. .NET Framework Data Providers • 內建的 DataProvider: • SQL Server • Object Linking and Embedding (OLE) Database (DB) • ODBC • Oracle

  9. 表6-2:.NET Framework 內建的Data Providers

  10. 將資料連結到視窗應用程式圖6-4 加入連結 (Microsoft Access Database)

  11. 圖6-5 變更資料來源對話框

  12. 圖6-6 加入連結(SQL Server)

  13. 6.2 使用視窗表單內的資料建立視窗表單資料控制項 • 常用的資料控制項: • BindingSource • DataSet • BindingNavigation • DataGridView

  14. 表6-3:視窗表單資料控制項

  15. 使用視窗表單資料控制項圖6-10 工具箱內資料控制項

  16. 在視窗表單內驗證資料 表6-4:資料控制項的驗證事件

  17. 6.3 在WPF 內使用資料 • 簡介WPF 綁定 (Binding) • WPF binding 就是WPF元件屬性與資料連結的過程。必須先有目標和來源。

  18. 表7-5:WPF 綁定模式

  19. 使用WPF 專用綁定表7-6:WPF 資料綁定類型

  20. 使用WPF 資料庫綁定 可以將WPF 元件與資料庫進行綁定的功能。 使用.NET Framework 所提供的資料控制項處理資料庫內資料的功能。但在WPF,.NET Framework 並沒有提供資料控制項,因此你需要使用資料來源視窗(Data Sources window) 來建立基礎類別,讓你可以處理資料庫內的資料。

More Related