/// <summary>
 /// Initializes a new instance of the <see cref="RentalAgreementCondition" /> class.
 /// </summary>
 /// <param name="id">A system-generated unique identifier for a RentalAgreementCondition (required).</param>
 /// <param name="rentalAgreement">A foreign key reference to the system-generated unique identifier for a Rental Agreement (required).</param>
 /// <param name="conditionName">The name of the condition to be placed onto the Rental Agreement. (required).</param>
 /// <param name="comment">A comment about the condition to be applied to the Rental Agreement..</param>
 public RentalAgreementCondition(int id, RentalAgreement rentalAgreement, string conditionName, string comment = null)
 {
     Id = id;
     RentalAgreement = rentalAgreement;
     ConditionName   = conditionName;
     Comment         = comment;
 }
        /// <summary>
        /// Returns true if RentalAgreementCondition instances are equal
        /// </summary>
        /// <param name="other">Instance of RentalAgreementCondition to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RentalAgreementCondition other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     RentalAgreement == other.RentalAgreement ||
                     RentalAgreement != null &&
                     RentalAgreement.Equals(other.RentalAgreement)
                 ) &&
                 (
                     ConditionName == other.ConditionName ||
                     ConditionName != null &&
                     ConditionName.Equals(other.ConditionName)
                 ) &&
                 (
                     Comment == other.Comment ||
                     Comment != null &&
                     Comment.Equals(other.Comment)
                 ));
        }
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;

                // Suitable nullity checks
                hash = hash * 59 + Id.GetHashCode();

                if (RentalAgreement != null)
                {
                    hash = hash * 59 + RentalAgreement.GetHashCode();
                }

                if (ConditionName != null)
                {
                    hash = hash * 59 + ConditionName.GetHashCode();
                }

                if (Comment != null)
                {
                    hash = hash * 59 + Comment.GetHashCode();
                }

                return(hash);
            }
        }
Example #4
0
        /// <summary>
        /// Returns true if RentalAgreementRate instances are equal
        /// </summary>
        /// <param name="other">Instance of RentalAgreementRate to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RentalAgreementRate other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     RentalAgreement == other.RentalAgreement ||
                     RentalAgreement != null &&
                     RentalAgreement.Equals(other.RentalAgreement)
                 ) &&
                 (
                     ComponentName == other.ComponentName ||
                     ComponentName != null &&
                     ComponentName.Equals(other.ComponentName)
                 ) &&
                 (
                     IsAttachment == other.IsAttachment ||
                     IsAttachment != null &&
                     IsAttachment.Equals(other.IsAttachment)
                 ) &&
                 (
                     Rate == other.Rate ||
                     Rate != null &&
                     Rate.Equals(other.Rate)
                 ) &&
                 (
                     PercentOfEquipmentRate == other.PercentOfEquipmentRate ||
                     PercentOfEquipmentRate != null &&
                     PercentOfEquipmentRate.Equals(other.PercentOfEquipmentRate)
                 ) &&
                 (
                     RatePeriod == other.RatePeriod ||
                     RatePeriod != null &&
                     RatePeriod.Equals(other.RatePeriod)
                 ) &&
                 (
                     Comment == other.Comment ||
                     Comment != null &&
                     Comment.Equals(other.Comment)
                 ) &&
                 (
                     TimeRecords == other.TimeRecords ||
                     TimeRecords != null &&
                     TimeRecords.SequenceEqual(other.TimeRecords)
                 ));
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="RentalAgreementCondition" /> class.
        /// </summary>
        /// <param name="Id">A system-generated unique identifier for a RentalAgreementCondition (required).</param>
        /// <param name="RentalAgreement">A foreign key reference to the system-generated unique identifier for a Rental Agreement (required).</param>
        /// <param name="ConditionName">The name of the condition to be placed onto the Rental Agreement. (required).</param>
        /// <param name="Comment">A comment about the condition to be applied to the Rental Agreement..</param>
        public RentalAgreementCondition(int Id, RentalAgreement RentalAgreement, string ConditionName, string Comment = null)
        {
            this.Id = Id;
            this.RentalAgreement = RentalAgreement;
            this.ConditionName   = ConditionName;


            this.Comment = Comment;
        }
Example #6
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;

                // Suitable nullity checks
                hash = hash * 59 + Id.GetHashCode();

                if (RentalAgreement != null)
                {
                    hash = hash * 59 + RentalAgreement.GetHashCode();
                }

                hash = hash * 59 + IsIncludedInTotal.GetHashCode();

                if (ComponentName != null)
                {
                    hash = hash * 59 + ComponentName.GetHashCode();
                }

                if (IsAttachment != null)
                {
                    hash = hash * 59 + IsAttachment.GetHashCode();
                }

                if (Rate != null)
                {
                    hash = hash * 59 + Rate.GetHashCode();
                }

                if (PercentOfEquipmentRate != null)
                {
                    hash = hash * 59 + PercentOfEquipmentRate.GetHashCode();
                }

                if (RatePeriod != null)
                {
                    hash = hash * 59 + RatePeriod.GetHashCode();
                }

                if (Comment != null)
                {
                    hash = hash * 59 + Comment.GetHashCode();
                }

                if (TimeRecords != null)
                {
                    hash = hash * 59 + TimeRecords.GetHashCode();
                }
                return(hash);
            }
        }
Example #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TimeRecord" /> class.
 /// </summary>
 /// <param name="id">A system-generated unique identifier for a TimeRecord (required).</param>
 /// <param name="rentalAgreement">A foreign key reference to the system-generated unique identifier for a Rental Agreement (required).</param>
 /// <param name="workedDate">The date of the time record entry - the day of the entry if it is a daily entry, or a date in the week in which the work occurred if tracked weekly. (required).</param>
 /// <param name="hours">The number of hours worked by the equipment. (required).</param>
 /// <param name="rentalAgreementRate">The Rental Agreement Rate component to which this Rental Agreement applies. If null, this time applies to the equipment itself..</param>
 /// <param name="enteredDate">The date-time the time record information was entered..</param>
 /// <param name="timePeriod">The time period of the entry - either day or week. HETS Clerk have the option of entering time records on a day-by-day or week-by-week basis..</param>
 public TimeRecord(int id, RentalAgreement rentalAgreement, DateTime workedDate, float?hours,
                   RentalAgreementRate rentalAgreementRate = null, DateTime?enteredDate = null, string timePeriod = null)
 {
     Id = id;
     RentalAgreement     = rentalAgreement;
     WorkedDate          = workedDate;
     Hours               = hours;
     RentalAgreementRate = rentalAgreementRate;
     EnteredDate         = enteredDate;
     TimePeriod          = timePeriod;
 }
Example #8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RentalAgreementRate" /> class.
        /// </summary>
        /// <param name="Id">A system-generated unique identifier for a RentalAgreementRate (required).</param>
        /// <param name="RentalAgreement">A foreign key reference to the system-generated unique identifier for a Rental Agreement (required).</param>
        /// <param name="ComponentName">Name of the component for the Rental Agreement for which the attached rates apply..</param>
        /// <param name="IsAttachment">True if this rate is for an attachment to the piece of equipment..</param>
        /// <param name="Rate">The dollar rate associated with this component of the rental agreement..</param>
        /// <param name="PercentOfEquipmentRate">For other than the actual piece of equipment, the percent of the equipment rate to use for this component of the rental agreement..</param>
        /// <param name="RatePeriod">The period of the rental rate. The vast majority will be hourly, but the rate could apply across a different period, e.g. daily..</param>
        /// <param name="Comment">A comment about the rental of this component of the Rental Agreement..</param>
        /// <param name="TimeRecords">TimeRecords.</param>
        public RentalAgreementRate(int Id, RentalAgreement RentalAgreement, string ComponentName = null, bool?IsAttachment = null, float?Rate = null, int?PercentOfEquipmentRate = null, string RatePeriod = null, string Comment = null, List <TimeRecord> TimeRecords = null)
        {
            this.Id = Id;
            this.RentalAgreement = RentalAgreement;

            this.ComponentName          = ComponentName;
            this.IsAttachment           = IsAttachment;
            this.Rate                   = Rate;
            this.PercentOfEquipmentRate = PercentOfEquipmentRate;
            this.RatePeriod             = RatePeriod;
            this.Comment                = Comment;
            this.TimeRecords            = TimeRecords;
        }
Example #9
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TimeRecord" /> class.
        /// </summary>
        /// <param name="Id">A system-generated unique identifier for a TimeRecord (required).</param>
        /// <param name="RentalAgreement">A foreign key reference to the system-generated unique identifier for a Rental Agreement (required).</param>
        /// <param name="WorkedDate">The date of the time record entry - the day of the entry if it is a daily entry, or a date in the week in which the work occurred if tracked weekly. (required).</param>
        /// <param name="Hours">The number of hours worked by the equipment. (required).</param>
        /// <param name="RentalAgreementRate">The Rental Agreement Rate component to which this Rental Agreement applies. If null, this time applies to the equipment itself..</param>
        /// <param name="EnteredDate">The date-time the time record information was entered..</param>
        /// <param name="TimePeriod">The time period of the entry - either day or week. HETS Clerk have the option of entering time records on a day-by-day or week-by-week basis..</param>
        public TimeRecord(int Id, RentalAgreement RentalAgreement, DateTime WorkedDate, float?Hours, RentalAgreementRate RentalAgreementRate = null, DateTime?EnteredDate = null, string TimePeriod = null)
        {
            this.Id = Id;
            this.RentalAgreement = RentalAgreement;
            this.WorkedDate      = WorkedDate;
            this.Hours           = Hours;



            this.RentalAgreementRate = RentalAgreementRate;
            this.EnteredDate         = EnteredDate;
            this.TimePeriod          = TimePeriod;
        }
Example #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RentalAgreementRate" /> class.
 /// </summary>
 /// <param name="id">A system-generated unique identifier for a RentalAgreementRate (required).</param>
 /// <param name="rentalAgreement">A foreign key reference to the system-generated unique identifier for a Rental Agreement (required).</param>
 /// <param name="componentName">Name of the component for the Rental Agreement for which the attached rates apply..</param>
 /// <param name="isAttachment">True if this rate is for an attachment to the piece of equipment..</param>
 /// <param name="rate">The dollar rate associated with this component of the rental agreement..</param>
 /// <param name="percentOfEquipmentRate">For other than the actual piece of equipment, the percent of the equipment rate to use for this component of the rental agreement..</param>
 /// <param name="ratePeriod">The period of the rental rate. The vast majority will be hourly, but the rate could apply across a different period, e.g. daily..</param>
 /// <param name="comment">A comment about the rental of this component of the Rental Agreement..</param>
 /// <param name="timeRecords">TimeRecords.</param>
 public RentalAgreementRate(int id, RentalAgreement rentalAgreement, string componentName = null, bool?isAttachment = null,
                            float?rate = null, int?percentOfEquipmentRate = null, string ratePeriod = null, string comment = null,
                            List <TimeRecord> timeRecords = null)
 {
     Id = id;
     RentalAgreement        = rentalAgreement;
     ComponentName          = componentName;
     IsAttachment           = isAttachment;
     Rate                   = rate;
     PercentOfEquipmentRate = percentOfEquipmentRate;
     RatePeriod             = ratePeriod;
     Comment                = comment;
     TimeRecords            = timeRecords;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RentalRequestRotationList" /> class.
 /// </summary>
 /// <param name="id">A system-generated unique identifier for a RequestRotationList (required).</param>
 /// <param name="rotationListSortOrder">The sort order of the piece of equipment on the rotation list at the time the request was created. This is the order the equipment will be offered the available work. (required).</param>
 /// <param name="equipment">Equipment (required).</param>
 /// <param name="rentalAgreement">The rental agreement (if any) created for an accepted hire offer..</param>
 /// <param name="isForceHire">True if the HETS Clerk designated the hire of this equipment as being a Forced Hire. A Force Hire implies that the usual seniority rules for hiring are bypassed because of special circumstances related to the hire - e.g. a the hire requires an attachment only one piece of equipment has..</param>
 /// <param name="wasAsked">True if the HETS Clerk contacted the equipment owner and asked to hire the piece of equipment..</param>
 /// <param name="askedDateTime">The Date-Time the HETS clerk contacted the equipment owner and asked to hire the piece of equipment..</param>
 /// <param name="offerResponse">The response to the offer to hire. Null prior to receiving a response; a string after with the response - likely just Yes or No.</param>
 /// <param name="offerRefusalReason">The reason why the user refused the offer based on a selection of values from the UI..</param>
 /// <param name="offerResponseDatetime">The date and time the final response to the offer was established..</param>
 /// <param name="offerResponseNote">A note entered about the response to the offer from the equipment owner about the offer. Usually used when the offer is a &amp;quot;No&amp;quot; or &amp;quot;Force Hire&amp;quot;..</param>
 /// <param name="note">An optional general note about the offer..</param>
 public RentalRequestRotationList(int id, int rotationListSortOrder, Equipment equipment, RentalAgreement rentalAgreement = null,
                                  bool?isForceHire          = null, bool?wasAsked = null, DateTime?askedDateTime = null, string offerResponse = null,
                                  string offerRefusalReason = null, DateTime?offerResponseDatetime = null, string offerResponseNote = null, string note = null)
 {
     Id = id;
     RotationListSortOrder = rotationListSortOrder;
     Equipment             = equipment;
     RentalAgreement       = rentalAgreement;
     IsForceHire           = isForceHire;
     WasAsked              = wasAsked;
     AskedDateTime         = askedDateTime;
     OfferResponse         = offerResponse;
     OfferRefusalReason    = offerRefusalReason;
     OfferResponseDatetime = offerResponseDatetime;
     OfferResponseNote     = offerResponseNote;
     Note = note;
 }
Example #12
0
        /// <summary>
        /// Returns true if TimeRecord instances are equal
        /// </summary>
        /// <param name="other">Instance of TimeRecord to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(TimeRecord other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     RentalAgreement == other.RentalAgreement ||
                     RentalAgreement != null &&
                     RentalAgreement.Equals(other.RentalAgreement)
                 ) &&
                 (
                     WorkedDate == other.WorkedDate ||
                     WorkedDate.Equals(other.WorkedDate)
                 ) &&
                 (
                     Hours == other.Hours ||
                     Hours != null &&
                     Hours.Equals(other.Hours)
                 ) &&
                 (
                     RentalAgreementRate == other.RentalAgreementRate ||
                     RentalAgreementRate != null &&
                     RentalAgreementRate.Equals(other.RentalAgreementRate)
                 ) &&
                 (
                     EnteredDate == other.EnteredDate ||
                     EnteredDate != null &&
                     EnteredDate.Equals(other.EnteredDate)
                 ) &&
                 (
                     TimePeriod == other.TimePeriod ||
                     TimePeriod != null &&
                     TimePeriod.Equals(other.TimePeriod)
                 ));
        }
Example #13
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;

                // Suitable nullity checks
                hash = hash * 59 + Id.GetHashCode();

                if (RentalAgreement != null)
                {
                    hash = hash * 59 + RentalAgreement.GetHashCode();
                }

                hash = hash * 59 + WorkedDate.GetHashCode();

                if (Hours != null)
                {
                    hash = hash * 59 + Hours.GetHashCode();
                }

                if (RentalAgreementRate != null)
                {
                    hash = hash * 59 + RentalAgreementRate.GetHashCode();
                }

                if (EnteredDate != null)
                {
                    hash = hash * 59 + EnteredDate.GetHashCode();
                }

                if (TimePeriod != null)
                {
                    hash = hash * 59 + TimePeriod.GetHashCode();
                }

                return(hash);
            }
        }
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;

                // Suitable nullity checks
                hash = hash * 59 + Id.GetHashCode();
                hash = hash * 59 + RotationListSortOrder.GetHashCode();

                if (Equipment != null)
                {
                    hash = hash * 59 + Equipment.GetHashCode();
                }
                if (RentalAgreement != null)
                {
                    hash = hash * 59 + RentalAgreement.GetHashCode();
                }

                if (IsForceHire != null)
                {
                    hash = hash * 59 + IsForceHire.GetHashCode();
                }

                if (WasAsked != null)
                {
                    hash = hash * 59 + WasAsked.GetHashCode();
                }

                if (AskedDateTime != null)
                {
                    hash = hash * 59 + AskedDateTime.GetHashCode();
                }

                if (OfferResponse != null)
                {
                    hash = hash * 59 + OfferResponse.GetHashCode();
                }

                if (OfferRefusalReason != null)
                {
                    hash = hash * 59 + OfferRefusalReason.GetHashCode();
                }

                if (OfferResponseDatetime != null)
                {
                    hash = hash * 59 + OfferResponseDatetime.GetHashCode();
                }

                if (OfferResponseNote != null)
                {
                    hash = hash * 59 + OfferResponseNote.GetHashCode();
                }

                if (Note != null)
                {
                    hash = hash * 59 + Note.GetHashCode();
                }

                return(hash);
            }
        }
        /// <summary>
        /// Returns true if RentalRequestRotationList instances are equal
        /// </summary>
        /// <param name="other">Instance of RentalRequestRotationList to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RentalRequestRotationList other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     RotationListSortOrder == other.RotationListSortOrder ||
                     RotationListSortOrder.Equals(other.RotationListSortOrder)
                 ) &&
                 (
                     Equipment == other.Equipment ||
                     Equipment != null &&
                     Equipment.Equals(other.Equipment)
                 ) &&
                 (
                     RentalAgreement == other.RentalAgreement ||
                     RentalAgreement != null &&
                     RentalAgreement.Equals(other.RentalAgreement)
                 ) &&
                 (
                     IsForceHire == other.IsForceHire ||
                     IsForceHire != null &&
                     IsForceHire.Equals(other.IsForceHire)
                 ) &&
                 (
                     WasAsked == other.WasAsked ||
                     WasAsked != null &&
                     WasAsked.Equals(other.WasAsked)
                 ) &&
                 (
                     AskedDateTime == other.AskedDateTime ||
                     AskedDateTime != null &&
                     AskedDateTime.Equals(other.AskedDateTime)
                 ) &&
                 (
                     OfferResponse == other.OfferResponse ||
                     OfferResponse != null &&
                     OfferResponse.Equals(other.OfferResponse)
                 ) &&
                 (
                     OfferRefusalReason == other.OfferRefusalReason ||
                     OfferRefusalReason != null &&
                     OfferRefusalReason.Equals(other.OfferRefusalReason)
                 ) &&
                 (
                     OfferResponseDatetime == other.OfferResponseDatetime ||
                     OfferResponseDatetime != null &&
                     OfferResponseDatetime.Equals(other.OfferResponseDatetime)
                 ) &&
                 (
                     OfferResponseNote == other.OfferResponseNote ||
                     OfferResponseNote != null &&
                     OfferResponseNote.Equals(other.OfferResponseNote)
                 ) &&
                 (
                     Note == other.Note ||
                     Note != null &&
                     Note.Equals(other.Note)
                 ));
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="RentalRequestRotationList" /> class.
        /// </summary>
        /// <param name="Id">A system-generated unique identifier for a RequestRotationList (required).</param>
        /// <param name="RotationListSortOrder">The sort order of the piece of equipment on the rotation list at the time the request was created. This is the order the equipment will be offered the available work. (required).</param>
        /// <param name="Equipment">Equipment (required).</param>
        /// <param name="RentalAgreement">The rental agreement (if any) created for an accepted hire offer..</param>
        /// <param name="IsForceHire">True if the HETS Clerk designated the hire of this equipment as being a Forced Hire. A Force Hire implies that the usual seniority rules for hiring are bypassed because of special circumstances related to the hire - e.g. a the hire requires an attachment only one piece of equipment has..</param>
        /// <param name="WasAsked">True if the HETS Clerk contacted the equipment owner and asked to hire the piece of equipment..</param>
        /// <param name="AskedDateTime">The Date-Time the HETS clerk contacted the equipment owner and asked to hire the piece of equipment..</param>
        /// <param name="OfferResponse">The response to the offer to hire. Null prior to receiving a response; a string after with the response - likely just Yes or No.</param>
        /// <param name="OfferRefusalReason">The reason why the user refused the offer based on a selection of values from the UI..</param>
        /// <param name="OfferResponseDatetime">The date and time the final response to the offer was established..</param>
        /// <param name="OfferResponseNote">A note entered about the response to the offer from the equipment owner about the offer. Usually used when the offer is a &amp;quot;No&amp;quot; or &amp;quot;Force Hire&amp;quot;..</param>
        /// <param name="Note">An optional general note about the offer..</param>
        public RentalRequestRotationList(int Id, int RotationListSortOrder, Equipment Equipment, RentalAgreement RentalAgreement = null, bool?IsForceHire = null, bool?WasAsked = null, DateTime?AskedDateTime = null, string OfferResponse = null, string OfferRefusalReason = null, DateTime?OfferResponseDatetime = null, string OfferResponseNote = null, string Note = null)
        {
            this.Id = Id;
            this.RotationListSortOrder = RotationListSortOrder;
            this.Equipment             = Equipment;


            this.RentalAgreement       = RentalAgreement;
            this.IsForceHire           = IsForceHire;
            this.WasAsked              = WasAsked;
            this.AskedDateTime         = AskedDateTime;
            this.OfferResponse         = OfferResponse;
            this.OfferRefusalReason    = OfferRefusalReason;
            this.OfferResponseDatetime = OfferResponseDatetime;
            this.OfferResponseNote     = OfferResponseNote;
            this.Note = Note;
        }