Presentation is loading. Please wait.

Presentation is loading. Please wait.

InfoPath: Developing Forms Using Managed Code Dan Green Paradigm Logic CLI312.

Similar presentations


Presentation on theme: "InfoPath: Developing Forms Using Managed Code Dan Green Paradigm Logic CLI312."— Presentation transcript:

1 InfoPath: Developing Forms Using Managed Code Dan Green Paradigm Logic CLI312

2 Checklist for Today Getting started Event handlers Offline reference data caching

3 InfoPath Business Logic Most Form Development Does Not Need Code XML Schema Rules Formulas Data Validation Data Connections Conditional Formatting C# VB.NET

4 Integrating InfoPath with Visual Studio

5 Form Template And Project Source Code (CS, VB) Project Definition (*PROJ) Form Template Files Visual Studio Project Assemblies (DLL and PDB) Template Definition (XSF) Default Data (XML) Schema (XSD) Views (XSLT) InfoPath Form Template (XSN) Publish / Preview Form Data User Fills Out Form.XML

6 Machine Setup Developers – To create the form: Microsoft Visual Studio.NET 2003 or VSTO 2005 Beta 2 Microsoft Office InfoPath 2003 SP1 InfoPath Toolkit for Visual Studio Visual Studio.NET 2003 http://www.microsoft.com/downloads/details.aspx?FamilyI d=7E9EBC57-E115-4CAC-9986- A712E22879BB&displaylang=en http://www.microsoft.com/downloads/details.aspx?FamilyI d=7E9EBC57-E115-4CAC-9986- A712E22879BB&displaylang=en VSTO 2005 Beta 2 MSDN subscribers: http://msdn.microsoft.com/subscriptions/ (download) http://msdn.microsoft.com/subscriptions/ Non-MSDN subscribers: http://lab.msdn.microsoft.com/vs2005/get/ (CD) http://lab.msdn.microsoft.com/vs2005/get/ End Users – To fill out the form:.NET Framework 1.1 or 2.0 Beta InfoPath 2003 SP1

7 Event Framework Open Edit Submit Close User C# VB.NET Event Handlers OnLoad OnAfterChange OnValidate OnBeforeChange OnClick Events OnSubmitRequest

8 hours Form Editing Events status issues items item rate hours OnAfterChange(DataDOMEvent e) Bubbling Event Handler XMLDOM

9 hours Form Editing Events status issues items item rate hours OnAfterChange(DataDOMEvent e) Bubbling Bubbling hides source e.Site: The node attached to the event handler. e.Source: The node that caused the event. Event Handler XMLDOM

10 Working with Event Handlers

11 Offline Submit And Cache Offline Submit OnSubmitRequest If online, submit using DataAdapter Else, save XML locally using IsolatedStorage OnLoad Swap each cached file with main DOM, and submit Example on MSDN: http://msdn.microsoft.com/library/en- us/odc_ip2003_ta/html/odc_InfoPath_submitting_ forms.asp?frame=true http://msdn.microsoft.com/library/en- us/odc_ip2003_ta/html/odc_InfoPath_submitting_ forms.asp?frame=true Offline Cache of Secondary Data Sources OnLoad If online, update cache with new local copies Else, use cached copies instead

12 Offline reference data caching

13 Word Document Creation InfoPath to Microsoft Office Word Wizard Good starting point For advanced scenarios Add XSLT as a resource to the form Transform the form data source Save transform results to an XmlDocument object Insert XmlDocument object into Word Example: http://blogs.3sharp.com/Blog/davidg/archive/2004/12/17/183.aspx http://blogs.3sharp.com/Blog/davidg/archive/2004/12/17/183.aspx

14 Session Summary Getting started Event handlers Offline reference data caching

15 Resources Home: http://office.microsoft.com/infopathhttp://office.microsoft.com/infopath MSDN: http://msdn.microsoft.com/infopathhttp://msdn.microsoft.com/infopath InfoPath Team Blog: http://blogs.msdn.com/infopath http://blogs.msdn.com/infopath 3Sharp Team Blog: http://blogs.3sharp.com/Blog http://blogs.3sharp.com/Blog Newsgroup: microsoft.public.infopathmicrosoft.public.infopath

16 We invite you to participate in our online evaluation on CommNet, accessible Friday only If you choose to complete the evaluation online, there is no need to complete the paper evaluation Your Feedback is Important!

17

18 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

19


Download ppt "InfoPath: Developing Forms Using Managed Code Dan Green Paradigm Logic CLI312."

Similar presentations


Ads by Google