private void borrow(CirculatedCopy cc, Copy c, Reservation r)
        {
            // Insert borrow record
            if (cc == null)
            {
                return;
            }
            CirculatedCopyDAO.Insert(cc);

            // update type = 'B' at Copy
            if (c == null)
            {
                return;
            }
            c.Type = 'B';
            CopyDAO.Update(c);


            // update status = 'A' at Reservation
            if (r == null)
            {
                return;
            }
            r.Status = 'A';
            ReserveDAO.Update(r);
        }
Beispiel #2
0
        private void borrow(CirculatedCopy cc, Copy c, Reservation r)
        {
            // Insert borrow record
            if (cc == null)
            {
                return;
            }
            if (CirculatedCopyDAO.Insert(cc))
            {
                txtDueDate.Text = Calendar1.SelectedDate.AddDays(14).ToString("dd/MM/yyyy");
                // update type = 'B' at Copy
                c = (Copy)Session["copy"];
                if (c == null)
                {
                    return;
                }
                c.Type = 'B';
                CopyDAO.Update(c);


                // update status = 'A' at Reservation
                r = (Reservation)Session["reser"];
                if (r == null)
                {
                    return;
                }
                r.Status = 'A';
                ReserveDAO.Update(r);
            }
            else
            {
                lblError.Text = cc.BorrowedDate.ToString("yyyy-MM-dd hh:mm:ss");
                lblError.Text = "Borrow Fail :< ";
            }
        }
Beispiel #3
0
        private void borrow(CirculatedCopy cc, Copy c, Reservation r)
        {
            // Insert borrow record
            if (cc == null)
            {
                return;
            }
            CirculatedCopyDAO.Insert(cc);

            // update type = 'B' at Copy
            c      = CopyDAO.GetCopy(Int32.Parse(txtCopyNumber.Text));
            c.Type = 'B';
            CopyDAO.Update(c);


            // update status = 'A' at Reservation
            if (r == null)
            {
                return;
            }
            r.Status = 'A';
            ReserveDAO.Update(r);
        }