Esempio n. 1
0
        //#region Entity Override Methods
        //public override void AssignFrom(Entity rhs)
        //{
        //    base.AssignFrom(rhs);
        //    Copy2(this);

        //    RecurringSaleLine _obj = (RecurringSaleLine)rhs;
        //    RecurringSaleLineID = _obj.RecurringSaleLineID;
        //    RecurringSaleID = _obj.RecurringSaleID;
        //    RecurringSale = _obj.RecurringSale;
        //}
        //public override void Copy2(Entity rhs)
        //{
        //    base.Copy2(rhs);
        //    RecurringSaleLine _obj = (RecurringSaleLine)rhs;

        //    LineNumber = _obj.LineNumber;
        //    LineTypeID = _obj.LineTypeID;
        //    Description = _obj.Description;
        //    TaxExclusiveAmount = _obj.TaxExclusiveAmount;
        //    TaxInclusiveAmount = _obj.TaxInclusiveAmount;
        //    JobID = _obj.JobID;
        //    Job = _obj.Job;
        //    TaxBasisAmount = _obj.TaxBasisAmount;
        //    TaxBasisAmountIsInclusive = _obj.TaxBasisAmountIsInclusive;
        //    TaxCodeID = _obj.TaxCodeID;
        //    TaxCode = _obj.TaxCode;
        //}
        //#endregion

        #region Object Override Methods
        public override bool Equals(object obj)
        {
            if (obj is RecurringSaleLine)
            {
                RecurringSaleLine _obj = (RecurringSaleLine)obj;
                if (FromDb && _obj.FromDb)
                {
                    return(_obj.RecurringSaleLineID == RecurringSaleLineID);
                }
                if (RecurringSale.Equals(_obj.RecurringSale))
                {
                    return(_obj.LineNumber == LineNumber);
                }
            }
            return(false);
        }
Esempio n. 2
0
        public override void AssignFrom(Entity rhs)
        {
            base.AssignFrom(rhs);
            //Copy2(rhs);

            RecurringSale _obj = rhs as RecurringSale;

            //this.RecurringSaleID = _obj.RecurringSaleID;

            //RecurringSaleLines.Clear();
            mRecurringSaleLines = new BindingList <RecurringSaleLine>();

            foreach (RecurringSaleLine line in _obj.RecurringSaleLines)
            {
                RecurringSaleLine new_line = line.Clone() as RecurringSaleLine;
                new_line.RecurringSale = this;
                mRecurringSaleLines.Add(new_line);
            }
        }