Ejemplo n.º 1
0
        private void UpdateResultSet(DataTable table)
        {
            if (InvokeRequired)
            {
                this.Invoke(new Action<DataTable>(UpdateResultSet), table);
                return;
            }

            Control resultTabPanel = GetControlByName(table.TableName);
            ResultPanel rp = null;
            if (resultTabPanel == null)
            {
                TabPage page = new TabPage("输出[" + table.TableName + "]");
                page.Name = table.TableName;
                resultTabPanel = page;
                tabControl.Controls.Add(page);
                rp = new ResultPanel();
                rp.Dock = DockStyle.Fill;
                page.Controls.Add(rp);
            }
            else
            {
                rp = resultTabPanel.Controls[0] as ResultPanel;
            }
            rp.Bind(table);
        }
Ejemplo n.º 2
0
 void ResultSet_DataUpdate(object sender, EventArgs e)
 {
     //UpdateResultSet((DataTable)sender);
     ResultPanel rp = outputPage.Controls[0] as ResultPanel;
     rp.Bind((DataTable)sender);
 }