public override bool OnNext()
        {
            SqlDataSourceQuery selectQuery = this._selectCommandEditor.GetQuery();
            SqlDataSourceQuery query       = this._insertCommandEditor.GetQuery();
            SqlDataSourceQuery updateQuery = this._updateCommandEditor.GetQuery();
            SqlDataSourceQuery deleteQuery = this._deleteCommandEditor.GetQuery();

            if (((selectQuery == null) || (query == null)) || ((updateQuery == null) || (deleteQuery == null)))
            {
                return(false);
            }
            int num = 0;

            foreach (Parameter parameter in selectQuery.Parameters)
            {
                if ((parameter.Direction == ParameterDirection.Input) || (parameter.Direction == ParameterDirection.InputOutput))
                {
                    num++;
                }
            }
            if (num == 0)
            {
                SqlDataSourceSummaryPanel summaryPanel = base.NextPanel as SqlDataSourceSummaryPanel;
                if (summaryPanel == null)
                {
                    summaryPanel   = ((SqlDataSourceWizardForm)base.ParentWizard).GetSummaryPanel();
                    base.NextPanel = summaryPanel;
                }
                summaryPanel.SetQueries(this._dataConnection, selectQuery, query, updateQuery, deleteQuery);
                return(true);
            }
            SqlDataSourceConfigureParametersPanel nextPanel = base.NextPanel as SqlDataSourceConfigureParametersPanel;

            if (nextPanel == null)
            {
                nextPanel      = ((SqlDataSourceWizardForm)base.ParentWizard).GetConfigureParametersPanel();
                base.NextPanel = nextPanel;
                SqlDataSource component        = (SqlDataSource)this._sqlDataSourceDesigner.Component;
                Parameter[]   selectParameters = new Parameter[component.SelectParameters.Count];
                for (int i = 0; i < component.SelectParameters.Count; i++)
                {
                    Parameter original = component.SelectParameters[i];
                    Parameter clone    = (Parameter)((ICloneable)original).Clone();
                    this._sqlDataSourceDesigner.RegisterClone(original, clone);
                    selectParameters[i] = clone;
                }
                nextPanel.InitializeParameters(selectParameters);
            }
            nextPanel.SetQueries(this._dataConnection, selectQuery, query, updateQuery, deleteQuery);
            return(true);
        }
 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;
 }
 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;
 }