Ejemplo n.º 1
0
        public int Issue(typeMember strUserType, int intBooksIssued)
        {
            if (isAvailable == true && canBeIssued(strUserType, intBooksIssued))
            {
                isAvailable = false;
                issueDate   = DateTime.Now;
                Console.WriteLine("Issue Successful");
                return(1);
            }

            Console.WriteLine("Issue Unsuccessful");
            return(0);
        }
Ejemplo n.º 2
0
 public bool canBeIssued(typeMember strUserType, int intBooksIssued)
 {
     if (strUserType == typeMember.Faculty)
     {
         return(true);
     }
     else if (strUserType == typeMember.Student)
     {
         if (intBooksIssued < 5 && StrBookType == typeBook.General)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else
     {
         Console.WriteLine("Invalid User Type");
         return(false);
     }
 }