private static WizardPanel CreateCustomCommandPanel(SqlDataSourceWizardForm wizard, DesignerDataConnection dataConnection) { SqlDataSource component = (SqlDataSource)wizard.SqlDataSourceDesigner.Component; ArrayList dest = new ArrayList(); ArrayList list2 = new ArrayList(); ArrayList list3 = new ArrayList(); ArrayList list4 = new ArrayList(); wizard.SqlDataSourceDesigner.CopyList(component.SelectParameters, dest); wizard.SqlDataSourceDesigner.CopyList(component.InsertParameters, list2); wizard.SqlDataSourceDesigner.CopyList(component.UpdateParameters, list3); wizard.SqlDataSourceDesigner.CopyList(component.DeleteParameters, list4); SqlDataSourceCustomCommandPanel customCommandPanel = wizard.GetCustomCommandPanel(); customCommandPanel.SetQueries(dataConnection, new SqlDataSourceQuery(component.SelectCommand, component.SelectCommandType, dest), new SqlDataSourceQuery(component.InsertCommand, component.InsertCommandType, list2), new SqlDataSourceQuery(component.UpdateCommand, component.UpdateCommandType, list3), new SqlDataSourceQuery(component.DeleteCommand, component.DeleteCommandType, list4)); return(customCommandPanel); }
public SqlDataSourceWizardForm(IServiceProvider serviceProvider, System.Web.UI.Design.WebControls.SqlDataSourceDesigner sqlDataSourceDesigner, IDataEnvironment dataEnvironment) : base(serviceProvider) { base.Glyph = new Bitmap(typeof(SqlDataSourceWizardForm), "datasourcewizard.bmp"); this._dataEnvironment = dataEnvironment; this._sqlDataSource = (SqlDataSource)sqlDataSourceDesigner.Component; this._sqlDataSourceDesigner = sqlDataSourceDesigner; this.Text = System.Design.SR.GetString("ConfigureDataSource_Title", new object[] { this._sqlDataSource.ID }); this._connectionPanel = this.CreateConnectionPanel(); base.SetPanels(new WizardPanel[] { this._connectionPanel }); this._saveConfiguredConnectionPanel = new SqlDataSourceSaveConfiguredConnectionPanel(this._sqlDataSourceDesigner, this._dataEnvironment); base.RegisterPanel(this._saveConfiguredConnectionPanel); this._configureParametersPanel = new SqlDataSourceConfigureParametersPanel(this._sqlDataSourceDesigner); base.RegisterPanel(this._configureParametersPanel); this._configureSelectPanel = new SqlDataSourceConfigureSelectPanel(this._sqlDataSourceDesigner); base.RegisterPanel(this._configureSelectPanel); this._customCommandPanel = new SqlDataSourceCustomCommandPanel(this._sqlDataSourceDesigner); base.RegisterPanel(this._customCommandPanel); this._summaryPanel = new SqlDataSourceSummaryPanel(this._sqlDataSourceDesigner); base.RegisterPanel(this._summaryPanel); base.Size += new Size(0, 40); this.MinimumSize = base.Size; }