Exemplo n.º 1
0
 public virtual void RemoveRailAgencies(RailAgency __item)
 {
     if (__item != null && railAgencies != null && railAgencies.Contains(__item))
     {
         railAgencies.Remove(__item);
     }
 }
Exemplo n.º 2
0
 public virtual void AddRailAgencies(RailAgency __item)
 {
     if (__item != null && railAgencies != null && !railAgencies.Contains(__item))
     {
         railAgencies.Add(__item);
     }
 }
Exemplo n.º 3
0
 public virtual void SetRailAgenciesAt(RailAgency __item, int __index)
 {
     if (__item == null)
     {
         railAgencies[__index] = null;
     }
     else
     {
         railAgencies[__index] = __item;
     }
 }
Exemplo n.º 4
0
/// <summary>
/// Copies the current object to a new instance
/// </summary>
/// <param name="deep">Copy members that refer to objects external to this class (not dependent)</param>
/// <param name="copiedObjects">Objects that should be reused</param>
/// <param name="asNew">Copy the current object as a new one, ready to be persisted, along all its members.</param>
/// <param name="reuseNestedObjects">If asNew is true, this flag if set, forces the reuse of all external objects.</param>
/// <param name="copy">Optional - An existing [RailAgency] instance to use as the destination.</param>
/// <returns>A copy of the object</returns>
        public virtual RailAgency Copy(bool deep = false, Hashtable copiedObjects = null, bool asNew = false, bool reuseNestedObjects = false, RailAgency copy = null)
        {
            if (copiedObjects == null)
            {
                copiedObjects = new Hashtable();
            }
            if (copy == null && copiedObjects.Contains(this))
            {
                return((RailAgency)copiedObjects[this]);
            }
            copy = copy ?? new RailAgency();
            if (!asNew)
            {
                copy.TransientId = this.TransientId;
            }
            copy.ConditionsOfCarriage          = this.ConditionsOfCarriage;
            copy.AcceptedMeansOfPayment        = this.AcceptedMeansOfPayment;
            copy.SalesConditions               = this.SalesConditions;
            copy.AftersalesConditions          = this.AftersalesConditions;
            copy.ComplaintSubmissionProcedures = this.ComplaintSubmissionProcedures;
            copy.SilverRailCode = this.SilverRailCode;
            copy.IsSupplier     = this.IsSupplier;
            if (!copiedObjects.Contains(this))
            {
                copiedObjects.Add(this, copy);
            }
            base.Copy(deep, copiedObjects, asNew, reuseNestedObjects, copy);
            return(copy);
        }