protected override IAsyncResult BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, object state) { DataTable dataTable = new DataTable(); BuildDataTable.ReadDataTableFromXML(this.TableInfo, dataTable); this.DataTable.Set(context, dataTable); m_Delegate = new runDelegate(Run); return(m_Delegate.BeginInvoke(callback, state)); }
private void DataTableBuild(object sender, System.Windows.RoutedEventArgs e) { string text = base.ModelItem.Properties["TableInfo"].ComputedValue as string; DataTable dataTable = new DataTable(); try { BuildDataTable.ReadDataTableFromXML(text, dataTable); } catch (Exception ex) { throw new Exception("DataTableBuild Exception", ex); } BuildDataTableDialog buildDataTableDialog = new BuildDataTableDialog(dataTable, base.ModelItem); buildDataTableDialog.ShowDialog(); if (buildDataTableDialog.SaveTable) { base.ModelItem.Properties["TableInfo"].SetValue(buildDataTableDialog.DataTableXmlSchema); } }