Exemplo n.º 1
0
        public List <AlertStructure> GetAllAlert()
        {
            BrienzDataAccess      db               = new BrienzDataAccess();
            List <AlertStructure> result           = new List <AlertStructure>();
            List <BrienzAlert>    AlertsCollection = db.GetAllAlerts();

            foreach (BrienzAlert AlertIndex in AlertsCollection)
            {
                result.Add(
                    new AlertStructure {
                    AlertID      = AlertIndex.AlertID,
                    AlertSubject = AlertIndex.AlertSubject,
                    Severity     = AlertIndex.AlertSeverity,
                    AlertContent = AlertIndex.AlertContent,
                    AlertReason  = AlertIndex.AlertReason,
                    Alert_Tag    = AlertIndex.Alert_Tag,
                    AlertTime    = AlertIndex.AlertTime ?? DateTime.Now
                });
            }
            return(result);
        }