Exemple #1
0
        public IList<Core.Business.StaffAssess> GetAllStaffAssess()
        {
            IList<Core.Business.StaffAssess> staffAssesslist = new List<Core.Business.StaffAssess>();
            SqlServerUtility sql = new SqlServerUtility();

            SqlDataReader reader = sql.ExecuteSqlReader(SqlGetAllStaffAssess);

            if(reader != null)
            {
                while(reader.Read())
                {
                    Core.Business.StaffAssess staffAssess = new Core.Business.StaffAssess();

                    if (!reader.IsDBNull(0)) staffAssess.Id = reader.GetInt32(0);
                    if (!reader.IsDBNull(1)) staffAssess.StaffCode = reader.GetString(1);
                    if (!reader.IsDBNull(2)) staffAssess.StaffCate = reader.GetString(2);
                    if (!reader.IsDBNull(3)) staffAssess.AssessCate = reader.GetString(3);
                    if (!reader.IsDBNull(4)) staffAssess.AssessScore = reader.GetDecimal(4);

                    staffAssess.MarkOld();
                    staffAssesslist.Add(staffAssess);
                }
                reader.Close();
            }
            return staffAssesslist;
        }