Beispiel #1
0
 static private void CreateTrPosXMessageForm()
 {
     TrPosXMessageForm = new FTrposxRunComplited();
     TrPosXMessageForm.button1.Visible = false;
     TrPosXMessageForm.button2.Visible = false;
     TrPosXMessageForm.button3.Visible = false;
     TrPosXMessageForm.Init("Операция на безналичном терминале", "");
     TrPosXMessageForm.button1.Click += new EventHandler(button1_Click);
     TrPosXMessageForm.button2.Click += new EventHandler(button2_Click);
     TrPosXMessageForm.TopMost        = true;
     TrPosXMessageForm.Show();
 }
Beispiel #2
0
 public static void GetSipCopy(int Num)
 {
     TrPosXMessageForm = new FTrposxRunComplited();
     TrPosXMessageForm.button1.Visible = false;
     TrPosXMessageForm.button2.Visible = false;
     TrPosXMessageForm.button3.Visible = false;
     TrPosXMessageForm.Init("Печать копии слипа с терминала пластиковых карт.", "");
     TrPosXMessageForm.button1.Click += new EventHandler(button1_Click);
     TrPosXMessageForm.button2.Click += new EventHandler(button2_Click);
     TrPosXMessageForm.TopMost        = true;
     TrPosXMessageForm.Show();
     ArcusClass.GetSipCopy(Num);
 }
Beispiel #3
0
 static public bool XReport()
 {
     //    TrPosXClass.ShowScreenEvent += new TrPosXClass.ShowScreenDelegate(TrPosXClass_ShowScreenEvent);
     TrPosXMessageForm = new FTrposxRunComplited();
     TrPosXMessageForm.button1.Visible = false;
     TrPosXMessageForm.button2.Visible = false;
     TrPosXMessageForm.button3.Visible = false;
     TrPosXMessageForm.Init("Печать отчета с терминала пластиковых карт.", "");
     TrPosXMessageForm.button1.Click += new EventHandler(button1_Click);
     TrPosXMessageForm.button2.Click += new EventHandler(button2_Click);
     TrPosXMessageForm.TopMost        = true;
     TrPosXMessageForm.Show();
     TrPosXClass.RunXReportAsinc();
     return(true);
 }
Beispiel #4
0
        internal static string GetJRNCheck(int num, bool CheckToVoid)
        {
            IsGetJRNCheckToVoid = CheckToVoid;

            string inStr = "MessageID=JRN" + Environment.NewLine +
                           "ECRReceiptNumber=" + num.ToString().PadLeft(10, "0"[0]) + Environment.NewLine +
                           //  "ECRNumber=" + MainClass.IsWiFi + Environment.NewLine +
                           "ECRNumber=1" + Environment.NewLine +
                           "Flags=802020" + Environment.NewLine;
            int outLen = 0;
            int rcpLen = 0;

            try
            {
                /*
                 * int res = mTRPOSXLib.Process(inStr, out outLen, out rcpLen);
                 * string Response = mTRPOSXLib.GetResponse(0, outLen);
                 * string Rcp = mTRPOSXLib.GetReceipt(0, rcpLen);
                 */
                TrPosXMessageForm = new FTrposxRunComplited();
                Button1State      = 0;
                TrPosXMessageForm.button2.Text    = "Свернуть";
                TrPosXMessageForm.button1.Visible = false;
                TrPosXMessageForm.button2.Visible = true;
                TrPosXMessageForm.button3.Visible = false;
                TrPosXMessageForm.Init("Поиск чека № " + num.ToString() + ".", "");
                TrPosXMessageForm.button1.Click += new EventHandler(button1_Click);
                TrPosXMessageForm.button2.Click += new EventHandler(button2_Click);

                IsGetJRNCheck = true;

                TrPosXClass.RunOperationAsinc(inStr);
                TrPosXMessageForm.TopMost = true;
                TrPosXMessageForm.Show();
            }
            catch
            {
            }

            return("");
        }
Beispiel #5
0
 static public bool XReport()
 {
     if (MainClass.PlastikActivateResult.Result)
     {
         TrPosXMessageForm = new FTrposxRunComplited();
         TrPosXMessageForm.button1.Visible = false;
         TrPosXMessageForm.button2.Visible = false;
         TrPosXMessageForm.button3.Visible = false;
         TrPosXMessageForm.Init("Печать отчета с терминала пластиковых карт.", "");
         TrPosXMessageForm.button1.Click += new EventHandler(button1_Click);
         TrPosXMessageForm.button2.Click += new EventHandler(button2_Click);
         TrPosXMessageForm.TopMost        = true;
         TrPosXMessageForm.Show();
         ArcusClass.RunXRepAsinc();
         return(true);
     }
     else
     {
         AlohaTSClass.ShowMessage(MainClass.PlastikActivateResult.Comment);
         return(false);
     }
 }
Beispiel #6
0
        static public bool Sverka()
        {
            Utils.ToLog("Запуск сверки для Аркуса");

            /*
             *
             * */
            string Rec     = "";
            string ResOper = "";
            string i       = ArcusClass.RunSVERKARepSinc(out Rec, out ResOper);

            PrintSlip(Rec);
            int resWin = 0;

            while ((i != "00") && (i != "000") && (resWin == 0))
            {
                Button1State      = 3;
                TrPosXMessageForm = new FTrposxRunComplited();
                TrPosXMessageForm.button1.Visible = true;
                TrPosXMessageForm.button2.Visible = false;
                TrPosXMessageForm.button3.Visible = true;
                TrPosXMessageForm.Init("Печать сверки с терминала пластиковых карт.", "Неудачный результат сверки. " + Environment.NewLine + ResOper);
                TrPosXMessageForm.button1.Text   = "Повторить сверку";
                TrPosXMessageForm.button1.Click += new EventHandler(button1_Click);
                TrPosXMessageForm.button3.Text   = "Закрыть";
                TrPosXMessageForm.button3.Click += new EventHandler(button3_Click);

                TrPosXMessageForm.TopMost = true;
                TrPosXMessageForm.ShowDialog();
                resWin       = Convert.ToInt32(TrPosXMessageForm.Cancel);
                Button1State = 1;
                if (resWin == 0)
                {
                    i = ArcusClass.RunSVERKARepSinc(out Rec, out ResOper);
                    PrintSlip(Rec);
                }
            }
            return((i == "00") || (i == "000"));
        }
Beispiel #7
0
        internal static bool RunOper(Check Ch, int LastTr, bool AllChecks, FiskInfo mfi, int PaymentId)
        {
            string  inStr = "";
            decimal Sum   = 0;

            if (AllChecks)
            {
                foreach (Check Ch2 in Ch.ChecksOnTable)
                {
                    if (Ch2.AlohaCheckNum != Ch.AlohaCheckNum)
                    {
                        AlohaTSClass.ApplyCardPayment(Ch2.AlohaCheckNum, Ch2.Summ);
                        AlohaTSClass.SetPaymentAttr(Ch2.AlohaCheckNum, LastTr);
                    }
                    Sum += Ch2.Summ;
                }
            }
            else
            {
                Sum = Ch.Summ;
            }
            Utils.ToCardLog("Arcus Транзакция старт " + inStr);
            try
            {
                if (TrPosXMessageForm != null)
                {
                    TrPosXMessageForm.Close();
                }
            }
            catch (Exception e)
            {
                Utils.ToCardLog("[Error] При попытке закрыть старое окно. " + e.Message);
                try
                {
                    TrPosXMessageForm.Dispose();
                }
                catch
                {}
            }

            TrPosXMessageForm = new FTrposxRunComplited();
            //Button1State = 0;
            TrPosXMessageForm.button2.Text    = "Свернуть";
            TrPosXMessageForm.button1.Visible = false;
            TrPosXMessageForm.button2.Visible = true;
            TrPosXMessageForm.button3.Visible = false;
            TrPosXMessageForm.Init("Операция на терминале пластиковых карт.", "");
            TrPosXMessageForm.button1.Click += new EventHandler(button1_Click);
            TrPosXMessageForm.button2.Click += new EventHandler(button2_Click);

            //TrPosXClass.RunOperationAsinc(inStr);
            if (!Ch.Vozvr)
            {
                ArcusClass.RunPaymentAsinc(Sum);
            }
            else
            {
                ArcusClass.RunVozvrAsinc(Sum);
            }

            TrPosXMessageForm.TopMost = true;
            TrPosXMessageForm.Show();

            return(true);
        }
Beispiel #8
0
        internal static bool RunOper(Check Ch, int LastTr, bool AllChecks, FiskInfo mfi, int PaymentId)
        {
            if (TrPosXClass.OperInProcess)
            {
                return(false);
            }

            _PaymentId = PaymentId;
            KKmNum     = MainClass.IsWiFi;
            //ToShtrih.Disconnect();
            string  inStr = "";
            decimal Sum   = 0;

            if (AllChecks)
            {
                foreach (Check Ch2 in Ch.ChecksOnTable)
                {
                    if (Ch2.AlohaCheckNum != Ch.AlohaCheckNum)
                    {
                        AlohaTSClass.ApplyCardPayment(Ch2.AlohaCheckNum, Ch2.Summ);
                        AlohaTSClass.SetPaymentAttr(Ch2.AlohaCheckNum, LastTr);
                    }
                    Sum += Ch2.Summ;
                }
            }
            else
            {
                Sum = Ch.Summ;
            }


            if (!Ch.Vozvr)
            {
                string TrNumStr = LastTr.ToString().PadLeft(10, "0"[0]);
                inStr = "MessageID=PUR" + Environment.NewLine +
                        //   inStr = "MessageID=SRV" + Environment.NewLine +
                        "ECRReceiptNumber=" + TrNumStr + Environment.NewLine +
                        "ECRNumber=" + KKmNum + Environment.NewLine +
                        "TransactionAmount=" + (Sum * 100).ToString("0") + Environment.NewLine;
            }
            else
            {
                VF = new VoidFrm(Sum);
                VF.ShowDialog();
                if (VF.Cancel)
                {
                    return(false);
                }
                string chNum = VF.ChNum.ToString().PadLeft(10, "0"[0]);

                inStr = "MessageID=VOI" + Environment.NewLine +
                        "ECRReceiptNumber=" + chNum + Environment.NewLine +
                        "ECRNumber=" + KKmNum + Environment.NewLine;
            }



            Utils.ToCardLog("Транзакция старт " + inStr);



            // TrPosXClass.RunOperationAsincComplited += new TrPosXClass.RunOperationAsincDelegate(TrPosXClass_RunOperationAsincComplited);
            if (TrPosXMessageForm != null)
            {
                TrPosXMessageForm.Close();
            }
            TrPosXMessageForm = new FTrposxRunComplited();
            Button1State      = 0;
            TrPosXMessageForm.button2.Text    = "Свернуть";
            TrPosXMessageForm.button1.Visible = false;
            TrPosXMessageForm.button2.Visible = true;
            TrPosXMessageForm.button3.Visible = false;
            TrPosXMessageForm.Init("Операция на терминале пластиковых карт.", "");
            TrPosXMessageForm.button1.Click += new EventHandler(button1_Click);
            TrPosXMessageForm.button2.Click += new EventHandler(button2_Click);

            TrPosXClass.RunOperationAsinc(inStr);
            TrPosXMessageForm.TopMost = true;
            TrPosXMessageForm.Show();

            return(true);
        }