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