Пример #1
0
        void BoutonSuivantClick(object sender, System.EventArgs e)
        {
            arrayAttributs = new ArrayList();
            for (int i = 0; i < table.Rows.Count - 1; i++)
            {
                Attribut att = new Attribut(table.Rows[i].Cells[0].FormattedValue.ToString(), table.Rows[i].Cells[1].FormattedValue.ToString());
                att.propTable = tableWizard1.nomTable;
                if (!table.Rows[i].Cells[2].FormattedValue.ToString().Equals(""))
                {
                    att.propTaille = table.Rows[i].Cells[2].FormattedValue.ToString();
                }
                if (!table.Rows[i].Cells[3].FormattedValue.ToString().Equals(""))
                {
                    att.propDefaultValue = table.Rows[i].Cells[3].FormattedValue.ToString();
                }
                if (!table.Rows[i].Cells[4].FormattedValue.ToString().Equals(Boolean.FalseString))
                {
                    att.notNull = true;
                }
                if (!table.Rows[i].Cells[5].FormattedValue.ToString().Equals(""))
                {
                    att.nomNotNull = table.Rows[i].Cells[5].FormattedValue.ToString();
                }
                if (!table.Rows[i].Cells[6].FormattedValue.ToString().Equals(Boolean.FalseString))
                {
                    att.autoNotNull = true;
                }
                arrayAttributs.Add(att);
                Console.WriteLine(att.ToString());
            }
            if (tableWizard3 == null)
            {
                tableWizard3 = new CreateTableWizard3();
                tableWizard3.propTableWizard2 = this;
                tableWizard3.propTables       = arrayTables;
                tableWizard3.propAttributs    = arrayAttributs;
                tableWizard3.propListe        = liste;
                tableWizard3.initialiser();
            }

            this.Visible         = false;
            tableWizard3.Visible = true;
        }
        void BoutonSuivantClick(object sender, System.EventArgs e)
        {
            arrayAttributs = new ArrayList();
            for (int i = 0 ; i < table.Rows.Count-1; i++) {
                Attribut att = new Attribut(table.Rows[i].Cells[0].FormattedValue.ToString(), table.Rows[i].Cells[1].FormattedValue.ToString());
                att.propTable = tableWizard1.nomTable;
                if (!table.Rows[i].Cells[2].FormattedValue.ToString().Equals("")) {
                    att.propTaille = table.Rows[i].Cells[2].FormattedValue.ToString();
                }
                if (!table.Rows[i].Cells[3].FormattedValue.ToString().Equals ("")){
                    att.propDefaultValue = table.Rows[i].Cells[3].FormattedValue.ToString();
                }
                if (!table.Rows[i].Cells[4].FormattedValue.ToString().Equals(Boolean.FalseString)) {
                    att.notNull = true;
                }
                if (!table.Rows[i].Cells[5].FormattedValue.ToString().Equals(""))  {
                    att.nomNotNull = table.Rows[i].Cells[5].FormattedValue.ToString();
                }
                if (!table.Rows[i].Cells[6].FormattedValue.ToString().Equals(Boolean.FalseString)) {
                    att.autoNotNull = true;
                }
                arrayAttributs.Add(att);
                Console.WriteLine(att.ToString());
            }
            if (tableWizard3 == null) {
                tableWizard3 = new CreateTableWizard3();
                tableWizard3.propTableWizard2 = this;
                tableWizard3.propTables = arrayTables;
                tableWizard3.propAttributs = arrayAttributs;
                tableWizard3.propListe = liste;
                tableWizard3.initialiser();
            }

            this.Visible = false;
            tableWizard3.Visible = true;
        }