예제 #1
0
        public virtual object Clone(Dictionary <object, object> clonedObjects, bool includePrimaryKey)
        {
            NotificationLog cloned = new NotificationLog();

            clonedObjects.Add(this, cloned);
            if (includePrimaryKey)
            {
                cloned._notificationLogPK = this._notificationLogPK;
            }
            cloned._insCode        = this._insCode;
            cloned._phoneNumber    = this._phoneNumber;
            cloned._email          = this._email;
            cloned._notificationDt = this._notificationDt;
            cloned._messageBody    = this._messageBody;
            cloned._status         = this._status;
            cloned._notificationPK = this._notificationPK;
            cloned._owner          = this._owner;
            if (Instrument != null)
            {
                if (!clonedObjects.ContainsKey(Instrument))
                {
                    cloned.Instrument = (Instrument)Instrument.Clone(clonedObjects, includePrimaryKey);
                }
                else
                {
                    cloned.Instrument = (Instrument)clonedObjects[Instrument];
                }
            }
            if (Notification != null)
            {
                if (!clonedObjects.ContainsKey(Notification))
                {
                    cloned.Notification = (Notification)Notification.Clone(clonedObjects, includePrimaryKey);
                }
                else
                {
                    cloned.Notification = (Notification)clonedObjects[Notification];
                }
            }


            return(cloned);
        }
예제 #2
0
        public virtual bool Equals(object other, List <object> checked_objects)
        {
            if (checked_objects.Contains(this))
            {
                return(true);
            }

            checked_objects.Add(this);

            NotificationLog casted_other = other as NotificationLog;

            if (casted_other == null)
            {
                checked_objects.Remove(this);
                return(false);
            }

            if (!Typing.IsEquals(this.NotificationLogPK, casted_other.NotificationLogPK))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.InsCode, casted_other.InsCode))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.PhoneNumber, casted_other.PhoneNumber))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Email, casted_other.Email))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.NotificationDt, casted_other.NotificationDt))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.MessageBody, casted_other.MessageBody))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Status, casted_other.Status))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.NotificationPK, casted_other.NotificationPK))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Owner, casted_other.Owner))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (this.Instrument != null)
            {
                if (!this.Instrument.Equals(casted_other.Instrument, checked_objects))
                {
                    checked_objects.Remove(this);
                    return(false);
                }
            }
            else
            if (casted_other.Instrument != null)
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (this.Notification != null)
            {
                if (!this.Notification.Equals(casted_other.Notification, checked_objects))
                {
                    checked_objects.Remove(this);
                    return(false);
                }
            }
            else
            if (casted_other.Notification != null)
            {
                checked_objects.Remove(this);
                return(false);
            }
            checked_objects.Remove(this);

            return(true);
        }