Beispiel #1
0
        internal static List <PositionDuty> GetCollection(DataTable dataItems)
        {
            List <PositionDuty> listCollection = new List <PositionDuty>();
            PositionDuty        current        = null;

            if (dataItems != null)
            {
                for (int i = 0; i < dataItems.Rows.Count; i++)
                {
                    current = new PositionDuty(dataItems.Rows[i]);
                    listCollection.Add(current);
                }
            }
            else
            {
                throw new Exception("You cannot create a PositionDuty collection from a null data table.");
            }

            return(listCollection);
        }
Beispiel #2
0
        /// <summary>
        /// Determines whether the specified System.Object is equal to the current object.
        /// </summary>
        /// <param name="obj">The System.Object to compare with the current object.</param>
        /// <returns>Returns true if the specified System.Object is equal to the current object; otherwise, false.</returns>
        public override bool Equals(Object obj)
        {
            PositionDuty PositionDutyobj = obj as PositionDuty;

            return((PositionDutyobj == null) ? false : (this.DutyID == PositionDutyobj.DutyID));
        }