您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->酒店管理系统(三层开发)源码>>WebSite_hotel/UserRegist.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:酒店管理系统(三层开发)源码
当前文件:文件类型 ThreeLayerHotel/WebSite_hotel/UserRegist.aspx.cs打开代码结构图
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.WebControls; 9using System.Web.UI.WebControls.WebParts; 10using System.Web.UI.HtmlControls; 11using BLL; 12using Entity; 13 14public partial class UserRegist : System.Web.UI.Page 15{ 16 protected void Page_Load(object sender, EventArgs e) 17 { 18 19 } 20 21 protected void LinkButton1_Click(object sender, EventArgs e) 22 { 23 if (lblmag.Text == "恭喜!可以使用的帐号") 24 { 25 MultiView1.ActiveViewIndex = 1; 26 lblAddress.Text = txtaddress.Text; 27 lblLoginID.Text = txtloginid.Text; 28 lblName.Text = txtname.Text; 29 lblEmail.Text = txtemail.Text; 30 lblPhone.Text = txtphone.Text; 31 Session["pwd"] = txtloginpwd.Text; 32 } 33 } 34 protected void LinkButton2_Click(object sender, EventArgs e) 35 { 36 Response.Redirect(Request.UrlReferrer.ToString()); 37 } 38 protected void LinkButton3_Click(object sender, EventArgs e) 39 { 40 HotelUserEntity HUE = new HotelUserEntity(); 41 HUE.UserName = txtloginid.Text; 42 HUE.Password = Session["pwd"].ToString(); 43 HUE.Address = txtaddress.Text; 44 HUE.Email = txtemail.Text; 45 HUE.Phone = txtphone.Text; 46 HUE.Name = txtname.Text; 47 int flag = HotelUserBLL.AddHotelUser(HUE); 48 if (flag == -1) 49 { 50 Response.Write("<script language=javascript>alert('SQL语句执行错误,原因:输入的数据有误..');</script>"); 51 } 52 if (flag == -2) 53 { 54 Response.Write("<script language=javascript>alert('数据库连接错误,原因:数据库未连接或数据库为附加..');</script>"); 55 } 56 if (flag == 1) 57 { 58 Session["msg"] = "注册成功"; 59 Response.Redirect("index.aspx"); 60 } 61 } 62 63 protected void LinkButton4_Click(object sender, EventArgs e) 64 { 65 MultiView1.ActiveViewIndex = 0; 66 } 67 protected void txtloginid_TextChanged(object sender, EventArgs e) 68 { 69 if (HotelUserBLL.GetCountUserName(txtloginid.Text) == 0) 70 lblmag.Text = "恭喜!可以使用的帐号"; 71 else 72 lblmag.Text = "该帐号已存在,请重输"; 73 } 74} 75
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:酒店管理系统(三层开发)源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号