c# sql 多个checkbox (求教 急)

cai_niao_ing 2016-12-07 12:02:01
求教,c# 制造winform,
1. (重点解决)想checkbox打勾时,sql table fdOrder 增加信息
1. 例如:
顾客1(房间001)打勾checkbox:Ba(3Qty),Bb(2Qty),La(5Qty) --》 当摁Confirm,sql 数据增加三行
每行数据如下:
fdSeqId, fdRmId, fdCusId, fdDate, fdItem1,fdItem2,fdItem2,fdPrice,fdQty
1 | 001(form要求输入)| 1| datepick(form要求输入)| 51|01|20|3
2 | 001(form要求输入)| 1| datepick(form要求输入)| 51|02|15|2
3 | 001(form要求输入)| 1| datepick(form要求输入)| 52|01|35|5
如此类推。。。

2. 如何从sql查找fdCusId(由顾客输入房间号(tbRm) 和 日期(datepick)得出顾客号码 到时 到时用来存入tfdOrder)
sql table 如下:
tFdOrder:
fdSeqId | fdRmId | fdCusId | fdDate | fdItem1 | fdItem2 | fdItem2 | fdPrice | fdQty

tCustomer:
cusSeqId | cusName1 | cusName2 | cusPhone | cusEmail1 | cusEmail2

tRoom:
rmId | rmType | rmResSrt | rmResEnd | rmChkStr | rmChkEnd

tUsageRm:
usgSeqId | usgRmId | usgResSrt | rmResEnd | rmChkStr | rmChkEnd |...| usgCusId


[code=csharp]
// MakeOrder.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace WindowsFormsApplication1
{
public partial class MakeOrder : Form
{
SqlConnection con = new SqlConnection("Data Source=SONY\\SQLEXPRESS;Initial Catalog=HoltelMan;Integrated Security=True");

public MakeOrder()
{
InitializeComponent();
}
private void MakeOrder_Load(object sender, EventArgs e)
{
groupBox1.Enabled = false;
}
private void button3_Click(object sender, EventArgs e)
{
if (tbRm.Text == "") MessageBox.Show("Please Enter Room Number", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
else { groupBox1.Enabled = true; tbTotal.Enabled = true; }
}
String datepick;

private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
{
int diff = DateTime.Compare(dateTimePicker1.Value, DateTime.Now);
// MessageBox.Show(DateTime.Now.ToString()+ dateCheckIn.Value.ToString());

if (string.Compare(dateTimePicker1.Value.ToString().Substring(0, 10), DateTime.Now.ToString().Substring(0, 10)) < 0)
{
dateTimePicker1.Value = DateTime.Now;
// MessageBox.Show("Please Select valide Date!!! " + diff.ToString(), " ", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
datepick = dateTimePicker1.Value.ToString().Substring(6, 4) + dateTimePicker1.Value.ToString().Substring(0, 2)
+ dateTimePicker1.Value.ToString().Substring(3, 2);
}
dateTimePicker1.Focus();
// MessageBox.Show("din = " + dIn);
}


private void btnConfirm_Click(object sender, EventArgs e)
{
double price = 0.0;
int breakfast = 51;
int lunch = 52;
int dinner = 53;
string breakfastString = breakfast.ToString();
string lunchString = lunch.ToString();
string dinnerString = dinner.ToString();

if (chkBa.Checked) price += Int32.Parse(chkBa.Text) * double.Parse(numBa.Value.ToString());
if (chkBb.Checked) price += Int32.Parse(chkBb.Text) * double.Parse(numBb.Value.ToString());
if (chkLa.Checked) price += Int32.Parse(chkLa.Text) * double.Parse(numLa.Value.ToString());
if (chkLb.Checked) price += Int32.Parse(chkLb.Text) * double.Parse(numLb.Value.ToString());
if (chkDa.Checked) price += Int32.Parse(chkDa.Text) * double.Parse(numDa.Value.ToString());
if (chkDb.Checked) price += Int32.Parse(chkDb.Text) * double.Parse(numDb.Value.ToString());

MessageBox.Show(price.ToString());
tbTotal.Text = price.ToString();
MessageBox.Show("Confirm Food Order?", "Confirm", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);

con.Open();
int maxId = 0;
string strSQL = "SELECT MAX(fdSeqId) FROM tFdOrder";
SqlCommand cmd1 = new SqlCommand(strSQL, con);
SqlDataReader MyRead1 = cmd1.ExecuteReader();
if (MyRead1.Read())
{
maxId = (int)MyRead1[0] + 1;
}
MyRead1.Close();

strSQL = "INSERT INTO tFdOrder ( fdSeqId, fdRmId, fdCusId, fdDate, fdItem1, fdItem2,fdPrice,fdQty) VALUES ('"
+ maxId.ToString() + "','" + tbRm.Text.ToString() + "','" + tbCusId.Text.ToString() + "','" + datepick
+ "'," + 51 + "," + 01 + ",'" + s + "','" + numBa + "');";
SqlCommand cmd2 = new SqlCommand(strSQL, con);
SqlDataReader MyRead2 = cmd2.ExecuteReader();
if (MyRead2.RecordsAffected < 1)
{
MessageBox.Show("INSERT tFdOrder Failed!!!", " ", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
// MessageBox.Show("INSERT tCustomer Succeeded!!!", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
}


con.Close();


}
private void textBox2_TextChanged(object sender, EventArgs e)
{

}
private void button1_Click(object sender, EventArgs e)
{
this.Visible = false;
Form hotelMain = new hotelMain();
hotelMain.ShowDialog();

}

private void button2_Click(object sender, EventArgs e)
{
this.Visible = false;
Form SubMenu = new SubMenu();
SubMenu.ShowDialog();

}



}
}

/*
con.Open();

int maxId = 0;
string strSQL = "SELECT MAX(fdSeqId) FROM tFdOrder";
SqlCommand cmd1 = new SqlCommand(strSQL, con);
SqlDataReader MyRead1 = cmd1.ExecuteReader();
if (MyRead1.Read())
{
maxId = (int)MyRead1[0] + 1;
}
MyRead1.Close();

strSQL = "INSERT INTO tFdOrder ( fdSeqId, fdRmId, fdCusId, fdDate, fdItem1, fdItem2,fdPrice,fdQty) VALUES ('"
+ maxId.ToString() + "','" + tbRm.Text.ToString() + "','" + tbCusId.Text.ToString() + "','" + datepick
+ "'," + 51 + "," + 01 + ",'" + price.ToString() + "','" + numBa + "');";
SqlCommand cmd2 = new SqlCommand(strSQL, con);
SqlDataReader MyRead2 = cmd2.ExecuteReader();
if (MyRead2.RecordsAffected < 1)
{
MessageBox.Show("INSERT tFdOrder Failed!!!", " ", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
// MessageBox.Show("INSERT tCustomer Succeeded!!!", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
}


con.Close();

*/

...全文
255 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_33603542 2016-12-09
  • 打赏
  • 举报
回复
先看看代码
yaojunyi3721 2016-12-09
  • 打赏
  • 举报
回复
我的哥啊,辣眼睛看着。
cai_niao_ing 2016-12-07
  • 打赏
  • 举报
回复
// // tbTotal // this.tbTotal.Location = new System.Drawing.Point(866, 82); this.tbTotal.Name = "tbTotal"; this.tbTotal.Size = new System.Drawing.Size(100, 35); this.tbTotal.TabIndex = 64; this.tbTotal.TextChanged += new System.EventHandler(this.textBox2_TextChanged); // // lbDate // this.lbDate.AutoSize = true; this.lbDate.Location = new System.Drawing.Point(310, 22); this.lbDate.Name = "lbDate"; this.lbDate.Size = new System.Drawing.Size(58, 27); this.lbDate.TabIndex = 65; this.lbDate.Text = "Date"; // // btnEnter // this.btnEnter.Location = new System.Drawing.Point(616, 17); this.btnEnter.Name = "btnEnter"; this.btnEnter.Size = new System.Drawing.Size(99, 35); this.btnEnter.TabIndex = 67; this.btnEnter.Text = "Enter"; this.btnEnter.UseVisualStyleBackColor = true; this.btnEnter.Click += new System.EventHandler(this.button3_Click); // // tbCusId // this.tbCusId.Location = new System.Drawing.Point(161, 74); this.tbCusId.Name = "tbCusId"; this.tbCusId.Size = new System.Drawing.Size(111, 35); this.tbCusId.TabIndex = 69; // // lbCusId // this.lbCusId.AutoSize = true; this.lbCusId.Location = new System.Drawing.Point(19, 82); this.lbCusId.Name = "lbCusId"; this.lbCusId.Size = new System.Drawing.Size(136, 27); this.lbCusId.TabIndex = 68; this.lbCusId.Text = "Customer ID"; // // btnMain // this.btnMain.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnMain.Location = new System.Drawing.Point(1053, 639); this.btnMain.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.btnMain.Name = "btnMain"; this.btnMain.Size = new System.Drawing.Size(84, 37); this.btnMain.TabIndex = 34; this.btnMain.Text = "Main"; this.btnMain.UseVisualStyleBackColor = true; this.btnMain.Click += new System.EventHandler(this.button1_Click); // // btnBack // this.btnBack.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnBack.Location = new System.Drawing.Point(937, 639); this.btnBack.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.btnBack.Name = "btnBack"; this.btnBack.Size = new System.Drawing.Size(84, 37); this.btnBack.TabIndex = 35; this.btnBack.Text = "Back"; this.btnBack.UseVisualStyleBackColor = true; this.btnBack.Click += new System.EventHandler(this.button2_Click); // // dateTimePicker1 // this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Short; this.dateTimePicker1.Location = new System.Drawing.Point(374, 17); this.dateTimePicker1.Name = "dateTimePicker1"; this.dateTimePicker1.Size = new System.Drawing.Size(200, 35); this.dateTimePicker1.TabIndex = 70; this.dateTimePicker1.ValueChanged += new System.EventHandler(this.dateTimePicker1_ValueChanged); // // MakeOrder // this.AutoScaleDimensions = new System.Drawing.SizeF(13F, 27F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1150, 686); this.Controls.Add(this.dateTimePicker1); this.Controls.Add(this.tbCusId); this.Controls.Add(this.lbCusId); this.Controls.Add(this.btnEnter); this.Controls.Add(this.tbTotal); this.Controls.Add(this.lbDate); this.Controls.Add(this.lbTotal); this.Controls.Add(this.groupBox1); this.Controls.Add(this.btnConfirm); this.Controls.Add(this.tbRm); this.Controls.Add(this.lbRm); this.Controls.Add(this.btnBack); this.Controls.Add(this.btnMain); this.Font = new System.Drawing.Font("Times New Roman", 12F); this.Margin = new System.Windows.Forms.Padding(4); this.Name = "MakeOrder"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "MakeOrder"; this.Load += new System.EventHandler(this.MakeOrder_Load); ((System.ComponentModel.ISupportInitialize)(this.pbDb)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbLb)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbBb)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbDa)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbLa)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbBa)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numDb)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numLb)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numBb)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numDa)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numLa)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numBa)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Button btnMain; private System.Windows.Forms.Button btnBack; private System.Windows.Forms.Label lbRm; private System.Windows.Forms.TextBox tbRm; private System.Windows.Forms.ImageList imageList1; private System.Windows.Forms.PictureBox pbBa; private System.Windows.Forms.PictureBox pbLa; private System.Windows.Forms.PictureBox pbDa; private System.Windows.Forms.PictureBox pbBb; private System.Windows.Forms.PictureBox pbLb; private System.Windows.Forms.PictureBox pbDb; private System.Windows.Forms.Button btnConfirm; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.CheckBox chkDb; private System.Windows.Forms.CheckBox chkLb; private System.Windows.Forms.CheckBox chkBb; private System.Windows.Forms.CheckBox chkDa; private System.Windows.Forms.CheckBox chkLa; private System.Windows.Forms.CheckBox chkBa; private System.Windows.Forms.Label lbDb; private System.Windows.Forms.Label lbLb; private System.Windows.Forms.Label lbBb; private System.Windows.Forms.Label lbDa; private System.Windows.Forms.Label lbLa; private System.Windows.Forms.Label lbBa; private System.Windows.Forms.Label lbTotal; private System.Windows.Forms.TextBox tbTotal; private System.Windows.Forms.Label lbDate; private System.Windows.Forms.NumericUpDown numDb; private System.Windows.Forms.NumericUpDown numLb; private System.Windows.Forms.NumericUpDown numBb; private System.Windows.Forms.NumericUpDown numDa; private System.Windows.Forms.NumericUpDown numLa; private System.Windows.Forms.NumericUpDown numBa; private System.Windows.Forms.Button btnEnter; private System.Windows.Forms.TextBox tbCusId; private System.Windows.Forms.Label lbCusId; private System.Windows.Forms.DateTimePicker dateTimePicker1; } } [/code]
cai_niao_ing 2016-12-07
  • 打赏
  • 举报
回复
// // pbLa // this.pbLa.Image = global::WindowsFormsApplication1.Properties.Resources.La; this.pbLa.Location = new System.Drawing.Point(19, 180); this.pbLa.Name = "pbLa"; this.pbLa.Size = new System.Drawing.Size(150, 150); this.pbLa.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pbLa.TabIndex = 41; this.pbLa.TabStop = false; // // pbBa // this.pbBa.Image = global::WindowsFormsApplication1.Properties.Resources.Ba; this.pbBa.Location = new System.Drawing.Point(19, 12); this.pbBa.Name = "pbBa"; this.pbBa.Size = new System.Drawing.Size(150, 150); this.pbBa.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pbBa.TabIndex = 40; this.pbBa.TabStop = false; // // groupBox1 // this.groupBox1.Controls.Add(this.numDb); this.groupBox1.Controls.Add(this.numLb); this.groupBox1.Controls.Add(this.numBb); this.groupBox1.Controls.Add(this.numDa); this.groupBox1.Controls.Add(this.numLa); this.groupBox1.Controls.Add(this.numBa); this.groupBox1.Controls.Add(this.lbDb); this.groupBox1.Controls.Add(this.lbLb); this.groupBox1.Controls.Add(this.lbBb); this.groupBox1.Controls.Add(this.lbDa); this.groupBox1.Controls.Add(this.lbLa); this.groupBox1.Controls.Add(this.lbBa); this.groupBox1.Controls.Add(this.chkDb); this.groupBox1.Controls.Add(this.chkLb); this.groupBox1.Controls.Add(this.chkBb); this.groupBox1.Controls.Add(this.chkDa); this.groupBox1.Controls.Add(this.chkLa); this.groupBox1.Controls.Add(this.chkBa); this.groupBox1.Controls.Add(this.pbDa); this.groupBox1.Controls.Add(this.pbBa); this.groupBox1.Controls.Add(this.pbDb); this.groupBox1.Controls.Add(this.pbLb); this.groupBox1.Controls.Add(this.pbLa); this.groupBox1.Controls.Add(this.pbBb); this.groupBox1.Location = new System.Drawing.Point(27, 125); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(1086, 506); this.groupBox1.TabIndex = 47; this.groupBox1.TabStop = false; // // numDb // this.numDb.Location = new System.Drawing.Point(859, 446); this.numDb.Name = "numDb"; this.numDb.Size = new System.Drawing.Size(120, 35); this.numDb.TabIndex = 68; // // numLb // this.numLb.Location = new System.Drawing.Point(859, 272); this.numLb.Name = "numLb"; this.numLb.Size = new System.Drawing.Size(120, 35); this.numLb.TabIndex = 67; // // numBb // this.numBb.Location = new System.Drawing.Point(859, 115); this.numBb.Name = "numBb"; this.numBb.Size = new System.Drawing.Size(120, 35); this.numBb.TabIndex = 66; // // numDa // this.numDa.Location = new System.Drawing.Point(295, 440); this.numDa.Name = "numDa"; this.numDa.Size = new System.Drawing.Size(120, 35); this.numDa.TabIndex = 65; // // numLa // this.numLa.Location = new System.Drawing.Point(295, 272); this.numLa.Name = "numLa"; this.numLa.Size = new System.Drawing.Size(120, 35); this.numLa.TabIndex = 64; // // numBa // this.numBa.Location = new System.Drawing.Point(207, 129); this.numBa.Name = "numBa"; this.numBa.Size = new System.Drawing.Size(120, 35); this.numBa.TabIndex = 63; // // lbDb // this.lbDb.AutoSize = true; this.lbDb.Location = new System.Drawing.Point(755, 448); this.lbDb.Name = "lbDb"; this.lbDb.Size = new System.Drawing.Size(96, 27); this.lbDb.TabIndex = 62; this.lbDb.Text = "$ 130.00"; // // lbLb // this.lbLb.AutoSize = true; this.lbLb.Location = new System.Drawing.Point(755, 280); this.lbLb.Name = "lbLb"; this.lbLb.Size = new System.Drawing.Size(84, 27); this.lbLb.TabIndex = 61; this.lbLb.Text = "$ 35.00"; // // lbBb // this.lbBb.AutoSize = true; this.lbBb.Location = new System.Drawing.Point(755, 117); this.lbBb.Name = "lbBb"; this.lbBb.Size = new System.Drawing.Size(84, 27); this.lbBb.TabIndex = 60; this.lbBb.Text = "$ 15.00"; // // lbDa // this.lbDa.AutoSize = true; this.lbDa.Location = new System.Drawing.Point(202, 448); this.lbDa.Name = "lbDa"; this.lbDa.Size = new System.Drawing.Size(84, 27); this.lbDa.TabIndex = 59; this.lbDa.Text = "$ 50.00"; // // lbLa // this.lbLa.AutoSize = true; this.lbLa.Location = new System.Drawing.Point(202, 280); this.lbLa.Name = "lbLa"; this.lbLa.Size = new System.Drawing.Size(84, 27); this.lbLa.TabIndex = 58; this.lbLa.Text = "$ 30.00"; // // lbBa // this.lbBa.AutoSize = true; this.lbBa.Location = new System.Drawing.Point(202, 62); this.lbBa.Name = "lbBa"; this.lbBa.Size = new System.Drawing.Size(84, 27); this.lbBa.TabIndex = 57; this.lbBa.Text = "$ 20.00"; // // chkDb // this.chkDb.AutoSize = true; this.chkDb.Location = new System.Drawing.Point(760, 403); this.chkDb.Name = "chkDb"; this.chkDb.Size = new System.Drawing.Size(116, 31); this.chkDb.TabIndex = 51; this.chkDb.Text = "$130.00"; this.chkDb.UseVisualStyleBackColor = true; // // chkLb // this.chkLb.AutoSize = true; this.chkLb.Location = new System.Drawing.Point(760, 235); this.chkLb.Name = "chkLb"; this.chkLb.Size = new System.Drawing.Size(104, 31); this.chkLb.TabIndex = 50; this.chkLb.Text = "$35.00"; this.chkLb.UseVisualStyleBackColor = true; // // chkBb // this.chkBb.AutoSize = true; this.chkBb.Location = new System.Drawing.Point(760, 62); this.chkBb.Name = "chkBb"; this.chkBb.Size = new System.Drawing.Size(104, 31); this.chkBb.TabIndex = 49; this.chkBb.Text = "$15.00"; this.chkBb.UseVisualStyleBackColor = true; // // chkDa // this.chkDa.AutoSize = true; this.chkDa.Location = new System.Drawing.Point(207, 403); this.chkDa.Name = "chkDa"; this.chkDa.Size = new System.Drawing.Size(104, 31); this.chkDa.TabIndex = 48; this.chkDa.Text = "$50.00"; this.chkDa.UseVisualStyleBackColor = true; // // chkLa // this.chkLa.AutoSize = true; this.chkLa.Location = new System.Drawing.Point(207, 235); this.chkLa.Name = "chkLa"; this.chkLa.Size = new System.Drawing.Size(104, 31); this.chkLa.TabIndex = 47; this.chkLa.Text = "$30.00"; this.chkLa.UseVisualStyleBackColor = true; // // chkBa // this.chkBa.AutoSize = true; this.chkBa.Location = new System.Drawing.Point(207, 92); this.chkBa.Name = "chkBa"; this.chkBa.Size = new System.Drawing.Size(104, 31); this.chkBa.TabIndex = 46; this.chkBa.Text = "$20.00"; this.chkBa.UseVisualStyleBackColor = true; // // lbTotal // this.lbTotal.AutoSize = true; this.lbTotal.Location = new System.Drawing.Point(779, 82); this.lbTotal.Name = "lbTotal"; this.lbTotal.Size = new System.Drawing.Size(72, 27); this.lbTotal.TabIndex = 63; this.lbTotal.Text = "Total: ";
cai_niao_ing 2016-12-07
  • 打赏
  • 举报
回复
因为字数限制,分开发: [/code] //MakeOrder.Designer.cs [code=csharp] namespace WindowsFormsApplication1 { partial class MakeOrder { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MakeOrder)); this.lbRm = new System.Windows.Forms.Label(); this.tbRm = new System.Windows.Forms.TextBox(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.btnConfirm = new System.Windows.Forms.Button(); this.pbDb = new System.Windows.Forms.PictureBox(); this.pbLb = new System.Windows.Forms.PictureBox(); this.pbBb = new System.Windows.Forms.PictureBox(); this.pbDa = new System.Windows.Forms.PictureBox(); this.pbLa = new System.Windows.Forms.PictureBox(); this.pbBa = new System.Windows.Forms.PictureBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.numDb = new System.Windows.Forms.NumericUpDown(); this.numLb = new System.Windows.Forms.NumericUpDown(); this.numBb = new System.Windows.Forms.NumericUpDown(); this.numDa = new System.Windows.Forms.NumericUpDown(); this.numLa = new System.Windows.Forms.NumericUpDown(); this.numBa = new System.Windows.Forms.NumericUpDown(); this.lbDb = new System.Windows.Forms.Label(); this.lbLb = new System.Windows.Forms.Label(); this.lbBb = new System.Windows.Forms.Label(); this.lbDa = new System.Windows.Forms.Label(); this.lbLa = new System.Windows.Forms.Label(); this.lbBa = new System.Windows.Forms.Label(); this.chkDb = new System.Windows.Forms.CheckBox(); this.chkLb = new System.Windows.Forms.CheckBox(); this.chkBb = new System.Windows.Forms.CheckBox(); this.chkDa = new System.Windows.Forms.CheckBox(); this.chkLa = new System.Windows.Forms.CheckBox(); this.chkBa = new System.Windows.Forms.CheckBox(); this.lbTotal = new System.Windows.Forms.Label(); this.tbTotal = new System.Windows.Forms.TextBox(); this.lbDate = new System.Windows.Forms.Label(); this.btnEnter = new System.Windows.Forms.Button(); this.tbCusId = new System.Windows.Forms.TextBox(); this.lbCusId = new System.Windows.Forms.Label(); this.btnMain = new System.Windows.Forms.Button(); this.btnBack = new System.Windows.Forms.Button(); this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker(); ((System.ComponentModel.ISupportInitialize)(this.pbDb)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbLb)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbBb)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbDa)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbLa)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbBa)).BeginInit(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numDb)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numLb)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numBb)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numDa)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numLa)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numBa)).BeginInit(); this.SuspendLayout(); // // lbRm // this.lbRm.AutoSize = true; this.lbRm.Location = new System.Drawing.Point(32, 26); this.lbRm.Name = "lbRm"; this.lbRm.Size = new System.Drawing.Size(123, 27); this.lbRm.TabIndex = 37; this.lbRm.Text = "Room Num"; // // tbRm // this.tbRm.Location = new System.Drawing.Point(161, 17); this.tbRm.Name = "tbRm"; this.tbRm.Size = new System.Drawing.Size(111, 35); this.tbRm.TabIndex = 38; // // imageList1 // this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); this.imageList1.TransparentColor = System.Drawing.Color.Transparent; this.imageList1.Images.SetKeyName(0, "Ba.png"); this.imageList1.Images.SetKeyName(1, "Bb.png"); this.imageList1.Images.SetKeyName(2, "Da.png"); this.imageList1.Images.SetKeyName(3, "Db.png"); this.imageList1.Images.SetKeyName(4, "La.png"); this.imageList1.Images.SetKeyName(5, "Lb.png"); // // btnConfirm // this.btnConfirm.Location = new System.Drawing.Point(972, 84); this.btnConfirm.Name = "btnConfirm"; this.btnConfirm.Size = new System.Drawing.Size(141, 35); this.btnConfirm.TabIndex = 46; this.btnConfirm.Text = "Confirm"; this.btnConfirm.UseVisualStyleBackColor = true; this.btnConfirm.Click += new System.EventHandler(this.btnConfirm_Click); // // pbDb // this.pbDb.Image = global::WindowsFormsApplication1.Properties.Resources.Db; this.pbDb.Location = new System.Drawing.Point(556, 348); this.pbDb.Name = "pbDb"; this.pbDb.Size = new System.Drawing.Size(150, 150); this.pbDb.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pbDb.TabIndex = 45; this.pbDb.TabStop = false; // // pbLb // this.pbLb.Image = global::WindowsFormsApplication1.Properties.Resources.Lb; this.pbLb.Location = new System.Drawing.Point(556, 180); this.pbLb.Name = "pbLb"; this.pbLb.Size = new System.Drawing.Size(150, 150); this.pbLb.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pbLb.TabIndex = 44; this.pbLb.TabStop = false; // // pbBb // this.pbBb.Image = global::WindowsFormsApplication1.Properties.Resources.Bb; this.pbBb.Location = new System.Drawing.Point(556, 12); this.pbBb.Name = "pbBb"; this.pbBb.Size = new System.Drawing.Size(150, 150); this.pbBb.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pbBb.TabIndex = 43; this.pbBb.TabStop = false; // // pbDa // this.pbDa.Image = global::WindowsFormsApplication1.Properties.Resources.Da; this.pbDa.Location = new System.Drawing.Point(19, 348); this.pbDa.Name = "pbDa"; this.pbDa.Size = new System.Drawing.Size(150, 150); this.pbDa.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pbDa.TabIndex = 42; this.pbDa.TabStop = false;
大鱼> 2016-12-07
  • 打赏
  • 举报
回复
我的哥啊,看着辣眼睛。
exception92 2016-12-07
  • 打赏
  • 举报
回复
用select 关键字查询

110,539

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧