コード例 #1
0
        public static void CashIncome(decimal Summ)
        {
            ShtrihCommandBlock CashIncomeCommandBlock = new ShtrihCommandBlock();

            if (Summ > 0)
            {
                CashIncomeCommandBlock.CashIncome(Summ);
            }
            CashIncomeCommandBlock.CommandBlockToQwery();
        }
コード例 #2
0
        /*
         * internal static string  GetClishe()
         * {
         *  string tmp = "";
         *  Shtrih.Password = 30;
         *  Shtrih.TableNumber = 4;
         *
         *  Shtrih.FieldNumber = 1;
         *  for (int i = 11; i < 17; i++)
         *  {
         *      Shtrih.RowNumber = i;
         *      Shtrih.GetFieldStruct();
         *      Shtrih.ReadTable();
         *      string k="";
         *      if (Shtrih.ValueOfFieldString != null)
         *      {
         *          k = Shtrih.ValueOfFieldString.Replace(" ", "");
         *      }
         *      if (k.Length > 0)
         *      {
         *          tmp += Shtrih.ValueOfFieldString+Environment.NewLine  ;
         *      }
         *  }
         *  return tmp;
         * }
         */

        /*
         * public  static void CloseCheck(double Pr, DateTime dt)
         * {
         *  SetTime(dt);
         *  CloseCheck((decimal )Pr);
         *
         * }
         */
        /*
         * private static void mSale()
         * {
         *  /*
         *  MessageForm Mf = new MessageForm(Shtrih.ResultCodeDescription);
         *  do
         *  {
         *      Shtrih.Sale();
         *
         *      if (Shtrih.ResultCode == 0)
         *      {
         *          Shtrih.WaitForPrinting();
         *      }
         *      else if (Shtrih.ResultCode == 88)
         *      {
         *          Shtrih.ContinuePrint();
         *      }
         *      else
         *      {
         *          Mf.SetCpt(Shtrih.ResultCodeDescription);
         *          Mf.ShowDialog();
         *      }
         *  } while ((Mf.Result == 1)&&(Shtrih.ResultCode != 0));
         *  Mf.Close();
         *  Mf.Dispose ();
         * */
        //        Shtrih.Sale();
        //  }

        //private static void mReturnSale()
        //{

        /*
         * MessageForm Mf = new MessageForm(Shtrih.ResultCodeDescription);
         * do
         * {
         *  Shtrih.ReturnSale ();
         *
         *  if (Shtrih.ResultCode == 0)
         *  {
         *      Shtrih.WaitForPrinting();
         *  }
         *  else if (Shtrih.ResultCode == 88)
         *  {
         *      Shtrih.ContinuePrint();
         *  }
         *  else
         *  {
         *      Mf.SetCpt(Shtrih.ResultCodeDescription);
         *      Mf.ShowDialog();
         *  }
         * } while ((Mf.Result == 1) && (Shtrih.ResultCode != 0));
         * Mf.Close();
         * Mf.Dispose();
         * */
        //  Shtrih.ReturnSale ();
        // }

        //private static void mCloseCheck()
        //{

        /*
         * MessageForm Mf = new MessageForm(Shtrih.ResultCodeDescription);
         *
         * do{
         * Shtrih.CloseCheck ();
         *
         * if (Shtrih.ResultCode == 0)
         * {
         *  Shtrih.WaitForPrinting();
         * }
         * else if (Shtrih.ResultCode == 88)
         * {
         *  Shtrih.ContinuePrint();
         * }
         * else
         * {
         *  Mf.SetCpt(Shtrih.ResultCodeDescription);
         *  Mf.ShowDialog();
         * }
         * } while ((Mf.Result == 1)&&(Shtrih.ResultCode != 0));
         * Mf.Close();
         * Mf.Dispose ();
         * */
        //       Shtrih.CloseCheck();
        //  }

        //    private static int mPrintString()
        //   {

        /*
         * MessageForm Mf = new MessageForm(Shtrih.ResultCodeDescription);
         *
         * int res = 0;
         * do
         * {
         *  Utils.ToLog(Shtrih.StringForPrinting);
         *  Shtrih.PrintString ();
         *
         *  if (Shtrih.ResultCode == 0)
         *  {
         *      Shtrih.WaitForPrinting();
         *  }
         *  else if (Shtrih.ResultCode == 88)
         *  {
         *      Shtrih.ContinuePrint();
         *  }
         *  else
         *  {
         *      Mf.TopMost = true;
         *     // Mf.button3.Visible = true;
         *      Mf.SetCpt(Shtrih.ResultCodeDescription);
         *      Mf.ShowDialog();
         *      res = Mf.Result;
         *  }
         * } while ((Mf.Result != -1) && (Shtrih.ResultCode != 0));
         * Mf.Close();
         *
         * Mf.Dispose();
         * if (Shtrih.ResultCode == 0)
         * {
         *  res = 0;
         * }
         * return res;
         * */
        //        Shtrih.PrintString();
        //       return 0;
        //  }

        //        private static void mPrintStringWithFont()
        //      {

        /*
         * MessageForm Mf = new MessageForm(Shtrih.ResultCodeDescription);
         *
         * do
         * {
         *  Shtrih.PrintStringWithFont ();
         *
         *  if (Shtrih.ResultCode == 0)
         *  {
         *      Shtrih.WaitForPrinting();
         *  }
         *  else if (Shtrih.ResultCode == 88)
         *  {
         *      Shtrih.ContinuePrint();
         *  }
         *  else
         *  {
         *      Mf.SetCpt(Shtrih.ResultCodeDescription);
         *      Mf.ShowDialog();
         *  }
         * } while ((Mf.Result == 1) && (Shtrih.ResultCode != 0));
         * Mf.Close();
         * Mf.Dispose();
         * */
        //       Shtrih.PrintStringWithFont();
        //  }



        public static void ZReportWithCashIncome(decimal IncomeSumm)
        {
            ShtrihCommandBlock CashIncomeCommandBlock = new ShtrihCommandBlock();

            string status = "";

            if (Shtrih2.ClosedSmena(out status))
            {
                CashIncomeCommandBlock.Sale(1, 0, "", 1, 0);
                CashIncomeCommandBlock.CloseCheck(0, 0, 0, 0, 1, 0, 0, 0, "", null);
            }

            CashIncomeCommandBlock.WriteTableInt(1, 1, 2, 1, new List <int>());
            CashIncomeCommandBlock.PrintReportWithCleaning();
            if (IncomeSumm > 0)
            {
                CashIncomeCommandBlock.CashIncome(IncomeSumm);
            }
            CashIncomeCommandBlock.CommandBlockToQwery();
        }