Exemple #1
0
        public BackgroundProcessExecutionDetailEntity AdaptItem(DataRow rw)
        {
            BackgroundProcessExecutionDetailEntity result = new BackgroundProcessExecutionDetailEntity();

            if (rw.Table.Columns["AuditId"] != null)
            {
                result.AuditId = SafeHelper.GetSafeint(rw["AuditId"]);
            }

            if (rw.Table.Columns["ETLType"] != null)
            {
                result.ETLType = SafeHelper.GetSafestring(rw["ETLType"]);
            }

            if (rw.Table.Columns["Message"] != null)
            {
                result.Message = SafeHelper.GetSafestring(rw["Message"]);
            }

            if (rw.Table.Columns["AuditDateTime"] != null)
            {
                result.AuditDateTime = SafeHelper.GetSafeDateTime(rw["AuditDateTime"]);
            }

            if (rw.Table.Columns["ProcessComplete"] != null)
            {
                result.ProcessComplete = SafeHelper.GetSafestring(rw["ProcessComplete"]);
            }

            return(result);
        }
Exemple #2
0
        public List <BackgroundProcessExecutionDetailEntity> Adapt(DataTable dt)
        {
            List <BackgroundProcessExecutionDetailEntity> results = new List <BackgroundProcessExecutionDetailEntity>();

            foreach (DataRow rw in dt.Rows)
            {
                BackgroundProcessExecutionDetailEntity matchCode = new BackgroundProcessExecutionDetailEntity();
                matchCode = AdaptItem(rw);
                results.Add(matchCode);
            }
            return(results);
        }