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

            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.Ref         = this.Ref;
            record.Notes       = this.Notes;
            record.PmId        = this.PmId;
            record.Start       = this.Start;
            record.CustOrderNo = this.CustOrderNo;
            record.Username    = this.Username;
            record.Password    = this.Password;
            record.RegStatus   = this.RegStatus;
            record.Type        = this.Type;
            record.Status      = this.Status;
            record.Grade       = this.Grade;
            record.SubOnly     = this.SubOnly;
            record.BiogHtml    = this.BiogHtml;
            return(record);
        }
        public override void Modify(MembershipRecord record)
        {
            DbCommand command = this.Provider.GetStoredProcedure("spInsertUpdateMembership");

            this.MapParameterIn(command, "@PA_USER_LOGIN_ID", "dev");
            this.MapParametersIn(command, record, true);
            this.Execute(command);
            this.MapParametersOut(command, record);
        }
Ejemplo n.º 3
0
        /// <summary>
        ///     Indicates whether the current <see cref="MembershipRecord" /> instance is equal to another <see cref="MembershipRecord" /> instance.
        /// </summary>
        /// <param name="that">
        ///     The <see cref="MembershipRecord" /> instance to be compared against this instance.
        /// </param>
        /// <returns>
        ///     True if both instances are considered equal; otherwise, false.
        /// </returns>
        public Boolean Equals(MembershipRecord that)
        {
            Boolean result = true;

            result = result && (this.Id.TrimOrNullify() == that.Id.TrimOrNullify());
            result = result && (this.Ref.TrimOrNullify() == that.Ref.TrimOrNullify());
            result = result && (this.Notes.TrimOrNullify() == that.Notes.TrimOrNullify());
            result = result && (this.PmId.TrimOrNullify() == that.PmId.TrimOrNullify());
            result = result && (this.Start == that.Start);
            result = result && (this.CustOrderNo.TrimOrNullify() == that.CustOrderNo.TrimOrNullify());
            result = result && (this.Username.TrimOrNullify() == that.Username.TrimOrNullify());
            result = result && (this.Password.TrimOrNullify() == that.Password.TrimOrNullify());
            result = result && (this.RegStatus.TrimOrNullify() == that.RegStatus.TrimOrNullify());
            result = result && (this.Type.TrimOrNullify() == that.Type.TrimOrNullify());
            result = result && (this.Status.TrimOrNullify() == that.Status.TrimOrNullify());
            result = result && (this.Grade.TrimOrNullify() == that.Grade.TrimOrNullify());
            result = result && (this.SubOnly == that.SubOnly);
            result = result && (this.BiogHtml.TrimOrNullify() == that.BiogHtml.TrimOrNullify());
            return(result);
        }