?? queryconsumeform.aspx.cs
字號:
?//文件名:QueryConsumeForm.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;
public partial class QueryManage_QueryConsumeForm : System.Web.UI.Page
{
private static string MySQL ;
private static string My商品名稱;
private static string My開始日期;
private static string My結(jié)束日期;
private static String MySQLConnectionString;
protected void Page_Load(object sender, EventArgs e)
{
string MyForbidString = Session["MyForbid"].ToString();
if (MyForbidString.IndexOf("C3") > 1)
{
Server.Transfer("~/SystemManage/AllErrorHelp.aspx");
}
this.Page.Title = "當前位置:查詢管理->查詢商品消耗";
if (IsPostBack)
{
//查詢酒店商品消耗信息
My商品名稱 = this.DropDownList1.SelectedValue.ToString();
My開始日期 = this.TextBox1.Text;
My結(jié)束日期 = this.TextBox2.Text;
MySQL = "Select * From 商品分類查詢視圖 Where 商品名稱='" + My商品名稱 + "' AND (記賬時間 Between '" + My開始日期 + "' AND '" + My結(jié)束日期 + "')";
MySQLConnectionString = ConfigurationManager.ConnectionStrings["MyHotelDBConnectionString"].ConnectionString;
this.SqlDataSource2.ConnectionString = MySQLConnectionString;
this.SqlDataSource2.SelectCommand = MySQL;
this.SqlDataSource2.DataBind();
this.GridView1.DataBind();
}
}
public String MyPrintSQL
{//設(shè)置要傳遞到打印頁的SQL
get
{
return MySQL;
}
}
public String MyPrint商品名稱
{//設(shè)置要傳遞到打印頁的商品名稱
get
{
return My商品名稱;
}
}
public String MyPrint開始日期
{//設(shè)置要傳遞到打印頁的開始日期
get
{
return My開始日期;
}
}
public String MyPrint結(jié)束日期
{//設(shè)置要傳遞到打印頁的結(jié)束日期
get
{
return My結(jié)束日期;
}
}
protected void Button2_Click(object sender, EventArgs e)
{//打印商品消耗信息
Server.Transfer("~/QueryManage/QueryConsumePrint.aspx");
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -