Example #1
0
        /// <summary>
        /// Method to get all employment status list.
        /// </summary>
        /// <returns>List of all employment status</returns>
        public static List <EmploymentStatus> GetAllEmploymentStatus()
        {
            List <EmploymentStatus> employmentStatusList = new List <EmploymentStatus>();

            DataTable dt = new DataTable();

            dt = DALClass.GetAllEmploymentStatus();

            if (dt != null && dt.Rows.Count > 0)
            {
                foreach (DataRow row in dt.Rows)
                {
                    employmentStatusList.Add(new EmploymentStatus
                    {
                        EmploymentStatusID   = Convert.ToInt32(row[0]),
                        EmploymentStatusName = row[1].ToString()
                    });
                }
            }

            return(employmentStatusList);
        }