protected void btnDangKi_Click(object sender, EventArgs e) { if (IsPostBack) { bool y = xl.CheckDaTonTaiDangKi(Session["DN"].ToString(), Session["Phong"].ToString()); if (y == true) { int i = xl.DangKi(Session["Phong"].ToString(), Session["DN"].ToString(), txt_ngaydangky.Text); if (i == 0) { xl.Show("Bạn đăng kí phòng này thất bại"); } else { xl.Show("Đã đăng kí thành công chờ thanh toán để xác nhận"); Server.Transfer("ThanhToan.aspx"); } } else { xl.Show("Bạn đã đăng kí phòng kí túc xá rồi!"); } } }