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

📄 acct.cs

📁 客房预定系统
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
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;
using System.Data.SqlClient;

/// <summary>
/// 订单类
/// </summary>
public class acct
{
	public acct()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
	}
    public int id;
    public string htl_cd;
    public string rmtyp_cd;
    public decimal rmtyp_amt;
    public DateTime  arr_dt;
    public DateTime  dpt_dt;
    public int gst_nums;
    public int rm_nums;
    public string mem_cd;
    public string acct_nm;
    public string acct_sex;
    public string acct_tel;
    public string notice;


    public SqlConnection con()
    {
        SqlConnection conn = new SqlConnection ("Server=.;database=hotel;uid=sa;pwd=");
        return conn;
    }
    ///<summary>
    /// 返回定单所属酒店名称
    ///</summary>
    public string ReHotelName()
    {

        SqlConnection conn = con();
        conn.Open();
        string sqlstr = "select Htl_nm from webhotel where Htl_cd = '" + htl_cd  + "'";
        SqlCommand cmd = new SqlCommand(sqlstr, conn);
        string tmp = cmd.ExecuteScalar().ToString();
        return tmp;
    }
    ///<summary>
    /// 返回定单所属房间类型
    ///</summary>
    public string ReRoomType()
    {
        SqlConnection conn = con();
        conn.Open();
        string sqlstr = "select Rmtyp_nm from webrmtyp where Rmtyp_cd = '" + rmtyp_cd + "' and Htl_cd = '" + htl_cd + "'";
        SqlCommand cmd = new SqlCommand(sqlstr, conn);
        string tmp = cmd.ExecuteScalar().ToString();
        return tmp;
    }
    ///<summary>
    /// 返回定单所属房间价格
    ///</summary>
    public string ReRoomamt (string rmtyp_amt)
    {
        SqlConnection conn = con();
        conn.Open();
        string sqlstr = "select Rmtyp_amt from webrmtyp where Rmtyp_cd = '" + rmtyp_cd + "' and Htl_cd = '" + htl_cd + "'";
        SqlCommand cmd = new SqlCommand(sqlstr, conn);
        string tmp = cmd.ExecuteScalar().ToString();
        return tmp;
    }
    ///<summary>
    /// 返回订单所属会员姓名
    ///</summary>
    public string ReMemName()
    {
        SqlConnection conn = con();
        conn.Open();
        string sqlstr = "select Mem_nm from webmem where Mem_cd = '" + mem_cd  + "'";
        SqlCommand cmd = new SqlCommand(sqlstr, conn);
        string tmp = cmd.ExecuteScalar().ToString();
        return tmp;
    }
}

⌨️ 快捷键说明

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