예제 #1
0
        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);
            }
        }
예제 #2
0
 private void btnSverka_Click(object sender, RoutedEventArgs e)
 {
     //DualConnector.DualConnectorMain.Sverka();
     CreditCardAlohaIntegration.RunSverka();
     this.Close();
 }