Пример #1
0
        private bool PrintFreeStringLabel(string descr)
        {
            var toGoStrs = new List <FiscalCheckVisualString>()
            {
                new FiscalCheckVisualString(" ", true, true),
                new FiscalCheckVisualString(" ", true, true),
                new FiscalCheckVisualString(descr, false, true)
            };

            var vis = new CtrlCheckPrintTemplate();

            vis.CreateCheck(toGoStrs, "");

            return(PrintDoc3(vis, 0, iniFile.LabelPrinterName, 270, 190)); //200
        }
Пример #2
0
        private bool PrintQRLabel(string EmpName, string ordernum)
        {
            string EncEmpl = HttpUtility.UrlEncode(EmpName);
            string QRStr   = @"http://saycoffeemania.ru/?DepId=" + AlohainiFile.DepNum + "&Emp=" + EncEmpl + "_" + ordernum;

            //string QRStr = @"http://saycoffeemania.ru/?DepId=" + "104" + "&Emp=" + EncEmpl;
            Utils.ToCardLog("PrintQRLabel " + QRStr);
            var QrImg = FRSClientApp.FiscalCheckCreator.CreateQRBitmap(QRStr, 115, 115);
            //BitmapEncoder encoder = new BmpBitmapEncoder();
            //encoder.Frames.Add(BitmapFrame.Create(QrImg));

            var vis = new CtrlCheckPrintTemplate();

            vis.CreateCheck(QrImg);

            return(PrintDoc3(vis, 0, iniFile.LabelPrinterName, 270, 200)); //200
        }
Пример #3
0
        private bool PrintToGoDishLabel(Dish itm, string WaterName, int expirationHours, int chId, string descr, string saveDescr)
        {
            string expirationName = "час";
            string saveDescrDef   = "+2°C - +6°C";

            int deltah = expirationHours <= 24 ? 0 : -4;

            if (saveDescr.Trim() != "")
            {
                saveDescrDef = saveDescr;
            }
            DateTime dtStart = DateTime.Now.AddHours(deltah);
            DateTime dtStop  = dtStart.AddHours(expirationHours);



            if (expirationHours >= 48)
            {
                expirationName  = "суток";
                expirationHours = expirationHours / 24;
            }

            var toGoStrs = new List <FiscalCheckVisualString>()
            {
                new FiscalCheckVisualString(String.Format("Чек {0}", chId))
                , new FiscalCheckVisualString(String.Format("Упаковал: {0}", WaterName))

                , new FiscalCheckVisualString(String.Format(itm.LongName), false, true)
                , new FiscalCheckVisualString(String.Format("Произведено: {0} ", dtStart.ToString("dd.MM.yy HH:mm")))
                , new FiscalCheckVisualString($"Срок хранения ({expirationName}): {expirationHours} ")
                , new FiscalCheckVisualString($"Усл. хранения: {saveDescrDef}")
                , new FiscalCheckVisualString(String.Format("Использовать до: {0} ", dtStop.ToString("dd.MM.yy HH:mm")))
            };

            var vis = new CtrlCheckPrintTemplate();

            vis.CreateCheck(toGoStrs, descr);

            return(PrintDoc3(vis, 0, iniFile.LabelPrinterName, 270, 190)); //200
        }