📄 frmedithotel.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using System.Drawing.Imaging;
using System.Data.Odbc;
namespace HotelApp
{
/// <summary>
/// frmEditHotel 的摘要说明。
/// </summary>
public class frmEditHotel : System.Windows.Forms.Form
{
protected DBService_2 dbcon2;
protected DataSet dsEdit;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txtReNew;
private System.Windows.Forms.TextBox txtNewPwd;
private System.Windows.Forms.Label LabelReNew;
private System.Windows.Forms.Label LabelNewPwd;
private System.Windows.Forms.TextBox txtOldPwd;
private System.Windows.Forms.Label LabelOldPwd;
private System.Windows.Forms.PictureBox picboxHotel;
private System.Windows.Forms.TextBox txtHotelDes;
private System.Windows.Forms.TextBox txtHotelLevel;
private System.Windows.Forms.TextBox txtHotelPlace;
private System.Windows.Forms.TextBox txtHotelAddr;
private System.Windows.Forms.TextBox txtHotelName;
private System.Windows.Forms.Label LabelImage;
private System.Windows.Forms.Label LabelHotelDes;
private System.Windows.Forms.Label LabelHotelLevel;
private System.Windows.Forms.Label LabelHotelPlace;
private System.Windows.Forms.Label LabelHotelAddr;
private System.Windows.Forms.Label LabelHotelName;
private DataRow row;
private System.Windows.Forms.OpenFileDialog openFD;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Button btnChange;
private System.Windows.Forms.Button btnClose;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public frmEditHotel()
{
//
// 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.openFD = new System.Windows.Forms.OpenFileDialog();
this.btnSave = new System.Windows.Forms.Button();
this.btnChange = new System.Windows.Forms.Button();
this.btnClose = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtReNew = new System.Windows.Forms.TextBox();
this.txtNewPwd = new System.Windows.Forms.TextBox();
this.LabelReNew = new System.Windows.Forms.Label();
this.LabelNewPwd = new System.Windows.Forms.Label();
this.txtOldPwd = new System.Windows.Forms.TextBox();
this.LabelOldPwd = new System.Windows.Forms.Label();
this.picboxHotel = new System.Windows.Forms.PictureBox();
this.txtHotelDes = new System.Windows.Forms.TextBox();
this.txtHotelLevel = new System.Windows.Forms.TextBox();
this.txtHotelPlace = new System.Windows.Forms.TextBox();
this.txtHotelAddr = new System.Windows.Forms.TextBox();
this.txtHotelName = new System.Windows.Forms.TextBox();
this.LabelImage = new System.Windows.Forms.Label();
this.LabelHotelDes = new System.Windows.Forms.Label();
this.LabelHotelLevel = new System.Windows.Forms.Label();
this.LabelHotelPlace = new System.Windows.Forms.Label();
this.LabelHotelAddr = new System.Windows.Forms.Label();
this.LabelHotelName = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// btnSave
//
this.btnSave.Location = new System.Drawing.Point(435, 344);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(81, 23);
this.btnSave.TabIndex = 17;
this.btnSave.Text = "保存修改(&S)";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// btnChange
//
this.btnChange.Location = new System.Drawing.Point(339, 344);
this.btnChange.Name = "btnChange";
this.btnChange.Size = new System.Drawing.Size(81, 23);
this.btnChange.TabIndex = 18;
this.btnChange.Text = "更换图片(&U)";
this.btnChange.Click += new System.EventHandler(this.btnChange_Click);
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(528, 344);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(81, 23);
this.btnClose.TabIndex = 19;
this.btnClose.Text = "关闭(&C)";
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txtReNew);
this.groupBox1.Controls.Add(this.txtNewPwd);
this.groupBox1.Controls.Add(this.LabelReNew);
this.groupBox1.Controls.Add(this.LabelNewPwd);
this.groupBox1.Controls.Add(this.txtOldPwd);
this.groupBox1.Controls.Add(this.LabelOldPwd);
this.groupBox1.Controls.Add(this.picboxHotel);
this.groupBox1.Controls.Add(this.txtHotelDes);
this.groupBox1.Controls.Add(this.txtHotelLevel);
this.groupBox1.Controls.Add(this.txtHotelPlace);
this.groupBox1.Controls.Add(this.txtHotelAddr);
this.groupBox1.Controls.Add(this.txtHotelName);
this.groupBox1.Controls.Add(this.LabelImage);
this.groupBox1.Controls.Add(this.LabelHotelDes);
this.groupBox1.Controls.Add(this.LabelHotelLevel);
this.groupBox1.Controls.Add(this.LabelHotelPlace);
this.groupBox1.Controls.Add(this.LabelHotelAddr);
this.groupBox1.Controls.Add(this.LabelHotelName);
this.groupBox1.Location = new System.Drawing.Point(9, 28);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(603, 300);
this.groupBox1.TabIndex = 26;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "酒店资料";
this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter);
//
// txtReNew
//
this.txtReNew.Location = new System.Drawing.Point(414, 108);
this.txtReNew.Name = "txtReNew";
this.txtReNew.PasswordChar = '*';
this.txtReNew.Size = new System.Drawing.Size(156, 21);
this.txtReNew.TabIndex = 43;
this.txtReNew.Text = "";
//
// txtNewPwd
//
this.txtNewPwd.Location = new System.Drawing.Point(414, 72);
this.txtNewPwd.Name = "txtNewPwd";
this.txtNewPwd.PasswordChar = '*';
this.txtNewPwd.Size = new System.Drawing.Size(156, 21);
this.txtNewPwd.TabIndex = 42;
this.txtNewPwd.Text = "";
//
// LabelReNew
//
this.LabelReNew.Location = new System.Drawing.Point(330, 111);
this.LabelReNew.Name = "LabelReNew";
this.LabelReNew.Size = new System.Drawing.Size(81, 12);
this.LabelReNew.TabIndex = 41;
this.LabelReNew.Text = "确认新密码:";
//
// LabelNewPwd
//
this.LabelNewPwd.Location = new System.Drawing.Point(330, 75);
this.LabelNewPwd.Name = "LabelNewPwd";
this.LabelNewPwd.Size = new System.Drawing.Size(54, 12);
this.LabelNewPwd.TabIndex = 40;
this.LabelNewPwd.Text = "新密码:";
//
// txtOldPwd
//
this.txtOldPwd.Location = new System.Drawing.Point(414, 36);
this.txtOldPwd.Name = "txtOldPwd";
this.txtOldPwd.ReadOnly = true;
this.txtOldPwd.Size = new System.Drawing.Size(156, 21);
this.txtOldPwd.TabIndex = 39;
this.txtOldPwd.Text = "";
//
// LabelOldPwd
//
this.LabelOldPwd.Location = new System.Drawing.Point(330, 36);
this.LabelOldPwd.Name = "LabelOldPwd";
this.LabelOldPwd.Size = new System.Drawing.Size(54, 12);
this.LabelOldPwd.TabIndex = 38;
this.LabelOldPwd.Text = "旧密码:";
//
// picboxHotel
//
this.picboxHotel.Location = new System.Drawing.Point(420, 150);
this.picboxHotel.Name = "picboxHotel";
this.picboxHotel.Size = new System.Drawing.Size(150, 130);
this.picboxHotel.TabIndex = 37;
this.picboxHotel.TabStop = false;
//
// txtHotelDes
//
this.txtHotelDes.Location = new System.Drawing.Point(102, 183);
this.txtHotelDes.Multiline = true;
this.txtHotelDes.Name = "txtHotelDes";
this.txtHotelDes.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtHotelDes.Size = new System.Drawing.Size(192, 98);
this.txtHotelDes.TabIndex = 36;
this.txtHotelDes.Text = "";
//
// txtHotelLevel
//
this.txtHotelLevel.Location = new System.Drawing.Point(102, 72);
this.txtHotelLevel.Name = "txtHotelLevel";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -