コード例 #1
0
        public void CreateDiscount(MemberLocationRecord record, decimal feeamount)
        {
            DbCommand command = this.Provider.GetStoredProcedure("spInsertUpdateMember_Location");

            this.MapParameterIn(command, "@PA_USER_LOGIN_ID", "dev");
            this.MapParametersIn(command, record, true);
            if (record.Fee != 0)
            {
                this.MapParameterIn(command, "@PA_MEL_FEE", record.Fee = decimal.Negate(record.Fee));
            }
            else if (record.DiscPercent != null)
            {
                this.MapParameterIn(command, "@PA_MEL_FEE", record.Fee = decimal.Negate(Convert.ToDecimal((record.DiscPercent * feeamount) / 100)));
            }
            else
            {
                this.MapParameterIn(command, "@PA_MEL_FEE", record.Fee = decimal.Negate(record.Fee));
            }

            if (record.Fee < 0)
            {
                this.MapParameterIn(command, "@PA_MEL_FEE", record.Fee);
            }
            else
            {
                this.MapParameterIn(command, "@PA_MEL_FEE", record.Fee = decimal.Negate(record.Fee));
            }
            this.Execute(command);
            this.MapParametersOut(command, record);
        }
コード例 #2
0
        public override void Modify(MemberLocationRecord record)
        {
            DbCommand command = this.Provider.GetStoredProcedure("spInsertUpdateMember_Location");

            this.MapParameterIn(command, "@PA_USER_LOGIN_ID", "dev");
            this.MapParametersIn(command, record, true);
            if (record.SyType == 1)
            {
                if (record.Fee < 0)
                {
                    this.MapParameterIn(command, "@PA_MEL_FEE", record.Fee = decimal.Negate(record.Fee));
                }
                else
                {
                    this.MapParameterIn(command, "@PA_MEL_FEE", record.Fee);
                }
            }
            this.Execute(command);
            this.MapParametersOut(command, record);
        }
コード例 #3
0
        /// <summary>
        ///     Indicates whether the current <see cref="MemberLocationRecord" /> instance is equal to another <see cref="MemberLocationRecord" /> instance.
        /// </summary>
        /// <param name="that">
        ///     The <see cref="MemberLocationRecord" /> instance to be compared against this instance.
        /// </param>
        /// <returns>
        ///     True if both instances are considered equal; otherwise, false.
        /// </returns>
        public Boolean Equals(MemberLocationRecord that)
        {
            Boolean result = true;

            result = result && (this.Id.TrimOrNullify() == that.Id.TrimOrNullify());
            result = result && (this.MemId.TrimOrNullify() == that.MemId.TrimOrNullify());
            result = result && (this.MepId.TrimOrNullify() == that.MepId.TrimOrNullify());
            result = result && (this.Start == that.Start);
            result = result && (this.End == that.End);
            result = result && (this.Status == that.Status);
            result = result && (this.Type == that.Type);
            result = result && (this.Fee == that.Fee);
            result = result && (this.FeeBc == that.FeeBc);
            result = result && (this.FeeBc2 == that.FeeBc2);
            result = result && (this.Currency.TrimOrNullify() == that.Currency.TrimOrNullify());
            result = result && (this.OrgId.TrimOrNullify() == that.OrgId.TrimOrNullify());
            result = result && (this.ProleId.TrimOrNullify() == that.ProleId.TrimOrNullify());
            result = result && (this.MailAddId.TrimOrNullify() == that.MailAddId.TrimOrNullify());
            result = result && (this.MailInvId.TrimOrNullify() == that.MailInvId.TrimOrNullify());
            result = result && (this.MailToHome == that.MailToHome);
            result = result && (this.RenewLoc == that.RenewLoc);
            result = result && (this.Principal == that.Principal);
            result = result && (this.Overseas == that.Overseas);
            result = result && (this.Vatcd.TrimOrNullify() == that.Vatcd.TrimOrNullify());
            result = result && (this.Ref.TrimOrNullify() == that.Ref.TrimOrNullify());
            result = result && (this.VatRate == that.VatRate);
            result = result && (this.VatAmt == that.VatAmt);
            result = result && (this.VatAmtBc == that.VatAmtBc);
            result = result && (this.VatAmtBc2 == that.VatAmtBc2);
            result = result && (this.InvlnId.TrimOrNullify() == that.InvlnId.TrimOrNullify());
            result = result && (this.NoCopies == that.NoCopies);
            result = result && (this.Invoiced == that.Invoiced);
            result = result && (this.Username.TrimOrNullify() == that.Username.TrimOrNullify());
            result = result && (this.Password.TrimOrNullify() == that.Password.TrimOrNullify());
            result = result && (this.SyType == that.SyType);
            result = result && (this.ProdId.TrimOrNullify() == that.ProdId.TrimOrNullify());
            result = result && (this.Current == that.Current);
            result = result && (this.GrossFee == that.GrossFee);
            result = result && (this.GrossFeeBc == that.GrossFeeBc);
            result = result && (this.GrossFeeBc2 == that.GrossFeeBc2);
            result = result && (this.DiscReason.TrimOrNullify() == that.DiscReason.TrimOrNullify());
            result = result && (this.PhoneOverride.TrimOrNullify() == that.PhoneOverride.TrimOrNullify());
            result = result && (this.FaxOverride.TrimOrNullify() == that.FaxOverride.TrimOrNullify());
            result = result && (this.PhoneStdOverride.TrimOrNullify() == that.PhoneStdOverride.TrimOrNullify());
            result = result && (this.FaxStdOverride.TrimOrNullify() == that.FaxStdOverride.TrimOrNullify());
            result = result && (this.EmailOverride.TrimOrNullify() == that.EmailOverride.TrimOrNullify());
            result = result && (this.Url.TrimOrNullify() == that.Url.TrimOrNullify());
            result = result && (this.FeeNotProRata == that.FeeNotProRata);
            result = result && (this.WebEnabled == that.WebEnabled);
            result = result && (this.FeeExempt == that.FeeExempt);
            result = result && (this.CurrentDate == that.CurrentDate);
            result = result && (this.CancelDate == that.CancelDate);
            result = result && (this.PlId.TrimOrNullify() == that.PlId.TrimOrNullify());
            result = result && (this.DiscId == that.DiscId);
            result = result && (this.Discount == that.Discount);
            result = result && (this.DiscountBc == that.DiscountBc);
            result = result && (this.DiscountBc2 == that.DiscountBc2);
            result = result && (this.DiscAppliedDate == that.DiscAppliedDate);
            result = result && (this.FeeCalculated == that.FeeCalculated);
            result = result && (this.ListPrice == that.ListPrice);
            result = result && (this.ListPriceBc == that.ListPriceBc);
            result = result && (this.ListPriceBc2 == that.ListPriceBc2);
            result = result && (this.DespatchDate == that.DespatchDate);
            result = result && (this.PoNumber.TrimOrNullify() == that.PoNumber.TrimOrNullify());
            result = result && (this.Qty == that.Qty);
            result = result && (this.DoNotRenew == that.DoNotRenew);
            result = result && (this.CancelReason.TrimOrNullify() == that.CancelReason.TrimOrNullify());
            result = result && (this.UntPrice == that.UntPrice);
            result = result && (this.UntPriceBc == that.UntPriceBc);
            result = result && (this.UntPriceBc2 == that.UntPriceBc2);
            result = result && (this.DiscRenewal == that.DiscRenewal);
            result = result && (this.PriceModified == that.PriceModified);
            result = result && (this.DiscPercent == that.DiscPercent);
            result = result && (this.RevCode.TrimOrNullify() == that.RevCode.TrimOrNullify());
            result = result && (this.CostCode.TrimOrNullify() == that.CostCode.TrimOrNullify());
            return(result);
        }
コード例 #4
0
        /// <summary>
        ///     Creates a new <see cref="MemberLocationRecord" /> object instance that is a shallow-copy of the current object instance.
        /// </summary>
        /// <returns>
        ///     The shallow-copy of the current <see cref="MemberLocationRecord" /> object instance.
        /// </returns>
        public MemberLocationRecord Clone()
        {
            MemberLocationRecord record = new MemberLocationRecord();

            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.MemId            = this.MemId;
            record.MepId            = this.MepId;
            record.Start            = this.Start;
            record.End              = this.End;
            record.Status           = this.Status;
            record.Type             = this.Type;
            record.Fee              = this.Fee;
            record.FeeBc            = this.FeeBc;
            record.FeeBc2           = this.FeeBc2;
            record.Currency         = this.Currency;
            record.OrgId            = this.OrgId;
            record.ProleId          = this.ProleId;
            record.MailAddId        = this.MailAddId;
            record.MailInvId        = this.MailInvId;
            record.MailToHome       = this.MailToHome;
            record.RenewLoc         = this.RenewLoc;
            record.Principal        = this.Principal;
            record.Overseas         = this.Overseas;
            record.Vatcd            = this.Vatcd;
            record.Ref              = this.Ref;
            record.VatRate          = this.VatRate;
            record.VatAmt           = this.VatAmt;
            record.VatAmtBc         = this.VatAmtBc;
            record.VatAmtBc2        = this.VatAmtBc2;
            record.InvlnId          = this.InvlnId;
            record.NoCopies         = this.NoCopies;
            record.Invoiced         = this.Invoiced;
            record.Username         = this.Username;
            record.Password         = this.Password;
            record.SyType           = this.SyType;
            record.ProdId           = this.ProdId;
            record.Current          = this.Current;
            record.GrossFee         = this.GrossFee;
            record.GrossFeeBc       = this.GrossFeeBc;
            record.GrossFeeBc2      = this.GrossFeeBc2;
            record.DiscReason       = this.DiscReason;
            record.PhoneOverride    = this.PhoneOverride;
            record.FaxOverride      = this.FaxOverride;
            record.PhoneStdOverride = this.PhoneStdOverride;
            record.FaxStdOverride   = this.FaxStdOverride;
            record.EmailOverride    = this.EmailOverride;
            record.Url              = this.Url;
            record.FeeNotProRata    = this.FeeNotProRata;
            record.WebEnabled       = this.WebEnabled;
            record.FeeExempt        = this.FeeExempt;
            record.CurrentDate      = this.CurrentDate;
            record.CancelDate       = this.CancelDate;
            record.PlId             = this.PlId;
            record.DiscId           = this.DiscId;
            record.Discount         = this.Discount;
            record.DiscountBc       = this.DiscountBc;
            record.DiscountBc2      = this.DiscountBc2;
            record.DiscAppliedDate  = this.DiscAppliedDate;
            record.FeeCalculated    = this.FeeCalculated;
            record.ListPrice        = this.ListPrice;
            record.ListPriceBc      = this.ListPriceBc;
            record.ListPriceBc2     = this.ListPriceBc2;
            record.DespatchDate     = this.DespatchDate;
            record.PoNumber         = this.PoNumber;
            record.Qty              = this.Qty;
            record.DoNotRenew       = this.DoNotRenew;
            record.CancelReason     = this.CancelReason;
            record.UntPrice         = this.UntPrice;
            record.UntPriceBc       = this.UntPriceBc;
            record.UntPriceBc2      = this.UntPriceBc2;
            record.DiscRenewal      = this.DiscRenewal;
            record.PriceModified    = this.PriceModified;
            record.DiscPercent      = this.DiscPercent;
            record.RevCode          = this.RevCode;
            record.CostCode         = this.CostCode;
            return(record);
        }