Exemple #1
0
        public ActionResult ViewAlert(string alertID)
        {
            Guid        id    = new Guid(alertID);
            alertReturn alert = null;

            alert = truckService.getAllAlertByID(new Guid(alertID));

            return(Json(alert, JsonRequestBehavior.AllowGet));
        }
Exemple #2
0
        public ActionResult GetAlertHistory(string alertID, string vehicleID)
        {
            AlertHistory AH    = new AlertHistory();
            alertReturn  alert = truckService.getAllAlertByID(new Guid(alertID));

            alert.alertStart = alert.alertStart.AddMinutes(-2);
            alert.alertEnd   = alert.alertEnd.ToString() != "1/1/2001 12:00:00 AM" ? alert.alertEnd.AddMinutes(2) : alert.alertStart.AddMinutes(5);
            AH.Alert         = alert;

            AH.Locations = truckService.getGPSTracking(vehicleID, alert.alertStart.ToString(), alert.alertEnd.ToString());

            return(Json(AH, JsonRequestBehavior.AllowGet));
        }