private void PleaseWaitPrintAccountReceipt(string type) { PrinterHandler.InitPrinter(true); if (StationRepository.PrinterStatus == 0) { ShowPrinterErrorMessage(type); return; } //get data for report AccountingRecieptWS accReciept; if (type == "location") { accReciept = WsdlRepository.GetAccountingRecieptData(StartDate, EndDate, StationRepository.StationNumber, StationRepository.LocationID); } else { accReciept = WsdlRepository.GetAccountingRecieptData(StartDate, EndDate, StationRepository.StationNumber, null); } if (accReciept != null) { bool result = PrinterHandler.PrintAccountReceipt(type, accReciept, StartDate, EndDate); if (!result) { ShowPrinterErrorMessage(type); } } }