示例#1
0
        /// <summary>
        /// Copies the given card from one dictionary to this dictionary and returns the new ID.
        /// </summary>
        /// <param name="card">The card.</param>
        /// <returns></returns>
        /// <remarks>Documented by Dev03, 2007-09-21</remarks>
        /// <remarks>Documented by Dev03, 2009-01-13</remarks>
        public int CopyCard(ICard card)
        {
            if (!this.HasPermission(PermissionTypes.CanModify))
            {
                throw new PermissionException();
            }
            ICard newCard = Create();

            card.CopyTo(newCard, null);
            Add(newCard);
            return(newCard.Id);
        }
示例#2
0
 /// <summary>
 /// Copies the given card from one dictionary to this dictionary and returns the new ID.
 /// </summary>
 /// <param name="card">The card.</param>
 /// <returns></returns>
 /// <remarks>Documented by Dev03, 2007-09-21</remarks>
 /// <remarks>Documented by Dev03, 2009-01-13</remarks>
 public int CopyCard(ICard card)
 {
     if (!this.HasPermission(PermissionTypes.CanModify))
         throw new PermissionException();
     ICard newCard = Create();
     card.CopyTo(newCard, null);
     Add(newCard);
     return newCard.Id;
 }