Example #1
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            DataTable table = dataGridView1.DataSource as DataTable;

            if (table == null)
            {
                return;
            }
            DTSWizardBook book = new DTSWizardBook();

            book.Export(table);
        }
Example #2
0
        /// <summary>
        /// 导入数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dataSourceBtn_Click(object sender, EventArgs e)
        {
            DTSWizardBook wizard = new DTSWizardBook();
            DataTable     dt     = wizard.Import();

            if (dt != null)
            {
                if (Action is ActionTableVariable)
                {
                    ActionTableVariable tableVariable = Action as ActionTableVariable;
                    tableVariable.Data = dt;
                }
                else if (Action is ActionArrayVariable)
                {
                    ActionArrayVariable arr = Action as ActionArrayVariable;
                    arr.Data = TableToList(dt);
                }
            }
        }