///<summary>Inserts a generic alert where description will show in the menu item and itemValue will be shown within a MsgBoxCopyPaste. ///Set itemValue to more specific reason for the alert. E.g. exception text details as to help the techs give better support.</summary> public static void CreateGenericAlert(string description, string itemValue) { AlertItem alert = new AlertItem(); alert.Type = AlertType.Generic; alert.Actions = ActionType.MarkAsRead | ActionType.Delete | ActionType.ShowItemValue; alert.Description = description; alert.Severity = SeverityType.Low; alert.ItemValue = itemValue; AlertItems.Insert(alert); }
///<summary>Also inserts an EConnectorError Alert where applicable.</summary> public static long Insert(EServiceSignal eServiceSignal) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { eServiceSignal.EServiceSignalNum = Meth.GetLong(MethodBase.GetCurrentMethod(), eServiceSignal); return(eServiceSignal.EServiceSignalNum); } //If this is an error and the EConnectorError alert is not already present, create it now. if (eServiceSignal.Severity == eServiceSignalSeverity.Error && AlertItems.RefreshForType(AlertType.EConnectorError).Count == 0) { //Create an alert. AlertItems.Insert(new AlertItem { //Do not allow delete. The only way for this alert to be deleted is to open the eConnector form and ACK the error(s). Actions = ActionType.MarkAsRead | ActionType.OpenForm, Description = Lans.g("EConnector", "eConnector has posted an error."), Severity = SeverityType.Low, Type = AlertType.EConnectorError, FormToOpen = FormType.FormEServicesEConnector, }); } return(Crud.EServiceSignalCrud.Insert(eServiceSignal)); }