public void RunOper() { Thread.Sleep(3000); CreditCardAlohaIntegration.CreditCardOperationComplited(CreditCardOperationType.Payment, false, true, "Успешно", "Это тело слипа"); }
public static void GetSipCopy(int Num) { ArcusSlip S = GetSlip(Num); if (S == null) { //RunOperationAsincComplitedVoid("0", "Неверный номер слипа", "", ""); CreditCardAlohaIntegration.ShowMsg("Неверный номер слипа"); //PrintSlip(strslip); } else { string strslip = "Копия " + Environment.NewLine; foreach (string s in S.Slip) { if (s == "") { strslip += " " + Environment.NewLine; } else { strslip += s + Environment.NewLine; } } //RunOperationAsincComplitedVoid("0", "Успешно", "", strslip); PrintSlip(strslip); } }
// delegate void DoPaymentsOperDelegate(int PaymentsCount, Check Chk); static private void DoPaymentsOper(int PaymentsCount, Check Chk) { Utils.ToCardLog("DoPaymentsOper TenderType = " + PaymentsCount.ToString()); if (PaymentsCount == 1) { FCC.SetBill(); } else if (PaymentsCount == 2) { /* * if (iniFile.InPasEnabled) * { * DualConnector.DualConnectorMain.Sale(); * } * */ // else if (iniFile.Arcus2Enabled) if (CreditCardAlohaIntegration.CreditCardConnectorEnabled) { string err = ""; CreditCardAlohaIntegration.RunOper(Chk); //DualConnector.DualConnectorMain.Sale(); } } else if (PaymentsCount == 4) { AlohaTSClass.LogOut(); RemoteCloseCheck.AddRemoteChkToQuere(Chk.AlohaCheckNum, 30, Chk.Waiter, Chk.Summ); } GC.Collect(); Utils.ToCardLog("Exit from DoPaymentsOper TenderType = " + PaymentsCount.ToString()); GC.Collect(); }
private void btnCopySlip_Click(object sender, RoutedEventArgs e) { // DualConnector.DualConnectorMain.GetCopySlip(); CreditCardAlohaIntegration.GetSipCopy(); this.Close(); }
public string RunSVERKARepSinc(out string mReciept, out string mRes) { mRes = "000"; mReciept = "Сверка успешна"; CreditCardAlohaIntegration.CreditCardOperationComplited(CreditCardOperationType.Payment, false, true, "Успешно", "Это тело сверки"); return(""); }
private void RunOperationAsincComplitedVoid(string res, string resStr, string Response, string Receipt) { bool ShowError = false; if (res == "999") { resStr += Environment.NewLine + "Нет связи с терминалом пластиковых карт."; resStr += Environment.NewLine + "Проверьте соединение."; ShowError = true; } CreditCardAlohaIntegration.CreditCardOperationComplited(mOperType, ShowError, res == "000", resStr, Receipt); }
public void TestPinPad() { OperInProcess = true; SBRFSRV.Server SBSrv = new SBRFSRV.Server(); SBSrv.Clear(); int res = SBSrv.NFun(13); string ResStr = ""; if (res == 0) { ResStr = "Пинпад готов к работе"; } else { ResStr = "Ошибка соединения с пинпадом. Номер ошибки " + res.ToString(); } OperInProcess = false; Receipt = ""; CreditCardAlohaIntegration.CreditCardOperationComplited(CreditCardOperationType.TestPinPad, true, res == 0, ResStr, Receipt); }
public void RunXRepAsinc() { string s = Arcus2DataFromXML.PrintShortReport(); CreditCardAlohaIntegration.CreditCardOperationComplited(CreditCardOperationType.XReport, false, true, "", s); }
internal static void EOD() { try { Utils.ToLog("Закрытие дня"); //RunExport(); try { if ((iniFile.FRSEnabled) && (iniFile.FRSMaster)) { FRSClientApp.FRSClient.ZReport(AlohainiFile.BDate); } if (iniFile.TRPOSXEnables) { if (!TrPosXAlohaIntegrator.Sverka()) { FiskInfo fi = PDiscountCard.CloseCheck.ReadFiskInfo(); fi.NeedSverka = true; PDiscountCard.CloseCheck.WriteFiskInfo(fi); } else { PDiscountCard.CloseCheck.ZeroPlastNum(); FiskInfo fi = PDiscountCard.CloseCheck.ReadFiskInfo(); fi.NeedSverka = false; PDiscountCard.CloseCheck.WriteFiskInfo(fi); } } if (iniFile.ArcusEnabled) { if (!ArcusAlohaIntegrator.Sverka()) { FiskInfo fi = PDiscountCard.CloseCheck.ReadFiskInfo(); fi.NeedSverka = true; PDiscountCard.CloseCheck.WriteFiskInfo(fi); } else { PDiscountCard.CloseCheck.ZeroPlastNum(); FiskInfo fi = PDiscountCard.CloseCheck.ReadFiskInfo(); fi.NeedSverka = false; PDiscountCard.CloseCheck.WriteFiskInfo(fi); } } /* * if (iniFile.InPasEnabled) * { * DualConnector.DualConnectorMain.Sverka(); * } * */ if (CreditCardAlohaIntegration.CreditCardConnectorEnabled) { CreditCardAlohaIntegration.RunSverka(); } } catch (Exception ee) { Utils.ToLog(ee.Message); } do { Thread.CurrentThread.Join(3000); }while (MainClass.FiskalPrinterIsPrinting); string Status = ""; if (!iniFile.FRSEnabled) { Utils.ToLog("!iniFile.FRSEnabled"); if (iniFile.FiskalDriverNonShtrih) { Utils.ToLog("iniFile.FiskalDriverNonShtrih"); FiskalDrivers.FiskalDriver.PrintZReport(); Hamster.HamsterWorker.MoveHamster(); } else { if (!Shtrih2.ClosedSmenaInternal(out Status)) { //Shtrih2.ZReport(); ZReport(); } else { Utils.ToLog("Принтер с закрытой сменой. Status :" + Status); } } /* * if (iniFile.FiskalDriverNonShtrihAlohaReport) * { * * } * */ } /* * else * { * if (!Shtrih2.ClosedSmenaInternal(out Status)) * { * * RunFiskalChanger(); * } * else * { * Utils.ToLog("Принтер с закрытой сменой. Status :" + Status); * } * } */ Shtrih2.ExitFiskalThread(); } catch (Exception e) { Utils.ToLog(e.Message); } }
private void btnLongRep_Click(object sender, RoutedEventArgs e) { CreditCardAlohaIntegration.PrintLongReport(); this.Close(); }
private void btnShortRep_Click(object sender, RoutedEventArgs e) { //DualConnector.DualConnectorMain.ShortReport(); CreditCardAlohaIntegration.PrintShortReport(); this.Close(); }
private void btnCasirMenu_Click(object sender, RoutedEventArgs e) { CreditCardAlohaIntegration.ShowCassirMnu(); this.Close(); }
private void btnCheckLink_Click(object sender, RoutedEventArgs e) { //DualConnector.DualConnectorMain.CheckLink(); CreditCardAlohaIntegration.TestPinPad(); this.Close(); }
public void RunXRepAsinc() { CreditCardAlohaIntegration.CreditCardOperationComplited(CreditCardOperationType.Payment, false, true, "Успешно", "Это тело Х-отчета"); }
public void RunVozvrAsinc(decimal Summ) { Utils.ToCardLog("Emulator RunVozvrAsinc"); CreditCardAlohaIntegration.CreditCardOperationComplited(CreditCardOperationType.Payment, false, true, "Успешно", "Это тело слипа"); }
private void btnSverka_Click(object sender, RoutedEventArgs e) { //DualConnector.DualConnectorMain.Sverka(); CreditCardAlohaIntegration.RunSverka(); this.Close(); }
private void RunOper() { try { Utils.ToCardLog("Запуск RunOper OperType=" + mOperType.ToString() + " Amount= " + Amount.ToString()); OperInProcess = true; SBRFSRV.Server SBSrv = new SBRFSRV.Server(); SBSrv.Clear(); Int32 res = -1; if (mOperType == CreditCardOperationType.Payment) { SBSrv.SParam("Amount", Math.Abs(Amount).ToString()); res = SBSrv.NFun(4000); } else if (mOperType == CreditCardOperationType.VoidPayment) { SBSrv.SParam("Amount", Math.Abs(Amount).ToString()); res = SBSrv.NFun(4002); } else if (mOperType == CreditCardOperationType.Sverka) { res = SBSrv.NFun(6000); } else if (mOperType == CreditCardOperationType.XReport) { res = SBSrv.NFun(6002); } else if (mOperType == CreditCardOperationType.LongReport) { res = SBSrv.NFun(7000); } else if (mOperType == CreditCardOperationType.LastChk) { // SBSrv.SParam("PayInfo", "3"); res = SBSrv.NFun(7001); } Receipt = SBSrv.GParamString("Cheque"); if (Receipt == null) { Receipt = ""; } Receipt = AddCutToReceipt(Receipt); if (Receipt != "") { CreditCardAlohaIntegration.CreditCardOperationComplited(mOperType, false, res == 0, res.ToString(), Receipt); } else { CreditCardAlohaIntegration.CreditCardOperationComplited(mOperType, true, res == 0, "Код ошибки " + res.ToString(), Receipt); } SBSrv.Clear(); OperInProcess = false; Utils.ToCardLog("Отработал RunOper OperType=" + mOperType.ToString() + " Amount= " + Amount.ToString()); } catch (Exception e) { OperInProcess = false; resOper = "Ошибка программы. " + e.Message; RespCode = "-1"; CreditCardAlohaIntegration.CreditCardOperationComplited(mOperType, true, false, resOper, Receipt); Utils.ToCardLog("[Error] Запускa RunOper " + e.Message); } }
public void Custom(string Name) { try { Utils.ToLog("Custom " + Name); if (Name == "DeleteItemsAndCloseCheck") { Utils.ToCardLog("DeleteItemsAndCloseCheck"); AlohaEventVoids.DeleteItemsAndCloseCheck(); } if (Name == "PrintCheck") // else if (Name == "PlasticCopySlip") { if (iniFile.PrintPrecheckOnFR) { AlohaEventVoids.PrintCurentPrecheckOnFR(); } else { AlohaTSClass.PrintCurentPredcheck(); } return; //AlohaEventVoids.CloseCheck(); } if (Name == "CloseCheck") { AlohaEventVoids.CloseCheck(); } if (Name == "XReport") { Utils.ToCardLog("Custom XReport"); AlohaEventVoids.XReport(); } if (Name == "XReportHamster") { AlohaEventVoids.XReportHamster(); } if (Name == "ZReport") { AlohaEventVoids.ZReport(); } if (Name == "OrderItems") { AlohaEventVoids.OrderItems(); } if (Name == "ApplyPayment5000") { AlohaEventVoids.ApplyPayment(5000); } if (Name == "ShowReportSale") { AlohaEventVoids.ShowReportSale(); } if (Name == "ShowTotalSumm") { AlohaEventVoids.ShowTotalSumm(); //AlohaTSClass.GetSelectedItems(); //OrderDivider.OrderItems(); //OrderDivider.HideWindow(); } if (Name == "OrderItemsWithDivide") { OrderDivider.OrderItems(false); } if (Name == "OrderAllItemsWithDivide") { OrderDivider.OrderItems(true); } if (Name == "AddWaiterToCheck") { AlohaEventVoids.AddWaiterToCheck(); } if (Name == "Plastik") { if (iniFile.ArcusEnabled) { ArcusAlohaIntegrator.XReport(); } else if (iniFile.TRPOSXEnables) { TrPosXAlohaIntegrator.FoolReport(); } } if (Name == "PlastikXReport") { if (iniFile.ArcusEnabled) { ArcusAlohaIntegrator.PrintShortReport(); //AlohaEventVoids.TestPrintWithPause(); } else if (iniFile.TRPOSXEnables) { TrPosXAlohaIntegrator.XReport(); } else { AlohaTSClass.ShowMessage("Нет подключенных безналичных терминалов. TRPOSXEnables=0 и ArcusEnabled=0"); } } else if (Name == "PlasticSverka") { if (iniFile.ArcusEnabled) { ArcusAlohaIntegrator.SverkaWithQ(); } else { TrPosXAlohaIntegrator.SverkaWithQ(); } } else if (Name == "PlasticCopySlip") { if (iniFile.ArcusEnabled) { ArcusAlohaIntegrator.GetSipCopy(); } else if (iniFile.TRPOSXEnables) { TrPosXAlohaIntegrator.GetSlipCopy(); } else { AlohaTSClass.ShowMessage("Нет подключенных безналичных терминалов. TRPOSXEnables=0 и ArcusEnabled=0 "); } } else if (Name == "ShowStopList") { // AlohaEventVoids.ShowStopListReason(); AlohaEventVoids.ShowStopList(); } else if (Name == "ShowStopListReason") { AlohaEventVoids.ShowStopListReason(); } else if (Name == "Degustations") { AlohaEventVoids.Degustations(); } if (Name == "Payment") { DisplayBoardClass.ApplyPaymentEvent(); } if (Name == "ShowfrmCard") { AlohaEventVoids.ShowfrmCard(); } if (Name == "ShowfrmModifItem") { AlohaEventVoids.ShowfrmModifItem(); } if (Name.Length > 5) { if (Name.Substring(0, 5) == "Scale") { AlohaEventVoids.AddScaleDish2(Name); } } if (Name == "VIP") { AlohaEventVoids.SetVip(); } if (Name == "FCCShowAdmin") { FCC.ShowAdmin(); } if (Name == "FCCSetBill") { FCC.SetBill(); } if (Name == "FCCSetBillWithHands") { //FCC.SetBillWithHands(); } if (Name == "FCCShowCassir") { FCC.ShowCassirFrm(); } if (Name == "FCCInspectSmallChange") { FCC.InpectSmallChange(true); } if (Name == "ShowCashIncome") { AlohaEventVoids.ShowFrmCashIn(); } if (Name == "FCCShowRazmen") { FCC.ShowRazmen(); // DualConnector.DualConnectorMain.InFuncsfrm(); } if (Name == "CloseByWaiter") { AlohaEventVoids.CloseByWaiter(); } if (Name == "CloseByWaiterCard") { AlohaEventVoids.CloseByWaiter(2); } if (Name == "CloseByWaiterGlory") { if (!AlohaTSClass.IsAlohaTS() && !iniFile.FCCEnable) { Utils.ToLog("CloseByWaiterGlory && (!AlohaTSClass.IsAlohaTS() && !iniFile.FCCEnable)"); AlohaEventVoids.CloseCheck(); } else { AlohaEventVoids.CloseByWaiter(1); } } /* * * if (Name == "InPasShortReport") * { * DualConnector.DualConnectorMain.ShortReport(); * } * if (Name == "InPasFullReport") * { * DualConnector.DualConnectorMain.LongReport(); * } * if (Name == "InPasSverka") * { * DualConnector.DualConnectorMain.Sverka(); * } * * if (Name == "InPasLastChk") * { * DualConnector.DualConnectorMain.GetCopyLastSlip(); * } * * if (Name == "InPasAnyChk") * { * DualConnector.DualConnectorMain.GetCopySlip(); * } * */ if ((Name == "InPasFuncsfrm") || ((Name == "PlasticFuncsfrm"))) { /* * if (iniFile.InPasEnabled) * { * DualConnector.DualConnectorMain.InPasFuncsfrm(); * } * else * */ { CreditCardAlohaIntegration.ShowFuncsfrm(); } } if (Name == "WestReport0") { West.WestMain.ShowSaleReport(0); } if (Name == "WestReport1") { West.WestMain.ShowSaleReport(1); } if (Name == "WestPager") { West.WestMain.mShowPagerDialog(); } if (Name == "BonusCardReport") { Loyalty.LoyaltyBasik.PrintLongSlipReport(); } if (Name == "EGAISScan") { EGAIS.EGAISCodeReader.Read(); } if (Name == "ReprintCheck") { FRSClientApp.FRSClient.PrintFCheckShowWnd(); } if (Name == "FayRetailCard") { FayRetail.FayRetailMain.ShowWndApplyCardWithCurentCheck(); } if (Name == "PBFirstRequest") { MB.PB.SendCurentChk(); } } catch (Exception e) { Utils.ToCardLog("[Error] Custom " + Name + ", Mess: " + e.Message); } /* * else if (Name == "PlastikVozvrat") * { * TrPosXClass.Void(100) ; * } * */ }