Example #1
0
 public JsonResult AcceptSOS(long sosId, long hospitalId)
 {
     try
     {
         List <long> contributers   = new List <long>();
         int         numberOfPlaces = 5;
         string      location       = sosBusinessLayer.GetSOS(sosId).Location.ToString();
         sosBusinessLayer.AcceptSOS(sosId, hospitalId);
         contributers = (sosBusinessLayer.GetContributersOfSOSsServices(location, numberOfPlaces)).Select(s => s.Id).ToList();
         NotificationsHub.HideSOSNotification(contributers);
         return(Json("SOS is Accepted"));
     }
     catch (Exception e)
     {
         return(Json(e.Message));
     }
 }