private void fastBarcodes_DoubleClick(object sender, EventArgs e) { try { FastObjectListView fastBarcodes = sender as FastObjectListView; if (fastBarcodes.SelectedObject != null) { BarcodeDTO barcodeDTO = fastBarcodes.SelectedObject as BarcodeDTO; if (barcodeDTO != null) { if (true) { WebapiGettsa webapiGettsa = new WebapiGettsa(barcodeDTO.Label); webapiGettsa.ShowDialog(); webapiGettsa.Dispose(); } else { PrintViewModel printViewModel = new PrintViewModel(); printViewModel.ReportPath = "SearchBarcode"; printViewModel.ReportParameters.Add(new Microsoft.Reporting.WinForms.ReportParameter("Barcode", barcodeDTO.Code)); SsrsViewer ssrsViewer = new SsrsViewer(printViewModel); ssrsViewer.Show(); } } } } catch (Exception exception) { ExceptionHandlers.ShowExceptionMessageBox(this, exception); } }
private void pictureTesaLabel_Click(object sender, EventArgs e) { try { if (this.fastBarcodes.SelectedObject != null) { BarcodeDTO barcodeDTO = this.fastBarcodes.SelectedObject as BarcodeDTO; if (barcodeDTO != null) { WebapiGettsa webapiGettsa = new WebapiGettsa(barcodeDTO.Label); webapiGettsa.ShowDialog(); webapiGettsa.Dispose(); } } } catch (Exception exception) { ExceptionHandlers.ShowExceptionMessageBox(this, exception); } }