コード例 #1
0
        /// <summary>
        ///     Retrieves a single <see cref='PriceModel' /> instance.
        /// </summary>
        /// <param name="productId">
        ///     The value which identifies the <see cref='PriceModel' /> instance to be returned.
        /// </param>
        /// <returns>
        ///     The <see cref='PriceModel' /> instance that match the specified <paramref name='productId' />.
        /// </returns>
        public LocalPriceModel RecalculateMemberFee(String productId, String plId, DateTime?startDate, DateTime?endDate, Int32 qtyTotal)
        {
            PricesRecord    record = this.Provider.DataProvider.Finance.Price.RecalculateMemberFee(productId, plId, startDate, endDate, qtyTotal);
            LocalPriceModel model  = record == null ? null : new LocalPriceModel(this.Provider, record);

            return(model);
        }
コード例 #2
0
        public override void Create(PricesRecord record)
        {
            DbCommand command = this.Provider.GetStoredProcedure("spInsertUpdatePrice");

            this.MapParameterIn(command, "@PA_USER_LOGIN_ID", "dev");
            this.MapParametersIn(command, record, true);
            this.Execute(command);
            this.MapParametersOut(command, record);
        }
コード例 #3
0
        /// <summary>
        ///     Creates a new <see cref="PricesRecord" /> object instance that is a shallow-copy of the current object instance.
        /// </summary>
        /// <returns>
        ///     The shallow-copy of the current <see cref="PricesRecord" /> object instance.
        /// </returns>
        public PricesRecord Clone()
        {
            PricesRecord record = new PricesRecord();

            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.PlId         = this.PlId;
            record.ProdId       = this.ProdId;
            record.Price        = this.Price;
            record.BlockPrice   = this.BlockPrice;
            record.SparePrice   = this.SparePrice;
            record.CostPrice    = this.CostPrice;
            record.CostCode     = this.CostCode;
            record.RevCode      = this.RevCode;
            record.DiscSched    = this.DiscSched;
            record.VatCode      = this.VatCode;
            record.RetailPrice  = this.RetailPrice;
            record.NoCostNoSel  = this.NoCostNoSel;
            record.Default      = this.Default;
            record.GlCode1      = this.GlCode1;
            record.GlCode2      = this.GlCode2;
            record.ProdCategory = this.ProdCategory;
            record.DiscPercent  = this.DiscPercent;
            record.PriceA       = this.PriceA;
            record.PriceB       = this.PriceB;
            record.PriceC       = this.PriceC;
            record.PriceD       = this.PriceD;
            record.PriceE       = this.PriceE;
            record.GroupQty     = this.GroupQty;
            record.GroupDte     = this.GroupDte;
            record.GroupQtyId   = this.GroupQtyId;
            record.GroupDteId   = this.GroupDteId;
            record.QtyMin       = this.QtyMin;
            record.QtyMax       = this.QtyMax;
            record.ValidFrom    = this.ValidFrom;
            record.ValidUntil   = this.ValidUntil;
            record.BeforeDays   = this.BeforeDays;
            record.VatCode2     = this.VatCode2;
            record.StartDate    = this.StartDate;
            record.EndDate      = this.EndDate;
            record.QualId       = this.QualId;
            record.PrepayProdId = this.PrepayProdId;
            record.LineId       = this.LineId;
            record.SeasId       = this.SeasId;
            record.IncPlaces    = this.IncPlaces;
            record.SubPrice1    = this.SubPrice1;
            record.SubPrice2    = this.SubPrice2;
            record.SubPrice3    = this.SubPrice3;
            record.SubPrice4    = this.SubPrice4;
            record.SubPrice5    = this.SubPrice5;
            record.SubPrice6    = this.SubPrice6;
            record.SubPrice7    = this.SubPrice7;
            record.SubPrice8    = this.SubPrice8;
            record.SubPrice9    = this.SubPrice9;
            record.CurrType     = this.CurrType;
            record.DoNotRecalc  = this.DoNotRecalc;
            record.SchnNumber   = this.SchnNumber;
            record.MembPrice    = this.MembPrice;
            record.Start        = this.Start;
            record.End          = this.End;
            record.Desc         = this.Desc;
            record.PrsId        = this.PrsId;
            record.Web          = this.Web;
            record.ValidDate    = this.ValidDate;
            record.Region       = this.Region;
            record.Type         = this.Type;
            record.SeaId        = this.SeaId;
            return(record);
        }
コード例 #4
0
        /// <summary>
        ///     Indicates whether the current <see cref="PricesRecord" /> instance is equal to another <see cref="PricesRecord" /> instance.
        /// </summary>
        /// <param name="that">
        ///     The <see cref="PricesRecord" /> instance to be compared against this instance.
        /// </param>
        /// <returns>
        ///     True if both instances are considered equal; otherwise, false.
        /// </returns>
        public Boolean Equals(PricesRecord that)
        {
            Boolean result = true;

            result = result && (this.Id.TrimOrNullify() == that.Id.TrimOrNullify());
            result = result && (this.Lock.TrimOrNullify() == that.Lock.TrimOrNullify());
            result = result && (this.PlId.TrimOrNullify() == that.PlId.TrimOrNullify());
            result = result && (this.ProdId.TrimOrNullify() == that.ProdId.TrimOrNullify());
            result = result && (this.Price == that.Price);
            result = result && (this.BlockPrice == that.BlockPrice);
            result = result && (this.SparePrice == that.SparePrice);
            result = result && (this.CostPrice == that.CostPrice);
            result = result && (this.CostCode.TrimOrNullify() == that.CostCode.TrimOrNullify());
            result = result && (this.RevCode.TrimOrNullify() == that.RevCode.TrimOrNullify());
            result = result && (this.DiscSched.TrimOrNullify() == that.DiscSched.TrimOrNullify());
            result = result && (this.VatCode.TrimOrNullify() == that.VatCode.TrimOrNullify());
            result = result && (this.RetailPrice == that.RetailPrice);
            result = result && (this.NoCostNoSel == that.NoCostNoSel);
            result = result && (this.Default == that.Default);
            result = result && (this.GlCode1.TrimOrNullify() == that.GlCode1.TrimOrNullify());
            result = result && (this.GlCode2.TrimOrNullify() == that.GlCode2.TrimOrNullify());
            result = result && (this.ProdCategory.TrimOrNullify() == that.ProdCategory.TrimOrNullify());
            result = result && (this.DiscPercent == that.DiscPercent);
            result = result && (this.PriceA == that.PriceA);
            result = result && (this.PriceB == that.PriceB);
            result = result && (this.PriceC == that.PriceC);
            result = result && (this.PriceD == that.PriceD);
            result = result && (this.PriceE == that.PriceE);
            result = result && (this.GroupQty == that.GroupQty);
            result = result && (this.GroupDte == that.GroupDte);
            result = result && (this.GroupQtyId.TrimOrNullify() == that.GroupQtyId.TrimOrNullify());
            result = result && (this.GroupDteId.TrimOrNullify() == that.GroupDteId.TrimOrNullify());
            result = result && (this.QtyMin == that.QtyMin);
            result = result && (this.QtyMax == that.QtyMax);
            result = result && (this.ValidFrom == that.ValidFrom);
            result = result && (this.ValidUntil == that.ValidUntil);
            result = result && (this.BeforeDays == that.BeforeDays);
            result = result && (this.VatCode2.TrimOrNullify() == that.VatCode2.TrimOrNullify());
            result = result && (this.StartDate == that.StartDate);
            result = result && (this.EndDate == that.EndDate);
            result = result && (this.QualId.TrimOrNullify() == that.QualId.TrimOrNullify());
            result = result && (this.PrepayProdId.TrimOrNullify() == that.PrepayProdId.TrimOrNullify());
            result = result && (this.LineId.TrimOrNullify() == that.LineId.TrimOrNullify());
            result = result && (this.SeasId.TrimOrNullify() == that.SeasId.TrimOrNullify());
            result = result && (this.IncPlaces == that.IncPlaces);
            result = result && (this.SubPrice1 == that.SubPrice1);
            result = result && (this.SubPrice2 == that.SubPrice2);
            result = result && (this.SubPrice3 == that.SubPrice3);
            result = result && (this.SubPrice4 == that.SubPrice4);
            result = result && (this.SubPrice5 == that.SubPrice5);
            result = result && (this.SubPrice6 == that.SubPrice6);
            result = result && (this.SubPrice7 == that.SubPrice7);
            result = result && (this.SubPrice8 == that.SubPrice8);
            result = result && (this.SubPrice9 == that.SubPrice9);
            result = result && (this.CurrType.TrimOrNullify() == that.CurrType.TrimOrNullify());
            result = result && (this.DoNotRecalc == that.DoNotRecalc);
            result = result && (this.SchnNumber == that.SchnNumber);
            result = result && (this.MembPrice == that.MembPrice);
            result = result && (this.Start == that.Start);
            result = result && (this.End == that.End);
            result = result && (this.Desc.TrimOrNullify() == that.Desc.TrimOrNullify());
            result = result && (this.PrsId.TrimOrNullify() == that.PrsId.TrimOrNullify());
            result = result && (this.Web == that.Web);
            result = result && (this.ValidDate == that.ValidDate);
            result = result && (this.Region.TrimOrNullify() == that.Region.TrimOrNullify());
            result = result && (this.Type == that.Type);
            result = result && (this.SeaId == that.SeaId);
            return(result);
        }