Exemplo n.º 1
0
 public void DateBorrowedSet()
 {
     DateBorrowed    = DateTime.Now;
     DueTimeToReturn = DateBorrowed.AddDays(7);
 }
Exemplo n.º 2
0
        public override string ToString()
        {
            //return information about each loan's information
            string loaninfo;

            if (Item.GetType() == typeof(Book))
            {
                Book abook;
                abook    = (Book)Item;
                loaninfo = Convert.ToString(myItem.CallNum) + " " + abook.Title + " " + DateBorrowed.ToShortDateString() + " " + DueDate.ToShortDateString();
            }
            else
            {
                Journal ajournal;
                ajournal = (Journal)Item;
                loaninfo = Convert.ToString(myItem.CallNum) + " " + ajournal.Title + " " + Convert.ToString(ajournal.VolumeNumber) + " " + DateBorrowed.ToShortDateString() + " " + DueDate.ToShortDateString();
            }

            return(loaninfo);
        }