📄 form1.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb ;
namespace HoursInfo
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
// private ListView lv ; 动态创建list
string DBnum;
string strRepair;
string strFacilities;
string stcw;
string strM1;
string strJi;
string tempNameF;
private string []data;
private System.Windows.Forms.Button addinfo;
private System.Windows.Forms.Button amendinfo;
private System.Windows.Forms.Button deleteinfo;
private System.Windows.Forms.Button FindInfo;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ListView listView1;
OleDbDataReader reader;
public System.Data.OleDb.OleDbConnection oleDbConnection1;
private System.Windows.Forms.TextBox dianhua;
private System.Windows.Forms.TextBox name;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox textID;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.Label label26;
private System.Windows.Forms.Label label27;
private System.Windows.Forms.Label label29;
private System.Windows.Forms.Label label30;
private System.Windows.Forms.Label label32;
private System.Windows.Forms.Label label33;
private System.Windows.Forms.Label label31;
private System.Windows.Forms.Label label34;
private System.Windows.Forms.Label label38;
private System.Windows.Forms.Label label40;
private System.Windows.Forms.Label label35;
private System.Windows.Forms.Label label36;
private System.Windows.Forms.Label label28;
private System.Windows.Forms.Label label37;
private System.Windows.Forms.Label label39;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.RadioButton radioButton3;
private System.Windows.Forms.RadioButton radioButton4;
private System.Windows.Forms.RadioButton radioButton5;
private System.Windows.Forms.Label label41;
private System.Windows.Forms.Label label43;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.CheckBox checkBox4;
private System.Windows.Forms.CheckBox checkBox5;
private System.Windows.Forms.CheckBox checkBox6;
private System.Windows.Forms.CheckBox checkBox7;
private System.Windows.Forms.CheckBox checkBox8;
private System.Windows.Forms.CheckBox checkBox9;
private System.Windows.Forms.CheckBox checkBox10;
private System.Windows.Forms.CheckBox checkBox11;
private System.Windows.Forms.Label label44;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label45;
private System.Windows.Forms.Label label46;
private System.Windows.Forms.TextBox mianji;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label47;
private System.Windows.Forms.ComboBox jiaoqu;
private System.Windows.Forms.ComboBox fangxiang;
private System.Windows.Forms.ComboBox zushou;
private System.Windows.Forms.ComboBox findzushou;
private System.Windows.Forms.ComboBox findzhuangxiu;
private System.Windows.Forms.ComboBox findquyu;
private System.Windows.Forms.ComboBox findting;
private System.Windows.Forms.ComboBox findchu;
private System.Windows.Forms.ComboBox findwei;
private System.Windows.Forms.ComboBox findshi;
private System.Windows.Forms.ComboBox HoursHight;
private System.Windows.Forms.ComboBox inHight;
private System.Windows.Forms.ComboBox ting;
private System.Windows.Forms.ComboBox wei;
private System.Windows.Forms.ComboBox chu;
private System.Windows.Forms.GroupBox gr;
private System.Windows.Forms.ComboBox shi;
private System.Windows.Forms.TextBox jutidizhi;
private System.Windows.Forms.DateTimePicker zutime;
private System.Windows.Forms.TextBox chushoujia;
private System.Windows.Forms.TextBox chuzujia;
private System.Windows.Forms.ComboBox zhuzhai;
private System.Windows.Forms.TextBox beginmaijia;
private System.Windows.Forms.TextBox beginzujia;
private System.Windows.Forms.TextBox endmaijia;
private System.Windows.Forms.ComboBox findmianji;
private System.Windows.Forms.ComboBox findbianhao;
private System.Windows.Forms.TextBox endzujia;
private System.Windows.Forms.ComboBox findname;
private System.Windows.Forms.ComboBox findlouceng;
private System.Windows.Forms.ComboBox findzhuzhai;
private System.Windows.Forms.Label label42;
private System.Windows.Forms.CheckBox checkBox12;
private System.Windows.Forms.CheckBox checkBox13;
private System.Windows.Forms.CheckBox checkBox14;
private System.Windows.Forms.CheckBox checkBox15;
private System.Windows.Forms.CheckBox checkBox16;
private System.Windows.Forms.CheckBox checkBox17;
private System.Windows.Forms.CheckBox checkBox18;
private System.Windows.Forms.CheckBox checkBox19;
private System.Windows.Forms.CheckBox checkBox20;
private System.Windows.Forms.CheckBox checkBox21;
private System.Windows.Forms.CheckBox checkBox22;
private System.Windows.Forms.Label label48;
private System.Windows.Forms.ComboBox zhuangtai;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem tongxun;
private System.Windows.Forms.Button ruzhang;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
data= new string[11]{"煤气/天然气","暖气","有线","网线","电话",
"热水淋浴器","空调","彩电","冰箱","洗衣机","床"};
/*data[0] = "煤气/天然气";
data[1] = "暖气";
data[2] = "有线";
data[3] = "网线";
data[4] = "电话";
data[5] = "热水淋浴器";
data[6] = "空调";
data[7] = "彩电";
data[8] = "冰箱";
data[9] = "洗衣机";
data[10] = "床";
*/
// 因该是属于动态创建
// listView1 = new ListView () ;
// lv.Left = 0 ;
// lv.Top = 0 ;
// lv.Width = 700 ;
// lv.Height = this.ClientRectangle.Height ;
listView1.GridLines = true ;//显示各个记录的分隔线
listView1.FullRowSelect = true ; //要选择就是一行
listView1.View = View.Details ; //定义列表显示的方式
listView1.Scrollable = true ; //需要时候显示滚动条
listView1.MultiSelect = true ; // false为不可以多行选择,true为可以多行选择
listView1.HeaderStyle = ColumnHeaderStyle.Nonclickable ;
// 针对数据库的字段名称,建立与之适应显示表头
listView1.Columns.Add ( "编号" ,40 , HorizontalAlignment.Right );
listView1.Columns.Add ( "住房环境" , 60 , HorizontalAlignment.Left );
listView1.Columns.Add ( "区域" , 100 , HorizontalAlignment.Left );
listView1.Columns.Add ( "楼层\\户型\\面积\\朝向" , 180 , HorizontalAlignment.Left );
listView1.Columns.Add ( "装修情况" , 60, HorizontalAlignment.Left );
listView1.Columns.Add ( "出租价格" ,75, HorizontalAlignment.Left );
listView1.Columns.Add ( "出售价格" , 69 , HorizontalAlignment.Left );
listView1.Columns.Add ( "租售" , 50 , HorizontalAlignment.Left ) ;
listView1.Columns.Add ( "租售状态" , 60 , HorizontalAlignment.Left );
listView1.Columns.Add ( "租售日期" , 80 , HorizontalAlignment.Left );
listView1.Columns.Add ( "业主名字\\电话" , 90 , HorizontalAlignment.Left );
listView1.Columns.Add ( "备注" , 430 , HorizontalAlignment.Left );
listView1.Visible = true ;
zhuangtai.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
zhuangtai.Items.AddRange(new object[] {
"",
"未租",
"已租",
"未售",
"已售",
});
zhuangtai.Name = "zhuangtai";
zhuangtai.Text = "未租";
HoursHight.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
HoursHight.Items.AddRange(new object[] {
"",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9","10","11","12","13","14","15","16","17","18","19","20",
"21","22","23","24","25","26","27","28","29","30","31","32",
"33","34","35","36","37","38","39","40","41","42","43","44",
"45","46","47","48","49","50","51","52","53","54","55","56",
"57","58","59","60",
});
HoursHight.Name = "HoursHight";
inHight.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
inHight.Items.AddRange(new object[] {
"",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9","10","11","12","13","14","15","16","17","18","19","20",
"21","22","23","24","25","26","27","28","29","30","31","32",
"33","34","35","36","37","38","39","40","41","42","43","44",
"45","46","47","48","49","50","51","52","53","54","55","56",
"57","58","59","60",
});
inHight.Name = "inHight";
findlouceng.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
findlouceng.Items.AddRange(new object[] {
"",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9","10","11","12","13","14","15","16","17","18","19","20",
"21","22","23","24","25","26","27","28","29","30","31","32",
"33","34","35","36","37","38","39","40","41","42","43","44",
"45","46","47","48","49","50","51","52","53","54","55","56",
"57","58","59","60",
});
findlouceng.Name = "findlouceng";
jiaoqu.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
jiaoqu.Items.AddRange(new object[] {
"东郊",
"南郊",
"西郊",
"北郊",
"城中",
"西高新",
"南高新",
});
jiaoqu.Location = new System.Drawing.Point(96, 34);
jiaoqu.Name = "jiaoqu";
jiaoqu.Size = new System.Drawing.Size(72, 20);
jiaoqu.Text = "东郊";
zhuzhai.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
zhuzhai.Items.AddRange(new object[] {
"",
"小区",
"高层",
"多层",
"写字楼",
"别墅",
"公寓",
});
//zhuzhai.Location = new System.Drawing.Point(96, 34);
zhuzhai.Name = "zhuzhai";
//zhuzhai.Size = new System.Drawing.Size(72, 20);
zhuzhai.Text = "小区";
findzhuzhai.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
findzhuzhai.Items.AddRange(new object[] {
"",
"小区",
"高层",
"多层",
"写字楼",
"别墅",
"公寓",
});
//zhuzhai.Location = new System.Drawing.Point(96, 34);
findzhuzhai.Name = "findzhuzhai";
//zhuzhai.Size = new System.Drawing.Size(72, 20);
findzhuzhai.Text = "小区";
fangxiang.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
fangxiang.Items.AddRange(new object[] {
"",
"东",
"南",
"西",
"北",
});
//zhuzhai.Location = new System.Drawing.Point(96, 34);
fangxiang.Name = "fangxiang";
//zhuzhai.Size = new System.Drawing.Size(72, 20);
zushou.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
zushou.Items.AddRange(new object[] {
"出租",
"出售",
"租售",
});
zushou.Name = "zushou";
zushou.Text = "出租";
findzushou.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
findzushou.Items.AddRange(new object[] {
"",
"出租",
"出售",
"租售",
});
findzushou.Name = "findzushou";
findzushou.Text = "出租";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -