您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->酒店管理系统(三层开发)源码>>WebSite_hotel/MasterPage.master.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:酒店管理系统(三层开发)源码
当前文件:文件类型 ThreeLayerHotel/WebSite_hotel/MasterPage.master.cs打开代码结构图
普通视图
		            
1using System; 2using System.Collections; 3using System.Configuration; 4using System.Data; 5using System.Linq; 6using System.Web; 7using System.Web.Security; 8using System.Web.UI; 9using System.Web.UI.WebControls; 10using System.Web.UI.WebControls.WebParts; 11using System.Web.UI.HtmlControls; 12using System.Xml.Linq; 13using BLL; 14using Entity; 15 16public partial class MasterPage : System.Web.UI.MasterPage 17{ 18 protected void Page_Load(object sender, EventArgs e) 19 { 20 if (!IsPostBack) 21 { 22 Bind(); 23 BindImg(); 24 } 25 } 26 27 void Bind() 28 { 29 30 if (Session["Name"] != null) 31 { 32 HotelUserEntity HUE = HotelUserBLL.GetUserInfoByUserName(Session["Name"].ToString()); 33 lblname.Text = HUE.Name; 34 if (HUE.Status == 0) 35 { 36 lblstatus.Text = "普通用户"; 37 Session["Status"] = "普通用户"; 38 MultiView2.ActiveViewIndex = 1; 39 } 40 else 41 { 42 lblstatus.Text = "管理员"; 43 Session["Status"] = "管理员"; 44 MultiView2.ActiveViewIndex = 0; 45 } 46 } 47 else 48 { 49 lblname.Visible = false; 50 lblstatus.Visible = false; 51 } 52 } 53 54 void BindImg() 55 { 56 DataTable dt = RoomTypeBLL.GetImageURL(); 57 DataList1.DataSource = dt; 58 DataList1.DataBind(); 59 } 60 protected void DataList1_SelectedIndexChanged(object sender, EventArgs e) 61 { 62 int typeid = Convert.ToInt32(DataList1.DataKeys[DataList1.SelectedIndex]); 63 Response.Redirect("selectRoomtypeInfo.aspx?typeid="+typeid); 64 } 65 66 protected void LinkButton14_Click(object sender, EventArgs e) 67 { 68 Label10.Text = "管理员是管理本系统的用户,普通用户则是该酒店的消费者。"; 69 MultiView3.ActiveViewIndex = 0; 70 } 71 protected void LinkButton13_Click(object sender, EventArgs e) 72 { 73 Label9.Text = "客房类型管理(编辑房间类型、删除房间类型、增加房间类型)、客房信息管理(编辑房间信息、删除房间信息、增加房间信息)、用户预订管理(对用户的档案进行操作、用户接待进行管理)。"; 74 MultiView3.ActiveViewIndex = 1; 75 } 76 protected void LinkButton15_Click1(object sender, EventArgs e) 77 { 78 MultiView4.ActiveViewIndex = 0; 79 } 80 protected void LinkButton12_Click(object sender, EventArgs e) 81 { 82 Label12.Text = "用户在线预订房间,在线退房。"; 83 MultiView3.ActiveViewIndex = 2; 84 } 85 protected void LinkButton11_Click(object sender, EventArgs e) 86 { 87 Label14.Text = "管理员修改用户权限需慎重。"; 88 MultiView3.ActiveViewIndex = 3; 89 } 90} 91
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:酒店管理系统(三层开发)源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号