コード例 #1
0
        /// <summary>
        ///     Indicates whether the current <see cref="BranchRecord" /> instance is equal to another <see cref="BranchRecord" /> instance.
        /// </summary>
        /// <param name="that">
        ///     The <see cref="BranchRecord" /> instance to be compared against this instance.
        /// </param>
        /// <returns>
        ///     True if both instances are considered equal; otherwise, false.
        /// </returns>
        public Boolean Equals(BranchRecord that)
        {
            Boolean result = true;

            result = result && (this.Id.TrimOrNullify() == that.Id.TrimOrNullify());
            result = result && (this.Name.TrimOrNullify() == that.Name.TrimOrNullify());
            result = result && (this.Status.TrimOrNullify() == that.Status.TrimOrNullify());
            result = result && (this.Type.TrimOrNullify() == that.Type.TrimOrNullify());
            result = result && (this.Category.TrimOrNullify() == that.Category.TrimOrNullify());
            result = result && (this.Group.TrimOrNullify() == that.Group.TrimOrNullify());
            result = result && (this.Region.TrimOrNullify() == that.Region.TrimOrNullify());
            result = result && (this.Web == that.Web);
            result = result && (this.ExtUrl.TrimOrNullify() == that.ExtUrl.TrimOrNullify());
            return(result);
        }
コード例 #2
0
        /// <summary>
        ///     Creates a new <see cref="BranchRecord" /> object instance that is a shallow-copy of the current object instance.
        /// </summary>
        /// <returns>
        ///     The shallow-copy of the current <see cref="BranchRecord" /> object instance.
        /// </returns>
        public BranchRecord Clone()
        {
            BranchRecord record = new BranchRecord();

            record.Id       = this.Id;
            record.AddBy    = this.AddBy;
            record.AddDate  = this.AddDate;
            record.ModBy    = this.ModBy;
            record.ModDate  = this.ModDate;
            record.RcvFrom  = this.RcvFrom;
            record.RcvDate  = this.RcvDate;
            record.Name     = this.Name;
            record.Status   = this.Status;
            record.Type     = this.Type;
            record.Category = this.Category;
            record.Group    = this.Group;
            record.Region   = this.Region;
            record.Web      = this.Web;
            record.ExtUrl   = this.ExtUrl;
            return(record);
        }