📄 bookingregprint.aspx.cs
字号:
//文件名:BookingRegPrint.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class BookingManage_BookingRegPrint : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{//打印客人用餐预订单
if (Session["MyCompanyName"] != null)
{
this.Label1.Text = Session["MyCompanyName"].ToString() + "客人用餐预订单";
}
string MyID = Request.QueryString["MyID"].ToString();
DataTable MyTable = new DataTable();
string MySQL = "SELECT * FROM [预订信息] WHERE ([预订编号]='" + MyID + "') ";
String MySQLConnectionString = ConfigurationManager.ConnectionStrings["MyEateryDBConnectionString"].ConnectionString;
SqlConnection MyConnection = new SqlConnection(MySQLConnectionString);
MyConnection.Open();
SqlDataAdapter MyAdatper = new SqlDataAdapter(MySQL, MyConnection);
MyAdatper.Fill(MyTable);
this.Label3.Text = "预订编号:" + MyTable.Rows[0]["预订编号"].ToString();
this.Label4.Text = "用餐日期:" + DateTime.Parse(MyTable.Rows[0]["用餐日期"].ToString()).ToShortDateString();
this.Label5.Text = "用餐人数:" + MyTable.Rows[0]["用餐人数"].ToString();
this.Label2.Text = "预订日期:" + DateTime.Parse(MyTable.Rows[0][1].ToString()).ToShortDateString();
this.Label6.Text = "餐次名称:" + MyTable.Rows[0]["餐次名称"].ToString();
this.Label7.Text = "联系人员:" + MyTable.Rows[0]["联系人员"].ToString();
this.Label9.Text = "联系电话:" + MyTable.Rows[0]["联系电话"].ToString();
this.Label8.Text = "预交订金(元):" + MyTable.Rows[0]["预交订金"].ToString() + "元";
this.TextBox1.Text = MyTable.Rows[0]["用餐要求"].ToString();
if (MyConnection.State == ConnectionState.Open)
{
MyConnection.Close();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -