Exemplo n.º 1
0
        public void Notify(AddInterventoCommand command)
        {
            var sintesi = _getSintesiRichiestaByCodice.GetSintesi(command.Chiamata.Codice);

            _sender.SendNotification(command);

            var messaggio  = $"E' stato richiesto un intervento in {sintesi.Localita.Indirizzo}. Codice Intervento: {sintesi.Codice}";
            var infoMatrix = new MessageMatrix()
            {
                Messaggio = messaggio,
                CodSede   = sintesi.CodSOCompetente.Split('.')[0]
            };

            _callMatrix.SendMessage(infoMatrix);
        }
Exemplo n.º 2
0
        public void Notify(ConfermaPartenzeCommand command)
        {
            _sender.SendNotification(command);

            foreach (var partenza in command.ConfermaPartenze.Partenze)
            {
                var messaggio  = $"La squadra {partenza.Squadre[0].Nome} è partita alle ore {DateTime.Now.Hour}:{DateTime.Now.Minute} dalla sede {partenza.Mezzo.Distaccamento.Descrizione} con il mezzo targato {partenza.Mezzo.Codice} per dirigersi a {command.ConfermaPartenze.richiesta.Localita.Indirizzo}. Codice Intervento: {command.ConfermaPartenze.richiesta.CodRichiesta}";
                var infoMatrix = new MessageMatrix()
                {
                    Messaggio = messaggio,
                    CodSede   = command.ConfermaPartenze.CodiceSede.Split('.')[0]
                };
                _callMatrix.SendMessage(infoMatrix);
            }
        }