public DateTime ProduceOperatorSettlement(ref int operatorId, int accountId, out string opName, out string opLName, out string frName, out string locName, out string locOwnerName, out DateTime stDate, out DateTime enDate, out CheckpointSlip[] cpArray, out TotalSettlementSection totSection) { throw new NotImplementedException(); }
private void ProduceSettlement(object sender, EventArgs e) { if (SelectedOperator == null) { return; } //produce settlement and reload page PrinterHandler.InitPrinter(true); if (StationRepository.PrinterStatus == 0) { ShowPrinterErrorMessage(); return; } int operatorID = SelectedOperator.id; //should be selected operator ID string opName = ""; string opLName = ""; string frName = ""; string locName = ""; string locOwnerName = ""; DateTime stDate; DateTime enDate; CheckpointSlip[] cpArray; TotalSettlementSection totSection = new TotalSettlementSection(); ProduceOperatorSettlementResponse opSett = new ProduceOperatorSettlementResponse(); try { WsdlRepository.ProduceOperatorSettlement(ref operatorID, (int)ChangeTracker.CurrentUser.AccountId, out opName, out opLName, out frName, out locName, out locOwnerName, out stDate, out enDate, out cpArray, out totSection); opSett.checkpoints = cpArray; opSett.currentDate = DateTime.Now; opSett.franchisorName = frName; opSett.locationName = locName; opSett.operatorFirstName = opName; opSett.operatorLastName = opLName; opSett.settlementPeriodEndDate = enDate; opSett.settlementPeriodStartDate = stDate; opSett.total = totSection; opSett.operatorId = operatorID; opSett.LocationOwnerName = locOwnerName; } catch (System.ServiceModel.FaultException <HubServiceException> ex) { System.ServiceModel.FaultException <HubServiceException> exep = (System.ServiceModel.FaultException <HubServiceException>)ex; ShowError(TranslationProvider.Translate(MultistringTags.TERMINAL_SETTLEMENT_NO_SHIFTS).ToString(), onLoadData, false); return; } WaitOverlayProvider.ShowWaitOverlay(); //print if (opSett.checkpoints != null) { bool isPrinted = PrinterHandler.PrintOperatorSettlementResponce(opSett); if (!isPrinted) { ShowPrinterErrorMessage(); } isPrinted = PrinterHandler.PrintOperatorSettlementResponce(opSett); if (!isPrinted) { ShowPrinterErrorMessage(); } } onLoadData(null, null); }