Esempio n. 1
0
        /// <summary>
        /// Created By    : Pavan
        /// Created Date  : 30 June 2015
        /// Modified By   :  
        /// Modified Date :  
        /// </summary>
        /// <returns>Error Log List</returns>
        public static List<ErrorLogs> GetErrorLogs()
        {
            List<ErrorLogs> ErrLogs = new List<ErrorLogs>();
            System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame();
            System.Reflection.MethodBase methodBase = stackFrame.GetMethod();
            log.Debug("Start: " + methodBase.Name);
            var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SPGetErrorLogDetails");
            var safe = new SafeDataReader(reader);
            while (reader.Read())
            {
                var ErrorLog = new ErrorLogs();
                ErrorLog.FetchErrorLogs(ErrorLog, safe);
                ErrLogs.Add(ErrorLog);
            }

            log.Debug("End: " + methodBase.Name);
            return ErrLogs;
        }