public static void ReprintFChk(Guid CheckId) { try { FRSSrv.RemoteDataClient FClient = GetFRSClient(); if (FClient != null) { FRSSrv.AddCheckResponce Resp = FClient.PrintCheck(CheckId); if (Resp.Check.Sucсess) { Utils.ToCardLog("ReprintFChk ExtNum " + Resp.Check.ExtNum + " ReprintFChk"); // if (iniFile.FRSPrintCheck) { PrintOnWinPrinter.PrintDoc2(new PrintDocArgs() { FStrs = FiscalCheckCreator.GetFisckalCheckVisual(Resp), QRAsStr = Resp.Check.FROutData.QRAsStr }); } } try { if (Resp.ParentCheck != null) { if (Resp.ParentCheck.Sucсess) { Utils.ToCardLog("ReprintFChk Parent ExtNum " + Resp.Check.ExtNum + " ReprintFChk"); // if (iniFile.FRSPrintCheck) { PrintOnWinPrinter.PrintDoc2(new PrintDocArgs() { FStrs = FiscalCheckCreator.GetFisckalCheckVisual(Resp, true), QRAsStr = Resp.ParentCheck.FROutData.QRAsStr }); } } } } catch (Exception ee) { Utils.ToCardLog("Error SendChk ParentCheck" + ee.Message); } FClient.Close(); } } catch (Exception e) { Utils.ToCardLog("Error SendChk " + e.Message); } }
private static FRSSrv.AddCheckResponce SendChk(FRSSrv.FiskalCheck Chk) { try { long Mbefore = GC.GetTotalMemory(false); Utils.ToCardLog("SendChk memory " + Mbefore); FRSSrv.AddCheckResponce Resp = new AddCheckResponce(); FRSSrv.RemoteDataClient FClient = GetFRSClient(); if (FClient != null) { FRSSrv.AddCheckRequest Request = new FRSSrv.AddCheckRequest() { Id = new Guid(), Check = Chk }; Resp = FClient.AddCheck(Request); if (Resp.Check.Sucсess) { Utils.ToCardLog("SendChk ExtNum " + Chk.ExtNum + " ClosedSucsees"); if ((iniFile.FRSPrintCheck) && (!Resp.Check.WrongChk)) { PrintOnWinPrinter.PrintDoc2(new PrintDocArgs() { FStrs = FiscalCheckCreator.GetFisckalCheckVisual(Resp), QRAsStr = Resp.Check.FROutData.QRAsStr }); } } FClient.InnerChannel.Close(); FClient.InnerChannel.Dispose(); FClient.Close(); long MAfter = GC.GetTotalMemory(false); Utils.ToCardLog("SendChk memory " + MAfter); } return(Resp); } catch (Exception e) { Utils.ToCardLog("Error SendChk " + e.Message); return(null); } //System.Windows.Forms.MessageBox.Show(Resp.Check.FD+" "+Resp.Check.FP); }