public async Task<AddAlertResponse> AddAlertNoPhoto(AddAlertContextModel model) { AddAlertResponse response = new AddAlertResponse(); try { string error = null; if (model.IsValid(out error)) { response.IdAlert = _caseModule.AddAlert(model); } else response.Error = error; } catch (Exception ex) { response.Error = _loggerService.GetClientException(ex); _loggerService.LogException("AddAlertNoPhoto", ex, model); } return response; }
public async Task<AddAlertResponse> AddAlert() { AddAlertContextModel model = new AddAlertContextModel(); AddAlertResponse response = new AddAlertResponse(); try { string error = await ProcessMultipartForm(model); if (string.IsNullOrWhiteSpace(error)) { response.IdAlert = _caseModule.AddAlert(model); } else response.Error = error; } catch (Exception ex) { _loggerService.LogException("AddAlert", ex, model); response.Error = _loggerService.GetClientException(ex); } return response; }