📄 frmlp.cs
字号:
//
// btnupdates
//
this.btnupdates.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnupdates.Location = new System.Drawing.Point(392, 120);
this.btnupdates.Name = "btnupdates";
this.btnupdates.Size = new System.Drawing.Size(64, 32);
this.btnupdates.TabIndex = 72;
this.btnupdates.Text = "<b>修改</b>";
this.btnupdates.Click += new System.EventHandler(this.btnupdates_Click);
//
// btnadds
//
this.btnadds.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btnadds.Location = new System.Drawing.Point(296, 120);
this.btnadds.Name = "btnadds";
this.btnadds.Size = new System.Drawing.Size(64, 32);
this.btnadds.TabIndex = 71;
this.btnadds.Text = "<b>保存</b>";
this.btnadds.Click += new System.EventHandler(this.btnadds_Click);
//
// txtPrice
//
this.txtPrice.AutoSize = false;
//
// txtPrice.Border
//
this.txtPrice.Border.Class = "TextBoxBorder";
this.txtPrice.Location = new System.Drawing.Point(120, 48);
this.txtPrice.Name = "txtPrice";
this.txtPrice.Size = new System.Drawing.Size(120, 21);
this.txtPrice.TabIndex = 70;
//
// labelX9
//
this.labelX9.BackColor = System.Drawing.Color.Transparent;
this.labelX9.Location = new System.Drawing.Point(24, 48);
this.labelX9.Name = "labelX9";
this.labelX9.Size = new System.Drawing.Size(96, 23);
this.labelX9.TabIndex = 69;
this.labelX9.Text = "<b>价格(万元/套):</b>";
//
// txtHouseNO
//
this.txtHouseNO.AutoSize = false;
//
// txtHouseNO.Border
//
this.txtHouseNO.Border.Class = "TextBoxBorder";
this.txtHouseNO.Location = new System.Drawing.Point(344, 8);
this.txtHouseNO.Name = "txtHouseNO";
this.txtHouseNO.Size = new System.Drawing.Size(96, 21);
this.txtHouseNO.TabIndex = 68;
this.txtHouseNO.TextChanged += new System.EventHandler(this.txtHouseNO_TextChanged);
//
// labelX11
//
this.labelX11.BackColor = System.Drawing.Color.Transparent;
this.labelX11.Location = new System.Drawing.Point(256, 8);
this.labelX11.Name = "labelX11";
this.labelX11.Size = new System.Drawing.Size(96, 23);
this.labelX11.TabIndex = 67;
this.labelX11.Text = "<b>楼房编号:</b>";
//
// labelX12
//
this.labelX12.BackColor = System.Drawing.Color.Transparent;
this.labelX12.Location = new System.Drawing.Point(24, 8);
this.labelX12.Name = "labelX12";
this.labelX12.Size = new System.Drawing.Size(96, 23);
this.labelX12.TabIndex = 66;
this.labelX12.Text = "<b>所属楼盘:</b>";
//
// listView2
//
this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader7,
this.columnHeader8,
this.columnHeader10,
this.columnHeader11,
this.columnHeader26,
this.columnHeader12,
this.columnHeader19,
this.columnHeader27,
this.columnHeader20});
this.listView2.GridLines = true;
this.listView2.Location = new System.Drawing.Point(8, 160);
this.listView2.Name = "listView2";
this.listView2.Size = new System.Drawing.Size(680, 296);
this.listView2.TabIndex = 25;
this.listView2.View = System.Windows.Forms.View.Details;
this.listView2.DoubleClick += new System.EventHandler(this.listView2_DoubleClick);
//
// columnHeader7
//
this.columnHeader7.Text = "所属楼盘";
this.columnHeader7.Width = 77;
//
// columnHeader8
//
this.columnHeader8.Text = "楼房编号";
this.columnHeader8.Width = 62;
//
// columnHeader10
//
this.columnHeader10.Text = "价格";
//
// columnHeader11
//
this.columnHeader11.Text = "规格";
this.columnHeader11.Width = 69;
//
// columnHeader26
//
this.columnHeader26.Text = "面积";
//
// columnHeader12
//
this.columnHeader12.Text = "楼龄";
this.columnHeader12.Width = 71;
//
// columnHeader19
//
this.columnHeader19.Text = "建成日期";
this.columnHeader19.Width = 78;
//
// columnHeader27
//
this.columnHeader27.Text = "地址";
this.columnHeader27.Width = 76;
//
// columnHeader20
//
this.columnHeader20.Text = "备注";
this.columnHeader20.Width = 120;
//
// tabItem2
//
this.tabItem2.AttachedControl = this.tabControlPanel2;
this.tabItem2.Name = "tabItem2";
this.tabItem2.Text = "楼房资料录入";
//
// columnHeader14
//
this.columnHeader14.Text = "楼房编号";
this.columnHeader14.Width = 100;
//
// columnHeader15
//
this.columnHeader15.Text = "楼层";
//
// columnHeader16
//
this.columnHeader16.Text = "房型";
this.columnHeader16.Width = 84;
//
// columnHeader17
//
this.columnHeader17.Text = "单元";
//
// columnHeader18
//
this.columnHeader18.Text = "朝向";
//
// columnHeader21
//
this.columnHeader21.Text = "形式";
this.columnHeader21.Width = 70;
//
// columnHeader22
//
this.columnHeader22.Text = "套内面积";
//
// columnHeader23
//
this.columnHeader23.Text = "销售单价";
//
// frmLP
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(706, 490);
this.Controls.Add(this.tabControl1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "frmLP";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "楼盘资料";
this.Load += new System.EventHandler(this.frmLP_Load);
((System.ComponentModel.ISupportInitialize)(this.tabControl1)).EndInit();
this.tabControl1.ResumeLayout(false);
this.tabControlPanel1.ResumeLayout(false);
this.tabControlPanel3.ResumeLayout(false);
this.tabControlPanel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
//添加楼盘信息
private void btnadd_Click(object sender, System.EventArgs e)
{
//获取当前信息
string name=this.txtname.Text;
string count=this.txtcount.Text;
string num=this.txtnum.Text;
string total=this.txttotal.Text;
string time=this.dateTimePicker1.Value.ToString();
string remark=this.txtremark.Text;
//判断是否为空
if(name.Length<1 || count.Length<1 || num.Length<1 || total.Length<1 || time.Length<1 || remark.Length<1)
{
MessageBox.Show("请把信息填写完整!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
return;
}
else
{
try
{
this.lpBS=new LPMessageBS();
this.lpET=new LPMessage();
this.lpET.LPName=name;
this.lpET.CellCount=Convert.ToInt32(count);
this.lpET.FloorCount=Convert.ToInt32(num);
this.lpET.HouseCount=Convert.ToInt32(total);
this.lpET.Opendatetime=time;
this.lpET.Remark=remark;
this.lpBS.lpmessage=this.lpET;
this.lpBS.insert();
MessageBox.Show("添加信息成功!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
//清空数据
this.txtname.Text="";
this.txtcount.Text="";
this.txtnum.Text="";
this.txttotal.Text="";
this.txtremark.Text="";
//查询出所有的信息
getToal();
//显示信息
showMessage();
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
return;
}
}
}
private void frmLP_Load(object sender, System.EventArgs e)
{
this.tabControl1.SelectedTab=this.tabItem1;
//查询出所有的信息
getToal();
//楼房信息
GetLou();
//房屋信息
GetHome();
}
//查询所有的
public void getToal()
{
this.list=new ArrayList();
try
{
this.lpBS=new LPMessageBS();
this.list=this.lpBS.GetTotal();
showMessage();
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
return;
}
}
//显示信息
public void showMessage()
{
this.listView1.Items.Clear();
try
{
for(int i=0;i<this.list.Count;i++)
{
this.lpET=new LPMessage();
this.lpET=(LPMessage)list[i];
ListViewItem lst=new ListViewItem();
lst.SubItems[0].Text=this.lpET.LPName;
lst.SubItems.Add(this.lpET.CellCount.ToString());
lst.SubItems.Add(this.lpET.FloorCount.ToString());
lst.SubItems.Add(this.lpET.HouseCount.ToString());
lst.SubItems.Add(this.lpET.Opendatetime.ToString());
lst.SubItems.Add(this.lpET.Remark);
lst.SubItems.Add(this.lpET.LPID.ToString());
this.listView1.Items.Add(lst);
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
return;
}
}
//得到楼房信息
public void GetLou()
{
this.list=new ArrayList();
try
{
this.yesBS=new YesSellsBS();
this.list=this.yesBS.getLou();
showLou();
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
return;
}
}
//显示楼房信息
public void showLou()
{
this.listView2.Items.Clear();
try
{
//添加信息
for(int i=0;i<this.list.Count;i++)
{
this.houET=new House();
this.houET=(House)list[i];
ListViewItem lst=new ListViewItem();
lst.SubItems[0].Text=this.houET.getLpName
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -