📄 frmeditservice.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.Odbc;
namespace HotelApp
{
/// <summary>
/// frmEditService 的摘要说明。
/// </summary>
public class frmEditService : System.Windows.Forms.Form
{
protected DBService_2 dbcon4;
protected DataSet dsQuery;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button btnSaveService;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.Button btnAddService;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label lblDec;
private System.Windows.Forms.ListBox lbxAll;
private System.Windows.Forms.ListBox lbxThis;
private System.Windows.Forms.TextBox textBox1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public frmEditService()
{
//
// 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.lbxAll = new System.Windows.Forms.ListBox();
this.lbxThis = new System.Windows.Forms.ListBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.btnSaveService = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.btnAddService = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lblDec = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// lbxAll
//
this.lbxAll.ItemHeight = 12;
this.lbxAll.Location = new System.Drawing.Point(15, 18);
this.lbxAll.Name = "lbxAll";
this.lbxAll.Size = new System.Drawing.Size(96, 148);
this.lbxAll.TabIndex = 0;
//
// lbxThis
//
this.lbxThis.ItemHeight = 12;
this.lbxThis.Location = new System.Drawing.Point(174, 18);
this.lbxThis.Name = "lbxThis";
this.lbxThis.Size = new System.Drawing.Size(96, 148);
this.lbxThis.TabIndex = 1;
//
// button1
//
this.button1.Location = new System.Drawing.Point(126, 20);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(32, 24);
this.button1.TabIndex = 2;
this.button1.Text = ">";
//
// button2
//
this.button2.Location = new System.Drawing.Point(126, 62);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(32, 24);
this.button2.TabIndex = 3;
this.button2.Text = ">>";
//
// button3
//
this.button3.Location = new System.Drawing.Point(126, 101);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(32, 24);
this.button3.TabIndex = 4;
this.button3.Text = "<<";
//
// button4
//
this.button4.Location = new System.Drawing.Point(126, 140);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(32, 24);
this.button4.TabIndex = 5;
this.button4.Text = "<";
//
// btnSaveService
//
this.btnSaveService.Location = new System.Drawing.Point(330, 60);
this.btnSaveService.Name = "btnSaveService";
this.btnSaveService.Size = new System.Drawing.Size(88, 23);
this.btnSaveService.TabIndex = 6;
this.btnSaveService.Text = "保存";
//
// btnExit
//
this.btnExit.Location = new System.Drawing.Point(330, 96);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(88, 23);
this.btnExit.TabIndex = 7;
this.btnExit.Text = "退出";
//
// btnAddService
//
this.btnAddService.Location = new System.Drawing.Point(330, 21);
this.btnAddService.Name = "btnAddService";
this.btnAddService.Size = new System.Drawing.Size(88, 23);
this.btnAddService.TabIndex = 8;
this.btnAddService.Text = "新增服务项目";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.lbxThis);
this.groupBox1.Controls.Add(this.lbxAll);
this.groupBox1.Controls.Add(this.button4);
this.groupBox1.Controls.Add(this.button3);
this.groupBox1.Controls.Add(this.button2);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Controls.Add(this.lblDec);
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Location = new System.Drawing.Point(21, 14);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(285, 267);
this.groupBox1.TabIndex = 9;
this.groupBox1.TabStop = false;
//
// lblDec
//
this.lblDec.Location = new System.Drawing.Point(18, 177);
this.lblDec.Name = "lblDec";
this.lblDec.Size = new System.Drawing.Size(66, 12);
this.lblDec.TabIndex = 12;
this.lblDec.Text = "服务描述:";
//
// textBox1
//
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox1.Location = new System.Drawing.Point(18, 195);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ReadOnly = true;
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBox1.Size = new System.Drawing.Size(252, 57);
this.textBox1.TabIndex = 13;
this.textBox1.Text = "";
//
// frmEditService
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(439, 302);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btnAddService);
this.Controls.Add(this.btnExit);
this.Controls.Add(this.btnSaveService);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmEditService";
this.Text = "客房服务项目管理";
this.Load += new System.EventHandler(this.frmEditService_Load);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void frmEditService_Load(object sender, System.EventArgs e)
{
// string sqlstr = "select roomservice.serviceID as '服务编号',";
// sqlstr += "roomservice.serviceName as '服务名称',roomservice.description as '服务描述'";
// sqlstr += " from roominfo inner join guestroom inner join roomtype inner join roomservice inner join hotel";
// sqlstr += " on roominfo.roomID = guestroom.roomID and roominfo.serviceID = roomservice.serviceID";
// sqlstr += " and hotel.hotelID = guestroom.hotelID and guestroom.roomType = roomtype.typeid";
// sqlstr += " where roomtype.typename = '" + e.Node.Text + "' and hotel.hotelID = '" + GlobalVars.temp_ID + "'";
// dsQuery = dbcon4.executeBySQL(sqlstr_3);
// dsQuery.Tables[0].Rows[0];
// lbxThis.Items.Add();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -