Ejemplo n.º 1
0
 /// <summary>
 /// 单据头项索经号
 /// </summary>
 /// <value></value>
 /// <returns></returns>
 public IHeadItem this[int index]
 {
     get
     {
         IHeadItem headItemInstance = null;
         if (this._headItemInstanceCatch.ContainsKey(index))
         {
             headItemInstance = this._headItemInstanceCatch[index];
         }
         else
         {
             headItemInstance = new NewBillerHeadItem(this.Biller, this, index);
             this._headItemInstanceCatch.Add(index, headItemInstance);
         }
         return(headItemInstance);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 单据头项索引号
        /// </summary>
        /// <value></value>
        /// <returns></returns>
        public IHeadItem this[int index]
        {
            get
            {
                int       maxIndex    = Convert.ToInt32(VBDoNetPlugInstance.GetOldBillerInstance().Head_GetMaxIndex(this.m_BillTransfer));
                IHeadItem returnValue = null;
                //判断下标是否越界
                if (index < 0 || index > maxIndex)
                {
                    throw new IndexOutOfRangeException();
                }
                if (this._headInstanceCatch.ContainsKey(index))
                {
                    returnValue = this._headInstanceCatch[index];
                }
                else
                {
                    returnValue = new OldBillHeadItem(this.Biller, this, index);
                    this._headInstanceCatch.Add(index, returnValue);
                }

                return(returnValue);
            }
        }