private void CheckSuccessfulUpload(FileUploadResponse rspObject) { if (!rspObject.success) { if (rspObject.validators == null) throw new Exception("An error has been encountered on the server. \n" + rspObject.error); var validationErrorMessage = string.Join(Environment.NewLine, rspObject.validators); throw new Exception(validationErrorMessage); } if (string.IsNullOrWhiteSpace(rspObject.redirectTo)) throw new Exception("Something's wrong. Response is empty!"); }
public ResponseForm(FileUploadResponse response) { InitializeComponent(); txtUrl.Text = response.redirectTo; btnSaveQrCode.Enabled = false; btnSaveQrCode.Click += btnSaveQrCode_Click; imgQr.LoadCompleted += imgQr_LoadCompleted; imgQr.LoadAsync(response.qrUrl); Response = response; }
private void CheckSuccessfulUpload(FileUploadResponse rspObject) { if (!rspObject.success) { if (rspObject.validators == null) { throw new Exception("An error has been encountered on the server. \n" + rspObject.error); } var validationErrorMessage = string.Join(Environment.NewLine, rspObject.validators); throw new Exception(validationErrorMessage); } if (string.IsNullOrWhiteSpace(rspObject.redirectTo)) { throw new Exception("Something's wrong. Response is empty!"); } }