Exemplo n.º 1
0
 public Rental(int idRental, Renter renter, Resource resource, DateTime checkoutTime, DateTime checkinTime)
 {
     this.idRental     = idRental;
     this.renter       = renter;
     this.resource     = resource;
     this.checkoutTime = checkoutTime;
     this.checkinTime  = checkinTime;
 }
Exemplo n.º 2
0
 public Rental(Rental rental)
 {
     idRental     = rental.idRental;
     renter       = rental.renter;
     resource     = rental.resource;
     checkoutTime = rental.checkoutTime;
     checkinTime  = rental.checkinTime;
 }
Exemplo n.º 3
0
 public Renter(Renter other)
 {
     this.idRenter      = other.idRenter;
     this.firstName     = other.firstName;
     this.lastName      = other.lastName;
     this.libraryNumber = other.libraryNumber;
     this.cpEmail       = other.cpEmail;
     this.role          = other.role;
     this.canRent       = other.canRent;
 }
Exemplo n.º 4
0
        public override bool Equals(object obj)
        {
            if (!(obj is Renter))
            {
                return(false);
            }

            Renter other = obj as Renter;

            return(IdRenter.Equals(other.IdRenter) &&
                   LibraryNumber.Equals(other.libraryNumber) &&
                   cpEmail.Equals(other.cpEmail));
        }
Exemplo n.º 5
0
        public override bool Equals(object obj)
        {
            if (!(obj is Rental))
            {
                return(false);
            }

            Rental other = obj as Rental;


            if (!((Renter == null && other.Renter == null) && (Renter != null && other.Renter != null)))
            {
                return(false);
            }

            if (!((Resource == null && other.Resource == null) && (Resource != null && other.Resource != null)))
            {
                return(false);
            }

            return(idRental.Equals(other.idRental) && Renter.Equals(other.Renter) &&
                   Resource.Equals(other.Resource) && CheckinTime.Equals(other.checkinTime) &&
                   CheckoutTime.Equals(other.CheckoutTime));
        }