Exemplo n.º 1
0
        //keep update once there is a respond from the console to gateway
        public void UpdateIncidentCodingStatus(CADIncidentCodingStatus incidentcodingstatus)
        {
            SendOrPostCallback callback =
                delegate(object state)
            {
                Log("Update Incident Coding Status");
                foreach (string unitcallsign in incidentcodingstatus.AckTracking.Unit)
                {
                    IncidentCodingStatus newincidentcodingsttaus = new IncidentCodingStatus();
                    newincidentcodingsttaus.CodingID     = incidentcodingstatus.CodingID;
                    newincidentcodingsttaus.TrackStation = incidentcodingstatus.AckTracking.Station;
                    newincidentcodingsttaus.TrackStatus  = incidentcodingstatus.AckTracking.Status;
                    newincidentcodingsttaus.TrackUnit    = unitcallsign;
                    newincidentcodingsttaus.AckFrom      = incidentcodingstatus.AckFrom;
                    newincidentcodingsttaus.AckStatus    = incidentcodingstatus.AckStatus;
                    newincidentcodingsttaus.AckTimeStamp = String.Format("{0:g}", incidentcodingstatus.AckTimeStamp);
                    newincidentcodingsttaus.AckNo        = incidentcodingstatus.AckNo.ToString();
                    newincidentcodingsttaus.AckTotal     = incidentcodingstatus.AckTotal.ToString();

                    _IncidentCodingStatusList.Add(newincidentcodingsttaus);
                }
            };

            _uiSyncContext.Post(callback, "update Incident Coding Status");
        }
Exemplo n.º 2
0
        //Update according at the CAD from thr adhoc Incident Coding Query
        public void RcvIncidentCodingStatusResponse(CADIncidentAck codingstatusresponse)
        {
            SendOrPostCallback callback =
                delegate(object state)
            {
                Log("Update response from ad hoc request");
                //for each station in the tracking
                foreach (Tracking station in codingstatusresponse.AckTracking)
                {
                    //for each unit in the station
                    foreach (string unitcallsign in station.Unit)
                    {
                        IncidentCodingStatus newincidentcodingsttaus = new IncidentCodingStatus();
                        newincidentcodingsttaus.CodingID     = codingstatusresponse.CodingID;
                        newincidentcodingsttaus.TrackStation = station.Station;
                        newincidentcodingsttaus.TrackStatus  = station.Status;
                        newincidentcodingsttaus.TrackUnit    = unitcallsign;
                        newincidentcodingsttaus.AckFrom      = "";
                        newincidentcodingsttaus.AckStatus    = "";
                        newincidentcodingsttaus.AckTimeStamp = String.Format("{0:g}", codingstatusresponse.AckTimeStamp);
                        newincidentcodingsttaus.AckNo        = codingstatusresponse.AckNo.ToString();
                        newincidentcodingsttaus.AckTotal     = codingstatusresponse.AckTotal.ToString();

                        _IncidentCodingStatusList.Add(newincidentcodingsttaus);
                    }
                }
            };

            _uiSyncContext.Post(callback, "update incident coding status responese");
        }
Exemplo n.º 3
0
        //Receive Ack from gateway and update according at the CAD
        public void UpdateCADIncidentAck(CADIncidentAck CADincidentack)
        {
            SendOrPostCallback callback =
                delegate(object state)
            {
                Log("Update CAD Incident Acknowledge from Gateway");
                //for each station in the tracking
                foreach (Tracking station in CADincidentack.AckTracking)
                {
                    //for each unit in the station
                    foreach (string unitcallsign in station.Unit)
                    {
                        IncidentCodingStatus newincidentcodingsttaus = new IncidentCodingStatus();
                        newincidentcodingsttaus.CodingID     = CADincidentack.CodingID;
                        newincidentcodingsttaus.TrackStation = station.Station;
                        newincidentcodingsttaus.TrackStatus  = station.Status;
                        newincidentcodingsttaus.TrackUnit    = unitcallsign;
                        newincidentcodingsttaus.AckFrom      = "";
                        newincidentcodingsttaus.AckStatus    = "";
                        newincidentcodingsttaus.AckTimeStamp = String.Format("{0:g}", CADincidentack.AckTimeStamp);
                        newincidentcodingsttaus.AckNo        = CADincidentack.AckNo.ToString();
                        newincidentcodingsttaus.AckTotal     = CADincidentack.AckTotal.ToString();

                        _IncidentCodingStatusList.Add(newincidentcodingsttaus);
                    }
                }
            };

            _uiSyncContext.Post(callback, "update CAD Incident Ack");
        }