private void openDlg_FileOk(object sender, CancelEventArgs e) { txtPTMDataFileName.Text = openDlg.FileName; DataSet ds = new DataSet(); ds.ReadXml(txtPTMDataFileName.Text); using (DataTableSelectorWnd dtswnd = new DataTableSelectorWnd("Select PTM Data Table", ds)) { dtswnd.ShowDialog(this); try { dtPTM = ds.Tables[dtswnd.TableName]; lblTotalRecords.Text = dtPTM.Rows.Count.ToString(); foreach (DataColumn col in dtPTM.Columns) { listBox1.Items.Add(col.ColumnName); } ApplicationCanBeReset = true; } catch (NullReferenceException exp) { ResetUI(); } ds = null; } }
private void openValidationDataDlg_FileOk(object sender, CancelEventArgs e) { DataTableSelectorWnd dts; DataSet ds; ds = new DataSet(); ds.ReadXml(openValidationDataDlg.FileName); dts = new DataTableSelectorWnd("Select Validation DataTable", ds); dts.ShowDialog(this); _ValidationDataTable = ds.Tables[dts.TableName]; grdValidationData.DataSource = _ValidationDataTable; lblValidationDataCount.Text = "Validation Data Record Count:" + _ValidationDataTable.Rows.Count.ToString(); }
private void openDlg_FileOk(object sender, CancelEventArgs e) { //0331-7017771 //arslan: //0321-4244643 DataSet ds = new DataSet(); ds.ReadXml(openDlg.FileName); DataTableSelectorWnd dts = new DataTableSelectorWnd("Select Source DataTable", ds); dts.ShowDialog(this); _SourceDataTable = ds.Tables[dts.TableName]; gridSites.DataSource = _SourceDataTable; }
private void openFileDialog1_FileOk(object sender, CancelEventArgs e) { DataSet ds = new DataSet(); ds.ReadXml(openFileDialog1.FileName); DataTableSelectorWnd dtswnd = new DataTableSelectorWnd("", ds); dtswnd.ShowDialog(); DataTable dt = ds.Tables[dtswnd.TableName]; DataTableViewer dtviewer = new DataTableViewer(dt, openFileDialog1.FileName); dtviewer.MdiParent = this; dtviewer.Show(); }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { openFileDialog1.ShowDialog(this); if (openFileDialog1.FileName != "") { DataSet ds = new DataSet(); ds.ReadXml(openFileDialog1.FileName); DataTableSelectorWnd dts = new DataTableSelectorWnd("Select Source Data Table", ds); dts.ShowDialog(this); _SourceDataTable = ds.Tables[dts.TableName]; gridSource.DataSource = _SourceDataTable; lblSourceRecordCount.Text = _SourceDataTable.Rows.Count.ToString(); } }
private void openFileDialog1_FileOk(object sender, CancelEventArgs e) { ds = new DataSet(); ds.ReadXml(openFileDialog1.FileName); dtwnd = new DataTableSelectorWnd("Select DataTable", ds); dtwnd.ShowDialog(); string tableName = dtwnd.TableName; dataTableCollection.Add(ds.Tables[tableName]); row = infoTable.NewRow(); row["TableName"] = tableName; row["Path"] = openFileDialog1.FileName; row["RecordCount"] = ds.Tables[dtwnd.TableName].Rows.Count.ToString(); infoTable.Rows.Add(row); }
private void openFileDialog1_FileOk(object sender, CancelEventArgs e) { textBox1.Text = openFileDialog1.FileName; DataSet ds = new DataSet(); ds.ReadXml(openFileDialog1.FileName); DataTableSelectorWnd dtwnd = new DataTableSelectorWnd("Select DataTable to Encode", ds); dtwnd.ShowDialog(); _DataTableToEncode = ds.Tables[dtwnd.TableName]; dataGridView1.DataSource = _DataTableToEncode; lblRecordCount.Text = _DataTableToEncode.Rows.Count.ToString(); foreach (DataColumn col in _DataTableToEncode.Columns) { listBox1.Items.Add(col.ColumnName); } }
private void openFileDialog2_FileOk(object sender, CancelEventArgs e) { DataSet ds = new DataSet(); ds.ReadXml(openFileDialog2.FileName); DataTableSelectorWnd dtswnd = new DataTableSelectorWnd("Select DataTable", ds); dtswnd.ShowDialog(); ValidationDataTable = ds.Tables[dtswnd.TableName]; dataGridView1.DataSource = ValidationDataTable; lblValidationRecordCount.Text = ValidationDataTable.Rows.Count.ToString(); int idex = 0; foreach (DataColumn col in ValidationDataTable.Columns) { checkedListBox1.Items.Add(col.ColumnName); checkedListBox1.SetItemCheckState(idex, CheckState.Checked); comboBox1.Items.Add(col.ColumnName); idex++; } }
private void openTrainingDataDlg_FileOk(object sender, CancelEventArgs e) { DataTableSelectorWnd dts; DataSet ds; ds = new DataSet(); ds.ReadXml(openTrainingDataDlg.FileName); dts = new DataTableSelectorWnd("Select Training DataTable", ds); dts.ShowDialog(this); lstInputAttributes.Items.Clear(); cmbOutputAttribute.Items.Clear(); _TrainingDataTable = ds.Tables[dts.TableName]; grdTrainingData.DataSource = _TrainingDataTable; lblTrainingDataCount.Text = "Training Data Record Count: " + _TrainingDataTable.Rows.Count.ToString(); int colCtr = 0; foreach (DataColumn col in _TrainingDataTable.Columns) { lstInputAttributes.Items.Add(col.ColumnName); lstInputAttributes.SetItemCheckState(colCtr, CheckState.Checked); cmbOutputAttribute.Items.Add(col.ColumnName); colCtr++; } }