Ejemplo n.º 1
0
        protected void btReserve_Click(object sender, EventArgs e)
        {
            Reservation rs = new Reservation(int.Parse(txtMemberCode.Text), int.Parse(txtBookNumber.Text), Calendar1.SelectedDate);

            ReserveDAO.Insert(rs);

            View();

            displayButtons(1);
        }
Ejemplo n.º 2
0
        protected void btnReserve_Click(object sender, EventArgs e)
        {
            Reservation re = new Reservation();

            re.BorrowerNumber = int.Parse(txtBorrowerNumber.Text);
            re.BookNumber     = int.Parse(txtBookNumber.Text);
            re.Date           = Convert.ToDateTime(Calendar1.SelectedDate.ToString());
            re.Status         = 'R';
            ReserveDAO.Insert(re);
            View();
            txtBookNumber.Text = "";
            displayButtons(1);
        }
Ejemplo n.º 3
0
        protected void btnReserve_Click(object sender, EventArgs e)
        {
            int      borrowerNum = int.Parse(txtBorrowerNumber.Text);
            Borrower borrower    = BorrowerDAO.GetBorrower(borrowerNum);

            Reservation rv = new Reservation(int.Parse(txtBorrowerNumber.Text), int.Parse(txtBookNumber.Text), Calendar1.SelectedDate);

            if (ReserveDAO.Insert(rv))
            {
                View(borrower);
                btnReserve.Enabled = false;
            }
            else
            {
                lblError.Text = "Reserve queue failse! ";
            }
        }