/// <summary> /// Delete the current Alert from the database /// </summary> public void Delete() { // Delete from the database AlertsDAO lwDataAccess = new AlertsDAO(); lwDataAccess.AlertDelete(this); }
/// <summary> /// Dismiss this alert /// </summary> public void Dismiss() { AlertsDAO lwDataAccess = new AlertsDAO(); Status = AlertStatus.dismissed; lwDataAccess.AlertSetStatus(this); }
public int Add() { // Add from the database AlertsDAO lwDataAccess = new AlertsDAO(); _alertID = lwDataAccess.AlertAdd(this); return(_alertID); }
public int Populate(DateTime dtSince) { // Ensure that the list is empty initially this.Clear(); AlertsDAO lwDataAccess = new AlertsDAO(); DataTable table = lwDataAccess.EnumerateAlerts(dtSince); // Iterate through the returned rows in the table and create AssetType objects for each foreach (DataRow row in table.Rows) { AddAlert(row); } return(this.Count); }