コード例 #1
0
ファイル: DutyType.cs プロジェクト: mshivjiani/HCMS
        internal static List <DutyType> GetCollection(DataTable dataItems)
        {
            List <DutyType> listCollection = new List <DutyType>();
            DutyType        current        = null;

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

            return(listCollection);
        }
コード例 #2
0
ファイル: DutyType.cs プロジェクト: mshivjiani/HCMS
        /// <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)
        {
            DutyType dutyTypeobj = obj as DutyType;

            return((dutyTypeobj == null) ? false : (this.DutyTypeID == dutyTypeobj.DutyTypeID));
        }
コード例 #3
0
ファイル: LookupManager.cs プロジェクト: mshivjiani/HCMS
 public static List <DutyType> GetAllDutyTypes()
 {
     return(DutyType.GetCollection(ExecuteDataTable("spr_GetAllDutyTypes")));
 }