Example #1
0
        void readTableControl1_EventGetTable(ReadTableControl sender, DataTable resultdt)
        {
            if (resultdt == null)
            {
                return;
            }
            localdt         = resultdt;
            this.SystemName = sender.SystemName;
            this.TableName  = sender.TableName;

            if (this.dataGridView1.InvokeRequired)
            {
                this.Invoke(new EventGetSAPTable(readTableControl1_EventGetTable), new object[] { sender, resultdt });
            }
            else
            {
                this.Text = "表:" + TableName;
                this.dataGridView1.DataSource = null;
                if (chxNotShow.Checked)
                {
                }
                else
                {
                    this.dataGridView1.DataSource = resultdt;
                    this.dataGridView1.AutoResizeColumns();
                }
            }
        }
        void readTableControl1_EventGetTable(ReadTableControl sender, DataTable resultdt)
        {
            if (resultdt == null)
            {
                return;
            }
            localdt = resultdt;
            this.SystemName = sender.SystemName;
            this.TableName = sender.TableName;

            if (this.dataGridView1.InvokeRequired)
            {

                this.Invoke(new EventGetSAPTable(readTableControl1_EventGetTable), new object[] { sender, resultdt });
            }
            else
            {
                this.Text = "表:" + TableName;
                this.dataGridView1.DataSource = null;
                if (chxNotShow.Checked)
                {

                }
                else
                {
                    this.dataGridView1.DataSource = resultdt;
                    this.dataGridView1.AutoResizeColumns();
                }

            }
        }