Exemplo n.º 1
0
        /// <summary>
        ///     Creates a new <see cref="LiteratureRecord" /> object instance that is a shallow-copy of the current object instance.
        /// </summary>
        /// <returns>
        ///     The shallow-copy of the current <see cref="LiteratureRecord" /> object instance.
        /// </returns>
        public LiteratureRecord Clone()
        {
            LiteratureRecord record = new LiteratureRecord();

            record.Id           = this.Id;
            record.Lock         = this.Lock;
            record.AddDate      = this.AddDate;
            record.AddBy        = this.AddBy;
            record.ModDate      = this.ModDate;
            record.ModBy        = this.ModBy;
            record.RcvDate      = this.RcvDate;
            record.RcvFrom      = this.RcvFrom;
            record.Name         = this.Name;
            record.Cost         = this.Cost;
            record.Template     = this.Template;
            record.Exam         = this.Exam;
            record.Attendance   = this.Attendance;
            record.Type         = this.Type;
            record.Current      = this.Current;
            record.LtId         = this.LtId;
            record.SendOverride = this.SendOverride;
            record.EmailOnly    = this.EmailOnly;
            record.PrintOnly    = this.PrintOnly;
            record.FileName     = this.FileName;
            return(record);
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Indicates whether the current <see cref="LiteratureRecord" /> instance is equal to another <see cref="LiteratureRecord" /> instance.
        /// </summary>
        /// <param name="that">
        ///     The <see cref="LiteratureRecord" /> instance to be compared against this instance.
        /// </param>
        /// <returns>
        ///     True if both instances are considered equal; otherwise, false.
        /// </returns>
        public Boolean Equals(LiteratureRecord that)
        {
            Boolean result = true;

            result = result && (this.Id.TrimOrNullify() == that.Id.TrimOrNullify());
            result = result && (this.Lock.TrimOrNullify() == that.Lock.TrimOrNullify());
            result = result && (this.Name.TrimOrNullify() == that.Name.TrimOrNullify());
            result = result && (this.Cost == that.Cost);
            result = result && (this.Template.TrimOrNullify() == that.Template.TrimOrNullify());
            result = result && (this.Exam == that.Exam);
            result = result && (this.Attendance == that.Attendance);
            result = result && (this.Type == that.Type);
            result = result && (this.Current == that.Current);
            result = result && (this.LtId.TrimOrNullify() == that.LtId.TrimOrNullify());
            result = result && (this.SendOverride == that.SendOverride);
            result = result && (this.EmailOnly == that.EmailOnly);
            result = result && (this.PrintOnly == that.PrintOnly);
            result = result && (this.FileName.TrimOrNullify() == that.FileName.TrimOrNullify());
            return(result);
        }