private void treeView1_DoubleClick(object sender, EventArgs e) { TreeNode node = this.treeView1.GetNodeAt(point); if (point.X < node.Bounds.Left || point.X > node.Bounds.Right) { return; } else { projectstr = this.treeView1.SelectedNode.Parent.Text.ToString(); drawingstr = this.treeView1.SelectedNode.Text.ToString(); int count = 0; if (this.radioButton1.Checked == true) { if (this.treeView1.SelectedNode.Level == 2) { WorkShopClass.GetModifyStatistics("SP_MODIFYSTATISTICS", projectstr, drawingstr, 0, this.dataGridView1); count = this.dataGridView1.Rows.Count; this.toolStripStatusLabel1.Text = "当前记录数共:" + count; } } if (this.radioButton2.Checked == true) { WorkShopClass.GetModifyStatistics("SP_MODIFYSTATISTICS", projectstr, drawingstr, 1, this.dataGridView1); count = this.dataGridView1.Rows.Count; this.toolStripStatusLabel1.Text = "当前记录数共:" + count; } } }
private void treeView1_DoubleClick(object sender, EventArgs e) { if (this.radioButton1.Checked == true) { TreeNode node = this.treeView1.GetNodeAt(point); if (point.X < node.Bounds.Left || point.X > node.Bounds.Right) { return; } else { if (this.treeView1.SelectedNode.Level == 1) { string projectstr = this.comboBox1.Text.ToString(); string blockstr = this.treeView1.SelectedNode.Parent.Text.ToString(); string systemidstr = this.treeView1.SelectedNode.Text.ToString(); WorkShopClass.TraceabilityIII("SP_TraceabilityIII", projectstr, blockstr, systemidstr, this.dataGridView1); } else { return; } } } else if (this.radioButton2.Checked == true) { MessageBox.Show("-----开发中!----"); return; } else { MessageBox.Show("请选择管路类别!", "信息提示!", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } }
private void treeView1_DoubleClick(object sender, EventArgs e) { TreeNode node = this.treeView1.GetNodeAt(point); if (point.X < node.Bounds.Left || point.X > node.Bounds.Right) { return; } else { this.dataGridView1.DataSource = null; checkedListBox1.Items.Clear(); projectStr = this.treeView1.SelectedNode.Text.ToString(); this.labelColor1.Text = projectStr; if (this.radioButton1.Checked == true) { WorkShopClass.GetMaterialReports("SP_GETMATERIALREPORTS", projectStr, blockStr, this.dataGridView1); FillCheckListBox(); } else if (this.radioButton2.Checked == true) { DataSet MyDS = GetAccessoryDS(projectStr); MyDS.Tables[0].Columns[0].ColumnName = "附件名称"; MyDS.Tables[0].Columns[1].ColumnName = "规格"; MyDS.Tables[0].Columns[2].ColumnName = "数量"; MyDS.Tables[0].Columns[3].ColumnName = "重量"; this.dataGridView1.DataSource = MyDS.Tables[0].DefaultView; MyDS.Dispose(); FillCheckListBox(); } else if (this.radioButton3.Checked == true) { DataSet MyDS = Getxyz(projectStr); this.dataGridView1.DataSource = MyDS.Tables[0]; MyDS.Dispose(); FillCheckListBox(); } else { MessageBox.Show("请选择要输出的表的类型!", "信息提示!", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } }
private void DrawingComboBox_SelectedIndexChanged(object sender, EventArgs e) { string projectStr = this.ProjectComboBox.Text.ToString(); string drawingStr = this.DrawingComboBox.Text.ToString(); if (string.IsNullOrEmpty(drawingStr)) { return; } sqlStr = "select ISSUED_TIME from project_drawing_tab where project_id = (select id from project_tab where name = '" + projectStr + "') and drawing_no = '" + drawingStr + "' and lastflag = 'Y' and delete_flag = 'N'"; DataSet ds = new DataSet(); User.DataBaseConnect(sqlStr, ds); this.textBox1.Text = ds.Tables[0].Rows[0][0].ToString(); ds.Dispose(); string querystr = "SP_GetSpoolTrace"; WorkShopClass.GetSpoolTrace(querystr, projectStr, drawingStr, SPTraceDgv); }