⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reportcheckoutform.aspx.cs

📁 一个关于宾馆酒店管理系统的源代码
💻 CS
字号:
//文件名:ReportCheckoutForm.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 ReportManage_ReportCheckoutForm : System.Web.UI.Page
{
    private static string MySQL = "Select * From 结账汇总报表视图";
    protected void Page_Load(object sender, EventArgs e)
    {
        string MyForbidString = Session["MyForbid"].ToString();
        if (MyForbidString.IndexOf("D5") > 1)
        {
            Server.Transfer("~/SystemManage/AllErrorHelp.aspx");
        }
        this.Page.Title = "当前位置:报表管理->旅客结账报表";
        if (!IsPostBack)
        {
            this.TextBox2.Text = DateTime.Now.ToShortDateString();
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {//查询结账汇总信息
        string MySQLConnectionString = ConfigurationManager.ConnectionStrings["MyHotelDBConnectionString"].ConnectionString;
        MySQL = "Select * From 结账汇总报表视图  Where 结账汇总报表视图.结账日期 Between  '" + this.TextBox1.Text + "' AND '" + this.TextBox2.Text + "'";
        this.SqlDataSource1.ConnectionString = MySQLConnectionString;
        this.SqlDataSource1.SelectCommand = MySQL;
        this.SqlDataSource1.DataBind();
        this.GridView1.DataBind();
    }
    public string MyPrintSQL
    {//设置要传递到打印页的数据
        get
        {
            return MySQL;
        }
    }
    public String MyPrintDate
    {//设置要传递到打印页的数据
        get
        {
            return "开始日期:" + this.TextBox1.Text + "  结束日期:" + this.TextBox2.Text;
        }
    }
    protected void Button2_Click(object sender, EventArgs e)
    {//打印入住旅客结账信息
        Server.Transfer("~/ReportManage/ReportCheckOutPrint.aspx");
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -