📄 frmregister.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using HouseBE;
using HouseBS;
namespace frmLogin
{
/// <summary>
/// frmRegister 的摘要说明。
/// </summary>
public class frmRegister : System.Windows.Forms.Form
{
private System.Windows.Forms.ToolBar toolBar1;
private System.Windows.Forms.ToolBarButton toolBarButton1;
private System.Windows.Forms.ToolBarButton toolBarButton2;
private System.Windows.Forms.ToolBarButton toolBarButton3;
private System.Windows.Forms.ToolBarButton toolBarButton4;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.ToolBarButton toolBarButton6;
private System.Windows.Forms.DataGrid dataGrid1;
private DevComponents.DotNetBar.LabelX labelX1;
private DevComponents.DotNetBar.LabelX labelX2;
private DevComponents.Editors.ComboItem comboItem1;
private DevComponents.Editors.ComboItem comboItem2;
private DevComponents.DotNetBar.LabelX labelX5;
private DevComponents.DotNetBar.LabelX labelX6;
private DevComponents.Editors.ComboItem comboItem3;
private DevComponents.Editors.ComboItem comboItem4;
private DevComponents.Editors.ComboItem comboItem5;
private DevComponents.Editors.ComboItem comboItem6;
private DevComponents.Editors.ComboItem comboItem7;
private DevComponents.Editors.ComboItem comboItem8;
private DevComponents.Editors.ComboItem comboItem9;
private DevComponents.Editors.ComboItem comboItem10;
private DevComponents.Editors.ComboItem comboItem11;
private DevComponents.Editors.ComboItem comboItem12;
private DevComponents.Editors.ComboItem comboItem13;
private DevComponents.Editors.ComboItem comboItem14;
private DevComponents.Editors.ComboItem comboItem15;
private DevComponents.Editors.ComboItem comboItem16;
private DevComponents.Editors.ComboItem comboItem17;
private DevComponents.Editors.ComboItem comboItem22;
private DevComponents.Editors.ComboItem comboItem23;
private DevComponents.Editors.ComboItem comboItem24;
private DevComponents.Editors.ComboItem comboItem25;
private DevComponents.Editors.ComboItem comboItem26;
private DevComponents.Editors.ComboItem comboItem27;
private DevComponents.Editors.ComboItem comboItem28;
private DevComponents.Editors.ComboItem comboItem29;
private DevComponents.Editors.ComboItem comboItem18;
private DevComponents.Editors.ComboItem comboItem19;
private DevComponents.Editors.ComboItem comboItem20;
private DevComponents.Editors.ComboItem comboItem21;
private DevComponents.Editors.ComboItem comboItem30;
private DevComponents.Editors.ComboItem comboItem31;
private DevComponents.Editors.ComboItem comboItem32;
private DevComponents.Editors.ComboItem comboItem33;
private DevComponents.Editors.ComboItem comboItem34;
private DevComponents.Editors.ComboItem comboItem35;
private DevComponents.Editors.ComboItem comboItem36;
private DevComponents.Editors.ComboItem comboItem37;
private DevComponents.Editors.ComboItem comboItem38;
private DevComponents.Editors.ComboItem comboItem39;
private DevComponents.Editors.ComboItem comboItem40;
private System.ComponentModel.IContainer components;
private HouseBE.Client clientBE;
private DevComponents.DotNetBar.LabelX labelX3;
private DevComponents.DotNetBar.LabelX labelX4;
private DevComponents.DotNetBar.Controls.TextBoxX txtClientname;
private DevComponents.DotNetBar.Controls.TextBoxX txtPhone;
private DevComponents.DotNetBar.Controls.TextBoxX txtaddress;
private DevComponents.DotNetBar.Controls.TextBoxX txtEmail;
private DevComponents.DotNetBar.Controls.ComboBoxEx cboEp;
private DevComponents.DotNetBar.Controls.TextBoxX txtRe;
private HouseBS.ClientBS clientBS;
private DataSet ds;
private DevComponents.Editors.ComboItem comboItem41;
private DevComponents.Editors.ComboItem comboItem42;
private int clientID=0;
public frmRegister()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// 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.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmRegister));
this.toolBar1 = new System.Windows.Forms.ToolBar();
this.toolBarButton1 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton2 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton3 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton4 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton6 = new System.Windows.Forms.ToolBarButton();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.labelX1 = new DevComponents.DotNetBar.LabelX();
this.txtClientname = new DevComponents.DotNetBar.Controls.TextBoxX();
this.labelX2 = new DevComponents.DotNetBar.LabelX();
this.txtPhone = new DevComponents.DotNetBar.Controls.TextBoxX();
this.comboItem1 = new DevComponents.Editors.ComboItem();
this.comboItem2 = new DevComponents.Editors.ComboItem();
this.txtaddress = new DevComponents.DotNetBar.Controls.TextBoxX();
this.labelX5 = new DevComponents.DotNetBar.LabelX();
this.txtEmail = new DevComponents.DotNetBar.Controls.TextBoxX();
this.labelX6 = new DevComponents.DotNetBar.LabelX();
this.cboEp = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.comboItem3 = new DevComponents.Editors.ComboItem();
this.comboItem4 = new DevComponents.Editors.ComboItem();
this.comboItem5 = new DevComponents.Editors.ComboItem();
this.comboItem6 = new DevComponents.Editors.ComboItem();
this.comboItem7 = new DevComponents.Editors.ComboItem();
this.comboItem8 = new DevComponents.Editors.ComboItem();
this.comboItem9 = new DevComponents.Editors.ComboItem();
this.comboItem10 = new DevComponents.Editors.ComboItem();
this.comboItem11 = new DevComponents.Editors.ComboItem();
this.comboItem12 = new DevComponents.Editors.ComboItem();
this.comboItem13 = new DevComponents.Editors.ComboItem();
this.comboItem14 = new DevComponents.Editors.ComboItem();
this.comboItem15 = new DevComponents.Editors.ComboItem();
this.comboItem16 = new DevComponents.Editors.ComboItem();
this.comboItem17 = new DevComponents.Editors.ComboItem();
this.comboItem22 = new DevComponents.Editors.ComboItem();
this.comboItem23 = new DevComponents.Editors.ComboItem();
this.comboItem24 = new DevComponents.Editors.ComboItem();
this.comboItem25 = new DevComponents.Editors.ComboItem();
this.comboItem26 = new DevComponents.Editors.ComboItem();
this.comboItem27 = new DevComponents.Editors.ComboItem();
this.comboItem28 = new DevComponents.Editors.ComboItem();
this.comboItem29 = new DevComponents.Editors.ComboItem();
this.comboItem18 = new DevComponents.Editors.ComboItem();
this.comboItem19 = new DevComponents.Editors.ComboItem();
this.comboItem20 = new DevComponents.Editors.ComboItem();
this.comboItem21 = new DevComponents.Editors.ComboItem();
this.comboItem30 = new DevComponents.Editors.ComboItem();
this.comboItem31 = new DevComponents.Editors.ComboItem();
this.comboItem32 = new DevComponents.Editors.ComboItem();
this.comboItem33 = new DevComponents.Editors.ComboItem();
this.comboItem34 = new DevComponents.Editors.ComboItem();
this.comboItem35 = new DevComponents.Editors.ComboItem();
this.comboItem36 = new DevComponents.Editors.ComboItem();
this.comboItem37 = new DevComponents.Editors.ComboItem();
this.comboItem38 = new DevComponents.Editors.ComboItem();
this.comboItem39 = new DevComponents.Editors.ComboItem();
this.comboItem40 = new DevComponents.Editors.ComboItem();
this.labelX3 = new DevComponents.DotNetBar.LabelX();
this.labelX4 = new DevComponents.DotNetBar.LabelX();
this.txtRe = new DevComponents.DotNetBar.Controls.TextBoxX();
this.comboItem41 = new DevComponents.Editors.ComboItem();
this.comboItem42 = new DevComponents.Editors.ComboItem();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.SuspendLayout();
//
// toolBar1
//
this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.toolBarButton1,
this.toolBarButton2,
this.toolBarButton3,
this.toolBarButton4,
this.toolBarButton6});
this.toolBar1.ButtonSize = new System.Drawing.Size(70, 50);
this.toolBar1.DropDownArrows = true;
this.toolBar1.ImageList = this.imageList1;
this.toolBar1.Location = new System.Drawing.Point(0, 0);
this.toolBar1.Name = "toolBar1";
this.toolBar1.ShowToolTips = true;
this.toolBar1.Size = new System.Drawing.Size(672, 56);
this.toolBar1.TabIndex = 0;
this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
//
// toolBarButton1
//
this.toolBarButton1.ImageIndex = 0;
this.toolBarButton1.Text = "添加";
this.toolBarButton1.ToolTipText = "添加信息";
//
// toolBarButton2
//
this.toolBarButton2.ImageIndex = 1;
this.toolBarButton2.Text = "保存";
this.toolBarButton2.ToolTipText = "保存信息";
//
// toolBarButton3
//
this.toolBarButton3.ImageIndex = 5;
this.toolBarButton3.Text = "编辑";
this.toolBarButton3.ToolTipText = "编辑信息";
//
// toolBarButton4
//
this.toolBarButton4.ImageIndex = 2;
this.toolBarButton4.Text = "打印";
this.toolBarButton4.ToolTipText = "打印";
//
// toolBarButton6
//
this.toolBarButton6.ImageIndex = 4;
this.toolBarButton6.Text = "退出";
this.toolBarButton6.ToolTipText = "退出";
//
// imageList1
//
this.imageList1.ImageSize = new System.Drawing.Size(30, 30);
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
//
// dataGrid1
//
this.dataGrid1.BackgroundColor = System.Drawing.SystemColors.ActiveCaptionText;
this.dataGrid1.CaptionBackColor = System.Drawing.Color.LightBlue;
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(0, 184);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.ReadOnly = true;
this.dataGrid1.Size = new System.Drawing.Size(672, 280);
this.dataGrid1.TabIndex = 1;
this.dataGrid1.Click += new System.EventHandler(this.dataGrid1_Click);
//
// labelX1
//
this.labelX1.Location = new System.Drawing.Point(16, 72);
this.labelX1.Name = "labelX1";
this.labelX1.Size = new System.Drawing.Size(75, 23);
this.labelX1.TabIndex = 2;
this.labelX1.Text = "<b>客户名称:</b>";
//
// txtClientname
//
this.txtClientname.AutoSize = false;
//
// txtClientname.Border
//
this.txtClientname.Border.Class = "TextBoxBorder";
this.txtClientname.Location = new System.Drawing.Point(88, 72);
this.txtClientname.Name = "txtClientname";
this.txtClientname.Size = new System.Drawing.Size(104, 21);
this.txtClientname.TabIndex = 3;
//
// labelX2
//
this.labelX2.Location = new System.Drawing.Point(208, 72);
this.labelX2.Name = "labelX2";
this.labelX2.Size = new System.Drawing.Size(72, 24);
this.labelX2.TabIndex = 4;
this.labelX2.Text = "<b>客户电话:</b>";
//
// txtPhone
//
this.txtPhone.AutoSize = false;
//
// txtPhone.Border
//
this.txtPhone.Border.Class = "TextBoxBorder";
this.txtPhone.Location = new System.Drawing.Point(280, 72);
this.txtPhone.Name = "txtPhone";
this.txtPhone.Size = new System.Drawing.Size(104, 21);
this.txtPhone.TabIndex = 5;
//
// comboItem1
//
this.comboItem1.Text = "男";
//
// comboItem2
//
this.comboItem2.Text = "女";
//
// txtaddress
//
this.txtaddress.AutoSize = false;
//
// txtaddress.Border
//
this.txtaddress.Border.Class = "TextBoxBorder";
this.txtaddress.Location = new System.Drawing.Point(88, 152);
this.txtaddress.Name = "txtaddress";
this.txtaddress.Size = new System.Drawing.Size(288, 21);
this.txtaddress.TabIndex = 9;
//
// labelX5
//
this.labelX5.Location = new System.Drawing.Point(16, 112);
this.labelX5.Name = "labelX5";
this.labelX5.Size = new System.Drawing.Size(75, 23);
this.labelX5.TabIndex = 10;
this.labelX5.Text = "<b>E-mail:</b>";
//
// txtEmail
//
this.txtEmail.AutoSize = false;
//
// txtEmail.Border
//
this.txtEmail.Border.Class = "TextBoxBorder";
this.txtEmail.Location = new System.Drawing.Point(88, 112);
this.txtEmail.Name = "txtEmail";
this.txtEmail.Size = new System.Drawing.Size(104, 21);
this.txtEmail.TabIndex = 11;
//
// labelX6
//
this.labelX6.Location = new System.Drawing.Point(208, 112);
this.labelX6.Name = "labelX6";
this.labelX6.Size = new System.Drawing.Size(75, 23);
this.labelX6.TabIndex = 12;
this.labelX6.Text = "<b>接待人员:</b>";
//
// cboEp
//
this.cboEp.DisplayMember = "Text";
this.cboEp.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cboEp.Items.AddRange(new object[] {
this.comboItem3,
this.comboItem4,
this.comboItem5,
this.comboItem6,
this.comboItem41,
this.comboItem42});
this.cboEp.Location = new System.Drawing.Point(280, 112);
this.cboEp.Name = "cboEp";
this.cboEp.Size = new System.Drawing.Size(104, 22);
this.cboEp.TabIndex = 13;
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -