Esempio n. 1
0
        public IList<Core.Business.Web_Log> GetAllLogs()
        {
            IList<Core.Business.Web_Log> web_Loglist = new List<Core.Business.Web_Log>();
            SqlServerUtility sql = new SqlServerUtility();

            SqlDataReader reader = sql.ExecuteSqlReader(SqlGetAllWeb_Log);

            if(reader != null)
            {
                while(reader.Read())
                {
                    Core.Business.Web_Log web_Log = new Core.Business.Web_Log();

                    if (!reader.IsDBNull(0)) web_Log.Id = reader.GetInt32(0);
                    if (!reader.IsDBNull(1)) web_Log.Log_DateCreated = reader.GetDateTime(1);
                    if (!reader.IsDBNull(2)) web_Log.Log_Message = reader.GetString(2);
                    if (!reader.IsDBNull(3)) web_Log.ManagerCode = reader.GetString(3);

                    web_Log.MarkOld();
                    web_Loglist.Add(web_Log);
                }
                reader.Close();
            }
            return web_Loglist;
        }