📄 yddj.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace 中小型酒店管理信息系统
{
/// <summary>
/// yddj 的摘要说明。
/// </summary>
public class yddj : System.Windows.Forms.Form
{
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.ToolBar toolBar1;
private System.Windows.Forms.ToolBarButton tbarBtnSave;
private System.Windows.Forms.ToolBarButton tbarBtnDelete;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.DateTimePicker dateTimePicker2;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.TextBox textBox7;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.ComponentModel.IContainer components;
private DataSet ds = new DataSet();
private DataSet ds1 = new DataSet();
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.DataGrid dgrd_StockerData;
private LinkDataBase link = new LinkDataBase();
private LinkDataBase link1 = new LinkDataBase();
public yddj()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
DateTime dt = DateTime.Now;
string shijian = dt.Year.ToString()+"-"+dt.Month.ToString()+"-"+dt.Day.ToString();
string sendTableName = "jud_kfyd";
string sendStrSQL ="select pzhm as '凭证号码',gzdw as '工作单位',fjh as '房间号',rq as '日期',xm as '姓名',lxdh as '联系电话',ydrq as '预定日期',ydts as '预订天数',yj as '押金',yzrs as '预订人数',bz as '备注',ydfwy as '预定服务员',sj as '时间' from jud_kfyd where rq>='"+shijian+"'";
ds1 = link1.SelectDataBase(sendStrSQL,sendTableName);
this.dgrd_StockerData.DataSource = ds1;
this.dgrd_StockerData.DataMember = "jud_kfyd";
//
// 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(yddj));
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.toolBar1 = new System.Windows.Forms.ToolBar();
this.tbarBtnSave = new System.Windows.Forms.ToolBarButton();
this.tbarBtnDelete = new System.Windows.Forms.ToolBarButton();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.listBox1 = new System.Windows.Forms.ListBox();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.textBox7 = new System.Windows.Forms.TextBox();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.dgrd_StockerData = new System.Windows.Forms.DataGrid();
this.label12 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dgrd_StockerData)).BeginInit();
this.SuspendLayout();
//
// imageList1
//
this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
//
// toolBar1
//
this.toolBar1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.tbarBtnSave,
this.tbarBtnDelete});
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(720, 29);
this.toolBar1.TabIndex = 5;
this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
//
// tbarBtnSave
//
this.tbarBtnSave.ImageIndex = 0;
this.tbarBtnSave.ToolTipText = "保存修改";
//
// tbarBtnDelete
//
this.tbarBtnDelete.ImageIndex = 1;
this.tbarBtnDelete.ToolTipText = "删除数据";
//
// label1
//
this.label1.Location = new System.Drawing.Point(56, 48);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 16);
this.label1.TabIndex = 6;
this.label1.Text = "工作单位";
//
// label2
//
this.label2.Location = new System.Drawing.Point(368, 48);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(48, 16);
this.label2.TabIndex = 7;
this.label2.Text = "房间号";
//
// label3
//
this.label3.Location = new System.Drawing.Point(56, 80);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(32, 16);
this.label3.TabIndex = 8;
this.label3.Text = "日期";
//
// label4
//
this.label4.Location = new System.Drawing.Point(56, 112);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(40, 16);
this.label4.TabIndex = 9;
this.label4.Text = "姓名";
//
// label5
//
this.label5.Location = new System.Drawing.Point(48, 144);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 16);
this.label5.TabIndex = 10;
this.label5.Text = "联系电话";
//
// label6
//
this.label6.Location = new System.Drawing.Point(368, 144);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(56, 16);
this.label6.TabIndex = 11;
this.label6.Text = "预订日期";
//
// label7
//
this.label7.Location = new System.Drawing.Point(544, 144);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(56, 16);
this.label7.TabIndex = 12;
this.label7.Text = "预定天数";
//
// label8
//
this.label8.Location = new System.Drawing.Point(56, 184);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(32, 16);
this.label8.TabIndex = 13;
this.label8.Text = "押金";
//
// label9
//
this.label9.Location = new System.Drawing.Point(208, 184);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(56, 16);
this.label9.TabIndex = 14;
this.label9.Text = "预住人数";
//
// label10
//
this.label10.Location = new System.Drawing.Point(56, 216);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(48, 16);
this.label10.TabIndex = 15;
this.label10.Text = "备注";
//
// label11
//
this.label11.Location = new System.Drawing.Point(368, 184);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(72, 16);
this.label11.TabIndex = 16;
this.label11.Text = "预定服务员";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(120, 40);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(216, 21);
this.textBox1.TabIndex = 17;
this.textBox1.Text = "textBox1";
this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox1_KeyPress);
//
// listBox1
//
this.listBox1.ItemHeight = 12;
this.listBox1.Location = new System.Drawing.Point(424, 48);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(88, 64);
this.listBox1.TabIndex = 18;
//
// dateTimePicker1
//
this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.dateTimePicker1.Location = new System.Drawing.Point(152, 72);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(160, 21);
this.dateTimePicker1.TabIndex = 19;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(120, 112);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(144, 21);
this.textBox2.TabIndex = 20;
this.textBox2.Text = "textBox2";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(120, 144);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(160, 21);
this.textBox3.TabIndex = 21;
this.textBox3.Text = "textBox3";
//
// dateTimePicker2
//
this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.dateTimePicker2.Location = new System.Drawing.Point(432, 136);
this.dateTimePicker2.Name = "dateTimePicker2";
this.dateTimePicker2.Size = new System.Drawing.Size(96, 21);
this.dateTimePicker2.TabIndex = 22;
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(608, 136);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(64, 21);
this.textBox4.TabIndex = 23;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -