Beispiel #1
0
    protected void btThanhToan_Click(object sender, EventArgs e)
    {
        int soVeDat = int.Parse(txtNumber.Text);
        int soVeCon = int.Parse(lbVeCon.Text);

        if (soVeCon < soVeDat)
        {
            lbMess.Visible = true;
        }
        else
        {
            try
            {
                string idTour = Request.QueryString["tour"].ToString();
                func.bookingTour(idTour, txtIdentityCard.Text, txtNumber.Text, "0",
                                 txtFullName.Text, txtAddress.Text, ddlGender.SelectedValue, txtPhone.Text, txtMail.Text);
                Response.Redirect("UI_Payment.aspx?tour=" + idTour + "&customer=" + txtIdentityCard.Text + "&numbertickets=" + txtNumber.Text);
            }
            catch (Exception)
            {
                cnDb.conn.Close();
                Response.Write("<script>alert('Lỗi! Vui lòng cập nhật lại sau')</script>");
            }
        }
    }