📄 tjsb.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace bggl.fm
{
/// <summary>
/// tjsb 的摘要说明。
/// </summary>
public class tjsb : System.Windows.Forms.Form
{
cs.sbbsql sbsql=new bggl.cs.sbbsql();
cs.kfsql ksql=new bggl.cs.kfsql();
cs.fjlx flsql=new bggl.cs.fjlx();
DataSet sbobjset=new DataSet();
DataSet kfobjset=new DataSet();
DataSet fjobjset=new DataSet();
string idzhi="";//用来存放点击设备列表后放设备id值
string fjlxid="";//用来存放点击房间类型后放房间类型id;
string idzhi1="";////用来存放点击设备列表后放设备房间值
string fjlb="";//用来存放房间值;
string fjzt="";//存放房间状态;
string fjh="";//房间设置用;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.ColumnHeader columnHeader3;
private System.Windows.Forms.ColumnHeader columnHeader5;
private System.Windows.Forms.ColumnHeader columnHeader6;
private System.Windows.Forms.ColumnHeader columnHeader7;
private System.Windows.Forms.ColumnHeader columnHeader8;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.ListView listView2;
private System.Windows.Forms.ColumnHeader columnHeader9;
private System.Windows.Forms.ColumnHeader columnHeader10;
private System.Windows.Forms.ColumnHeader columnHeader11;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Button button9;
private System.Windows.Forms.ListView listView5;
private System.Windows.Forms.ColumnHeader columnHeader25;
private System.Windows.Forms.ColumnHeader columnHeader26;
private System.Windows.Forms.ColumnHeader columnHeader12;
private System.Windows.Forms.ColumnHeader columnHeader27;
private System.Windows.Forms.ColumnHeader columnHeader28;
private System.Windows.Forms.ColumnHeader columnHeader29;
private System.Windows.Forms.ColumnHeader columnHeader31;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.GroupBox groupBox8;
private System.Windows.Forms.ColumnHeader columnHeader4;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox textBox7;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox textBox8;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.GroupBox groupBox9;
private System.Windows.Forms.GroupBox groupBox10;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.ComboBox comboBox3;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.TextBox textBox12;
private System.Windows.Forms.TextBox textBox11;
private System.Windows.Forms.TextBox textBox10;
private System.Windows.Forms.TextBox textBox13;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.ColumnHeader columnHeader13;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox textBox9;
private System.Windows.Forms.TextBox textBox14;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.ColumnHeader columnHeader14;
private System.Windows.Forms.Button button10;
private System.Windows.Forms.Button button11;
private System.Windows.Forms.Button button12;
ListView lv;
TreeView treeView1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public tjsb(ListView lvv,TreeView tv1)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
lv=lvv;
treeView1=tv1;
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.listView1 = new System.Windows.Forms.ListView();
this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
this.columnHeader6 = new System.Windows.Forms.ColumnHeader();
this.columnHeader7 = new System.Windows.Forms.ColumnHeader();
this.columnHeader8 = new System.Windows.Forms.ColumnHeader();
this.button3 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.button10 = new System.Windows.Forms.Button();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.textBox5 = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.textBox4 = new System.Windows.Forms.TextBox();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupBox8 = new System.Windows.Forms.GroupBox();
this.button11 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.textBox14 = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.textBox13 = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.textBox8 = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.textBox7 = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.listView2 = new System.Windows.Forms.ListView();
this.columnHeader9 = new System.Windows.Forms.ColumnHeader();
this.columnHeader10 = new System.Windows.Forms.ColumnHeader();
this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
this.columnHeader13 = new System.Windows.Forms.ColumnHeader();
this.columnHeader14 = new System.Windows.Forms.ColumnHeader();
this.columnHeader11 = new System.Windows.Forms.ColumnHeader();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox10 = new System.Windows.Forms.GroupBox();
this.button12 = new System.Windows.Forms.Button();
this.button9 = new System.Windows.Forms.Button();
this.button8 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.groupBox9 = new System.Windows.Forms.GroupBox();
this.textBox12 = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.textBox11 = new System.Windows.Forms.TextBox();
this.comboBox3 = new System.Windows.Forms.ComboBox();
this.label15 = new System.Windows.Forms.Label();
this.textBox10 = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.textBox9 = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.listView5 = new System.Windows.Forms.ListView();
this.columnHeader25 = new System.Windows.Forms.ColumnHeader();
this.columnHeader26 = new System.Windows.Forms.ColumnHeader();
this.columnHeader12 = new System.Windows.Forms.ColumnHeader();
this.columnHeader27 = new System.Windows.Forms.ColumnHeader();
this.columnHeader28 = new System.Windows.Forms.ColumnHeader();
this.columnHeader29 = new System.Windows.Forms.ColumnHeader();
this.columnHeader31 = new System.Windows.Forms.ColumnHeader();
this.groupBox1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox6.SuspendLayout();
this.groupBox5.SuspendLayout();
this.groupBox3.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupBox8.SuspendLayout();
this.groupBox7.SuspendLayout();
this.groupBox4.SuspendLayout();
this.tabPage3.SuspendLayout();
this.groupBox10.SuspendLayout();
this.groupBox9.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.listView1);
this.groupBox1.Location = new System.Drawing.Point(8, 72);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(752, 160);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "显示";
//
// listView1
//
this.listView1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1,
this.columnHeader2,
this.columnHeader3,
this.columnHeader5,
this.columnHeader6,
this.columnHeader7,
this.columnHeader8});
this.listView1.FullRowSelect = true;
this.listView1.GridLines = true;
this.listView1.Location = new System.Drawing.Point(8, 24);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(736, 128);
this.listView1.TabIndex = 5;
this.listView1.View = System.Windows.Forms.View.Details;
this.listView1.Click += new System.EventHandler(this.listView1_Click);
this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
//
// columnHeader1
//
this.columnHeader1.Text = "设备id";
//
// columnHeader2
//
this.columnHeader2.Text = "设备类型";
this.columnHeader2.Width = 80;
//
// columnHeader3
//
this.columnHeader3.Text = "设备名";
this.columnHeader3.Width = 100;
//
// columnHeader5
//
this.columnHeader5.Text = "购买日期";
this.columnHeader5.Width = 120;
//
// columnHeader6
//
this.columnHeader6.Text = "采购员";
this.columnHeader6.Width = 100;
//
// columnHeader7
//
this.columnHeader7.Text = "设备价格";
this.columnHeader7.Width = 80;
//
// columnHeader8
//
this.columnHeader8.Text = "备注";
this.columnHeader8.Width = 200;
//
// button3
//
this.button3.Enabled = false;
this.button3.Location = new System.Drawing.Point(16, 104);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(80, 24);
this.button3.TabIndex = 11;
this.button3.Text = "删除设备";
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button2
//
this.button2.Enabled = false;
this.button2.Location = new System.Drawing.Point(16, 64);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(80, 24);
this.button2.TabIndex = 10;
this.button2.Text = "修改设备";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button1
//
this.button1.Location = new System.Drawing.Point(16, 24);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(80, 24);
this.button1.TabIndex = 9;
this.button1.Text = "添加设备";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Location = new System.Drawing.Point(8, 8);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(776, 440);
this.tabControl1.TabIndex = 1;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.groupBox6);
this.tabPage1.Controls.Add(this.groupBox5);
this.tabPage1.Controls.Add(this.groupBox3);
this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Location = new System.Drawing.Point(4, 21);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(768, 415);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "设备管理";
//
// groupBox6
//
this.groupBox6.Controls.Add(this.button10);
this.groupBox6.Controls.Add(this.button1);
this.groupBox6.Controls.Add(this.button2);
this.groupBox6.Controls.Add(this.button3);
this.groupBox6.Location = new System.Drawing.Point(656, 240);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(104, 168);
this.groupBox6.TabIndex = 12;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "操作";
//
// button10
//
this.button10.Location = new System.Drawing.Point(16, 136);
this.button10.Name = "button10";
this.button10.Size = new System.Drawing.Size(80, 24);
this.button10.TabIndex = 12;
this.button10.Text = "刷新";
this.button10.Click += new System.EventHandler(this.button10_Click);
//
// groupBox5
//
this.groupBox5.Controls.Add(this.textBox6);
this.groupBox5.Controls.Add(this.label7);
this.groupBox5.Controls.Add(this.label6);
this.groupBox5.Controls.Add(this.textBox5);
this.groupBox5.Controls.Add(this.label8);
this.groupBox5.Controls.Add(this.textBox4);
this.groupBox5.Controls.Add(this.dateTimePicker1);
this.groupBox5.Controls.Add(this.textBox1);
this.groupBox5.Controls.Add(this.label4);
this.groupBox5.Controls.Add(this.label3);
this.groupBox5.Controls.Add(this.textBox2);
this.groupBox5.Controls.Add(this.label5);
this.groupBox5.Location = new System.Drawing.Point(8, 240);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(640, 168);
this.groupBox5.TabIndex = 11;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "输入";
//
// textBox6
//
this.textBox6.Location = new System.Drawing.Point(96, 104);
this.textBox6.Multiline = true;
this.textBox6.Name = "textBox6";
this.textBox6.Size = new System.Drawing.Size(528, 48);
this.textBox6.TabIndex = 45;
this.textBox6.Text = "";
//
// label7
//
this.label7.Location = new System.Drawing.Point(24, 104);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(56, 16);
this.label7.TabIndex = 44;
this.label7.Text = "备注:";
//
// label6
//
this.label6.Location = new System.Drawing.Point(224, 64);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(56, 16);
this.label6.TabIndex = 43;
this.label6.Text = "采购价格:";
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(296, 64);
this.textBox5.Name = "textBox5";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -