show.aspx.cs

来自「走吧旅游网站前后台源代码」· CS 代码 · 共 54 行

CS
54
字号
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;

namespace Maticsoft.Web.HotelRoomPrice
{
    public partial class Show : System.Web.UI.Page
    {        
        		protected void Page_LoadComplete(object sender, EventArgs e)
		{
			(Master.FindControl("lblTitle") as Label).Text = "详细信息";
		}
		protected void Page_Load(object sender, EventArgs e)
		{
			if (!Page.IsPostBack)
			{
				if (Request.Params["id"] != null || Request.Params["id"].Trim() != "")
				{
					string id = Request.Params["id"];
					ShowInfo(int.Parse(id));
				}
			}
		}
		
private void ShowInfo(string RoomType)
{
	Maticsoft.BLL.HotelRoomPrice bll=new Maticsoft.BLL.HotelRoomPrice();
	Maticsoft.Model.HotelRoomPrice model=bll.GetModel(RoomType);
	this.lblPrice.Text=model.Price.ToString();
	this.lblCashPrice.Text=model.CashPrice.ToString();
	this.lblHasBreakfast.Text=model.HasBreakfast;
	this.lblBedType.Text=model.BedType;
	this.lblHasInternet.Text=model.HasInternet;
	this.lblLocalFloor.Text=model.LocalFloor;
	this.lblRoomTrait.Text=model.RoomTrait;
	this.lblBreakfastPrice1.Text=model.BreakfastPrice1.ToString();
	this.lblBreakfastPrice2.Text=model.BreakfastPrice2.ToString();
	this.lblArea.Text=model.Area.ToString();
	this.lblAddBedPrice.Text=model.AddBedPrice.ToString();
	this.lblRoomAmount.Text=model.RoomAmount.ToString();
	this.lblRemark.Text=model.Remark;

}

    }
}

⌨️ 快捷键说明

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