private void Btn_print_Click(object sender, RoutedEventArgs e) {//print try { if (sender != null) { SectionData.StartAwait(grid_main); } List <ItemTransferInvoice> query = new List <ItemTransferInvoice>(); #region BuildReport(); LocalReportExtensions.PrintToPrinterbyNameAndCopy(rep, MainWindow.rep_printer_name, short.Parse(MainWindow.rep_print_count)); #endregion if (sender != null) { SectionData.EndAwait(grid_main); } } catch (Exception ex) { if (sender != null) { SectionData.EndAwait(grid_main); } SectionData.ExceptionMessage(ex, this); } }
private async void Btn_print_Click(object sender, RoutedEventArgs e) {//print try { HelpClass.StartAwait(grid_main); #region if (packuser.packageUserId <= 0) { //no book saved Toaster.ShowWarning(Window.GetWindow(this), message: "You have to book first", animation: ToasterAnimation.FadeIn); } else { result = await BuildReport(); if (result == "0") { // not payed yet Toaster.ShowWarning(Window.GetWindow(this), message: "The customer must pay first", animation: ToasterAnimation.FadeIn); } else { LocalReportExtensions.PrintToPrinterbyNameAndCopy(rep, FillCombo.getdefaultPrinters(), FillCombo.rep_print_count == null ? short.Parse("1") : short.Parse(FillCombo.rep_print_count)); } } #endregion HelpClass.EndAwait(grid_main); } catch (Exception ex) { HelpClass.EndAwait(grid_main); HelpClass.ExceptionMessage(ex, this); } }
private void Btn_print_Click(object sender, RoutedEventArgs e) {//print try { if (sender != null) { SectionData.StartAwait(grid_main); } if (MainWindow.groupObject.HasPermissionAction(reportsPermission, MainWindow.groupObjects, "one") || SectionData.isAdminPermision()) { #region if (invItemsQuery != null) { List <ReportParameter> paramarr = new List <ReportParameter>(); string addpath; bool isArabic = ReportCls.checkLang(); if (isArabic) { addpath = @"\Reports\Store\Ar\ArDestroyReport.rdlc"; } else { addpath = @"\Reports\Store\EN\DestroyReport.rdlc"; } string reppath = reportclass.PathUp(Directory.GetCurrentDirectory(), 2, addpath); ReportCls.checkLang(); clsReports.invItem(invItemsQuery, rep, reppath, paramarr); clsReports.setReportLanguage(paramarr); clsReports.Header(paramarr); rep.SetParameters(paramarr); rep.Refresh(); LocalReportExtensions.PrintToPrinterbyNameAndCopy(rep, MainWindow.rep_printer_name, short.Parse(MainWindow.rep_print_count)); } #endregion } else { Toaster.ShowInfo(Window.GetWindow(this), message: MainWindow.resourcemanager.GetString("trdontHavePermission"), animation: ToasterAnimation.FadeIn); } if (sender != null) { SectionData.EndAwait(grid_main); } } catch (Exception ex) { if (sender != null) { SectionData.EndAwait(grid_main); } SectionData.ExceptionMessage(ex, this); } }
private void printInventory() { BuildReport(); this.Dispatcher.Invoke(() => { LocalReportExtensions.PrintToPrinterbyNameAndCopy(rep, MainWindow.rep_printer_name, short.Parse(MainWindow.rep_print_count)); }); }
private void Btn_print_Click(object sender, RoutedEventArgs e) {//print try { HelpClass.StartAwait(grid_main); #region BuildReport(); LocalReportExtensions.PrintToPrinterbyNameAndCopy(rep, FillCombo.getdefaultPrinters(), FillCombo.rep_print_count == null ? short.Parse("1") : short.Parse(FillCombo.rep_print_count)); #endregion HelpClass.EndAwait(grid_main); } catch (Exception ex) { HelpClass.EndAwait(grid_main); HelpClass.ExceptionMessage(ex, this); } }
private async void printRowinDatagrid(object sender, RoutedEventArgs e) { try { if (sender != null) { SectionData.StartAwait(grid_main); } for (var vis = sender as Visual; vis != null; vis = VisualTreeHelper.GetParent(vis) as Visual) { if (vis is DataGridRow) { POSOpenCloseModel row = (POSOpenCloseModel)dgClosing.SelectedItems[0]; cashTransID = row.cashTransId; openCashTransID = row.openCashTransId.Value; await getopquery(row); if (opquery.Count() == 0) { Toaster.ShowWarning(Window.GetWindow(this), message: MainWindow.resourcemanager.GetString("trNoChange"), animation: ToasterAnimation.FadeIn); } else { BuildOperationReport(); LocalReportExtensions.PrintToPrinterbyNameAndCopy(rep, MainWindow.rep_printer_name, short.Parse(MainWindow.rep_print_count)); } } } if (sender != null) { SectionData.EndAwait(grid_main); } } catch (Exception ex) { if (sender != null) { SectionData.EndAwait(grid_main); } SectionData.ExceptionMessage(ex, this); } }
private void Btn_print_Click(object sender, RoutedEventArgs e) {//print try { if (sender != null) { SectionData.StartAwait(grid_main); } if (MainWindow.groupObject.HasPermissionAction(reportsPermission, MainWindow.groupObjects, "one") || SectionData.isAdminPermision()) { #region if (itemLocationListQuery != null) { BuildReport(); LocalReportExtensions.PrintToPrinterbyNameAndCopy(rep, MainWindow.rep_printer_name, short.Parse(MainWindow.rep_print_count)); } #endregion } else { Toaster.ShowInfo(Window.GetWindow(this), message: MainWindow.resourcemanager.GetString("trdontHavePermission"), animation: ToasterAnimation.FadeIn); } if (sender != null) { SectionData.EndAwait(grid_main); } } catch (Exception ex) { if (sender != null) { SectionData.EndAwait(grid_main); } SectionData.ExceptionMessage(ex, this); } }