コード例 #1
0
 public string RunSVERKARepSinc(out string mReciept, out string mRes)
 {
     Amount    = 0;
     mOperType = CreditCardOperationType.Sverka;
     Sinc      = true;
     RunOper();
     Sinc     = false;
     mReciept = Receipt;
     mRes     = resOper;
     return(RespCode);
 }
コード例 #2
0
 public void RunDetaleRepAsinc()
 {
     Amount   = 0;
     OperType = 6;
     if (!OperInProcess)
     {
         OperInProcess = true;
         mOperType     = CreditCardOperationType.LongReport;
         Thread TrPosXThread = new Thread(RunOper);
         TrPosXThread.Name = "Поток для RunOper";
         TrPosXThread.Start();
     }
 }
コード例 #3
0
 public void RunGetSlipCopyAsinc()
 {
     Amount   = 0;
     OperType = Arcus3Wrapper.ArcusOp.SlipCopy;
     if (!OperInProcess)
     {
         mOperType     = CreditCardOperationType.Sverka;
         OperInProcess = true;
         Thread TrPosXThread = new Thread(RunOper);
         TrPosXThread.Name = "Поток для RunOper";
         TrPosXThread.Start();
     }
 }
コード例 #4
0
        private void RunOperationAsincComplitedVoid(Arcus3Wrapper.ArcusOp OperType, string respCode, string resStr, string receipt)
        {
            Utils.ToCardLog(String.Format("[RunOper] RunOperationAsincComplitedVoid " + OperType.ToString() + "; RespCode=" + respCode));

            int respCodeInt = 0;
            var tryParseRes = int.TryParse(respCode, out respCodeInt);

            Utils.ToCardLog("tryParseRes " + tryParseRes + " respCodeInt: " + respCodeInt);

            bool ShowError = false;

            if (OperType == Arcus3Wrapper.ArcusOp.XReportShort)
            {
                mOperType = CreditCardOperationType.XReport;
            }
            else if (OperType == Arcus3Wrapper.ArcusOp.ZReport)
            {
                mOperType = CreditCardOperationType.Sverka;
            }
            else if (OperType == Arcus3Wrapper.ArcusOp.XReportFull)
            {
                mOperType = CreditCardOperationType.LongReport;
            }
            else if (OperType == Arcus3Wrapper.ArcusOp.Pay)
            {
                mOperType = CreditCardOperationType.Payment;
            }
            else if (OperType == Arcus3Wrapper.ArcusOp.Cancel)
            {
                mOperType = CreditCardOperationType.VoidPayment;
            }
            else if (OperType == Arcus3Wrapper.ArcusOp.Refund)
            {
                mOperType = CreditCardOperationType.VoidPayment;
            }
            bool res = false;

            if (respCode == "999")
            {
                resStr   += Environment.NewLine + "Нет связи с терминалом пластиковых карт.";
                resStr   += Environment.NewLine + "Проверьте соединение.";
                ShowError = true;
            }
            else
            {
                res = (respCodeInt == 0) && (!receipt.ToUpper().Contains("НЕ ОПЛАЧИВАТЬ"));
            }
            CreditCardAlohaIntegration.CreditCardOperationComplited(mOperType, ShowError, res, resStr, receipt);
        }
コード例 #5
0
        public void RunVozvrAsinc(decimal Summ)
        {
            operType = CreditCardOperationType.VoidPayment;
            frmInpasVoid fv = new frmInpasVoid();

            fv.ShowDialog();
            if (fv.Res == 1)
            {
                RunOper(29, Summ, CommandMode2: 22, RRN: fv.RRN);
            }
            else if (fv.Res == 2)
            {
                // RunOper(4, Summ, CommandMode2: 22, RRN: fv.RRN);
                RunOper(4, Summ, RRN: fv.RRN);
            }
        }
コード例 #6
0
 public void RunLastChkAsinc()
 {
     Amount    = 0;
     mOperType = CreditCardOperationType.LastChk;
     if (!OperInProcess)
     {
         Utils.ToCardLog("SBRF Запускаю поток для  RunOper");
         OperInProcess = true;
         Thread TrPosXThread = new Thread(RunOper);
         TrPosXThread.Name = "Поток для RunOper";
         TrPosXThread.Start();
     }
     else
     {
         RunOperationAsincComplitedVoid("-2", "Поток для  RunOper уже запущен. Выхожу. ", "", "");
         Utils.ToCardLog("SBRF Поток для  RunOper уже запущен. Выхожу.");
     }
 }
コード例 #7
0
 public void RunVozvrAsinc(decimal Summ)
 {
     Amount    = (int)Summ;
     mOperType = CreditCardOperationType.VoidPayment;
     if (!OperInProcess)
     {
         Utils.ToCardLog("SBRF Запускаю поток для  RunOper");
         OperInProcess = true;
         Thread TrPosXThread = new Thread(RunOper);
         TrPosXThread.Name = "Поток для RunOper";
         TrPosXThread.Start();
     }
     else
     {
         RunOperationAsincComplitedVoid("-2", "Поток для  RunOper уже запущен. Выхожу. ", "", "");
         Utils.ToCardLog("SBRF Поток для  RunOper уже запущен. Выхожу.");
     }
 }
コード例 #8
0
        private void RunOperationAsincComplitedVoid(int OperType, string res, string resStr, string Response, string Receipt)
        {
            bool ShowError = false;

            if (OperType == 6)
            {
                mOperType = CreditCardOperationType.XReport;
            }
            else if (OperType == 7)
            {
                mOperType = CreditCardOperationType.Sverka;
            }
            if (res == "999")
            {
                resStr   += Environment.NewLine + "Нет связи с терминалом пластиковых карт.";
                resStr   += Environment.NewLine + "Проверьте соединение.";
                ShowError = true;
            }

            CreditCardAlohaIntegration.CreditCardOperationComplited(mOperType, ShowError, res == "000", resStr, Receipt);
        }
コード例 #9
0
        static public void CreditCardOperationComplited(CreditCardOperationType OperType, bool ShowError, bool res, string resStr, string Receipt)
        {
            Utils.ToCardLog(String.Format("CreditCardOperationComplited Receipt: {0}, res: {1},  resStr: {2}", Receipt, res, resStr));
            try
            {
                if (ShowError)
                {
                    HideLockScreen();
                    ShowMsg(resStr);
                }
                if ((!String.IsNullOrWhiteSpace(Receipt)) && (Receipt.Trim() != ""))
                {
                    if ((iniFile.Arcus2PrintSlip) || ((iniFile.PlastikPrintSlip)))
                    {
                        /*
                         * try
                         * {
                         *  using (StreamWriter sw = new StreamWriter(@"C:\aloha\check\discount\tmp\check\bugs\" + Guid.NewGuid().ToString() + ".txt"))
                         *  {
                         *      sw.Write(Receipt);
                         *      sw.Close();
                         *  }
                         * }
                         * catch
                         * { }
                         */
                        PrintSlip(Receipt);
                    }
                }

                if (OperType == CreditCardOperationType.Payment || OperType == CreditCardOperationType.VoidPayment)
                {
                    if (res)
                    {
                        if (currentCheck.AllInTable)
                        {
                            foreach (InpasChk Chk in currentCheck.AllChks)
                            {
                                if ((iniFile.Arcus2PlasticLocalClose) || ((iniFile.PlasticLocalClose)))
                                {
                                    RemoteCloseCheck.CloseAlohaTableLocalCurentUser(Chk.AlohaId, 20, (decimal)Chk.Ammount);
                                }
                                else
                                {
                                    RemoteCloseCheck.AddRemoteChkToQuere(Chk.AlohaId, 20, Chk.CurrentEmpl, (decimal)Chk.Ammount / 100);
                                }
                            }
                            if ((iniFile.Arcus2PlasticLocalClose) || ((iniFile.PlasticLocalClose)))
                            {
                                AlohaTSClass.OpenEmptyCheck();
                            }
                        }
                        else
                        {
                            if ((iniFile.Arcus2PlasticLocalClose) || ((iniFile.PlasticLocalClose)))
                            {
                                RemoteCloseCheck.CloseAlohaTableLocalCurentUser(currentCheck.AlohaId, 20, Sum);
                                if (iniFile.CreditCardAutoOpenCheck)
                                {
                                    AlohaTSClass.OpenEmptyCheck();
                                }
                            }
                            else
                            {
                                RemoteCloseCheck.AddRemoteChkToQuere(currentCheck.AlohaId, 20, currentCheck.CurrentEmpl, Sum / 100);
                            }
                        }
                    }
                }
                HideLockScreen();
            }
            catch (Exception e)
            {
                Utils.ToCardLog("Error CreditCardOperationComplited " + e.Message);
            }
        }
コード例 #10
0
 public void RunLastChkAsinc()
 {
     operType = CreditCardOperationType.LastChk;
     RunOper(63, 0, CommandMode: 1, CommandMode2: 22);
 }
コード例 #11
0
 public void RunDetaleRepAsinc()
 {
     operType = CreditCardOperationType.LongReport;
     RunOper(63, 0, CommandMode2: 21);
 }
コード例 #12
0
 public void RunXRepAsinc()
 {
     operType = CreditCardOperationType.XReport;
     RunOper(63, 0, CommandMode2: 20);
 }
コード例 #13
0
 public void RunPaymentAsinc(decimal Summ, Check AlohaChk)
 {
     operType = CreditCardOperationType.Payment;
     RunOper(1, Summ);
 }