private void SaveNotificationResult(bool result, bool isApprove, SupervisorNotificationDTO req) { if (result) { SupervisorNotificationDTO.Status = isApprove ? SupervisorNotificationStatus.Approved : SupervisorNotificationStatus.Rejected; if (isApprove) { //string plateDetails = req.DangerousViolatorDetails.PlateNumber + "," + req.DangerousViolatorDetails.PlateKind + "," + req.DangerousViolatorDetails.PlateAuthority + "," + req.DangerousViolatorDetails.PlateColor; //var wantedCar = client.AddWantedCarEventAsync(plateDetails, SupervisorNotificationDTO.NotificationTime, Utility.GetLang(), businessRuleName, req.DangerousViolatorDetails.BusinessRuleId.ToString()); var wantedCar = client.AddWantedCarEventManualyAsync(req.DangerousViolatorDetails.PlateNumber, req.DangerousViolatorDetails.PlateKind, req.DangerousViolatorDetails.PlateAuthority, req.DangerousViolatorDetails.PlateColor, req.NotificationTime, Utility.GetLang(), businessRuleName, req.DangerousViolatorDetails.BusinessRuleId.ToString(), Convert.ToDouble(req.DangerousViolatorDetails.Lat), Convert.ToDouble(req.DangerousViolatorDetails.Lon)); wantedCar.ContinueWith(x => WantedCarResult(x.Status, x.IsCompleted)); } } else { SupervisorNotificationDTO.Status = SupervisorNotificationStatus.Pending; } var handler = NotificationHandled; if (handler != null) { handler(this, new EventArgs()); } }