Esempio n. 1
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                ITransaction transactionsCasted = item.As <ITransaction>();

                if ((transactionsCasted != null))
                {
                    this._parent.Transactions.Add(transactionsCasted);
                }
                if ((this._parent.CashierShift == null))
                {
                    ICashierShift cashierShiftCasted = item.As <ICashierShift>();
                    if ((cashierShiftCasted != null))
                    {
                        this._parent.CashierShift = cashierShiftCasted;
                        return;
                    }
                }
                ITender tendersCasted = item.As <ITender>();

                if ((tendersCasted != null))
                {
                    this._parent.Tenders.Add(tendersCasted);
                }
                if ((this._parent.VendorShift == null))
                {
                    IVendorShift vendorShiftCasted = item.As <IVendorShift>();
                    if ((vendorShiftCasted != null))
                    {
                        this._parent.VendorShift = vendorShiftCasted;
                        return;
                    }
                }
                if ((this._parent.Line == null))
                {
                    ILineDetail lineCasted = item.As <ILineDetail>();
                    if ((lineCasted != null))
                    {
                        this._parent.Line = lineCasted;
                        return;
                    }
                }
            }
Esempio n. 2
0
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(IModelElement item)
 {
     if ((this._parent.Line == null))
     {
         ILineDetail lineCasted = item.As<ILineDetail>();
         if ((lineCasted != null))
         {
             this._parent.Line = lineCasted;
             return;
         }
     }
     if ((this._parent.Shift == null))
     {
         IShift shiftCasted = item.As<IShift>();
         if ((shiftCasted != null))
         {
             this._parent.Shift = shiftCasted;
             return;
         }
     }
 }