예제 #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;
 }
예제 #2
0
 public Rental(Rental rental)
 {
     idRental     = rental.idRental;
     renter       = rental.renter;
     resource     = rental.resource;
     checkoutTime = rental.checkoutTime;
     checkinTime  = rental.checkinTime;
 }
예제 #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;
 }
예제 #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));
        }
예제 #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));
        }