Ejemplo n.º 1
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
            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);
        }
Ejemplo n.º 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 :< ";
            }
        }
Ejemplo n.º 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);
        }