Esempio n. 1
0
        private SqlJobMetricViewModel build_sql_job_metric_view_model(SqlJobMetrics metric)
        {
            var metric_view_model = new SqlJobMetricViewModel();
                metric_view_model.job_name = metric.job_name;
                metric_view_model.last_run = metric.last_run.ToString("M.d.yyyy h:mm");
                metric_view_model.message = metric.message;
                metric_view_model.job_step = metric.job_step.ToString();

            return metric_view_model;
        }
Esempio n. 2
0
        SqlJobMetrics build_sql_job_metric_from_reader(SqlDataReader reader)
        {
            var metric = new SqlJobMetrics();

            metric.job_name = reader.GetString(0);
            metric.message = reader.GetString(1);

            var job_outcome_key = reader.GetByte(2);
            metric.job_status = get_job_outcome_from_key(job_outcome_key);

            metric.last_run = reader.GetDateTime(3);
            metric.job_step = reader.GetInt16(4);

            return metric;
        }