Ejemplo n.º 1
0
        //internal void GetIncidentSOP(dynamic Incident)
        //{
        //    if (Incident != null && Incident.Latitude != null && Incident.Longitude != null && Incident.CreatedTime != null) {
        //        SopSource = new SOPModel {
        //            Text = Incident.MessageText,
        //            Date = Incident.CreatedTime,
        //            Latitude = Incident.Latitude,
        //            Longitude = Incident.Longitude
        //        };
        //    }
        //    else
        //        SopSource = null;

        //    ServiceLayerReference.ServiceLayerClient _client = new ServiceLayerReference.ServiceLayerClient();

        //    var lstSopAsync = _client.GetMessageTypeSOPAsync("IncidentSOPMessages");

        //    var obs = lstSopAsync.ToObservable();
        //    obs.Subscribe((x) => AddNewSOP(x == null ? null : x.ToList()));

        //}

        //internal void GetViolationSOP(dynamic Violation)
        //{
        //    if (Violation != null && Violation.Latitude != null && Violation.Longitude != null) {
        //        SopSource = new SOPModel {
        //            Text = Violation.MessageText,
        //            Date = Violation.DateTaken,
        //            Latitude = Violation.Latitude,
        //            Longitude = Violation.Longitude
        //        };
        //    }
        //    else
        //        SopSource = null;

        //    ServiceLayerReference.ServiceLayerClient _client = new ServiceLayerReference.ServiceLayerClient();

        //    var lstSopAsync = _client.GetMessageTypeSOPAsync("ViolationSOPMessages");

        //    var obs = lstSopAsync.ToObservable();
        //    obs.Subscribe((x) => AddNewSOP(x == null ? null : x.ToList()));
        //}

        public void SaveSopStep(int sopStepId, int userId)
        {
            try
            {
                var client = new ServiceLayerClient();
                client.SaveSOPNotificationLogAsync(sopStepId, _currentMessage.NotificationId, null, userId, "", "");
            }
            catch (Exception ex)
            {
            }
        }