Exemplo n.º 1
0
        public Response Insert(Reservation item)
        {
            Response response = Validate(item);

            if (response.Success)
            {
                return(reservationDAO.Insert(item));
            }
            return(response);
        }
        private void btnReserve_Click(object sender, EventArgs e)
        {
            Reservation r = new Reservation();

            r.MemberNumber = int.Parse(txtMemberCode.Text);
            r.BookNumber   = int.Parse(txtBookNumber.Text);
            r.Date         = dtpDate.Value;
            r.Status       = false;
            ReservationDAO.Insert(r);
            view(int.Parse(txtMemberCode.Text));
            txtBookNumber.Text    = "";
            txtBookNumber.Enabled = false;
            btnCRC.Enabled        = false;
            btnReserve.Enabled    = false;
        }
Exemplo n.º 3
0
 public void AddReservation(int tableNumber) => reservationDAO.Insert(tableNumber, null);