using MesWork;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MesDataFunction
{
   public class PrinterCommandCenter
    {

        public static bool PrintToPrinter(string code)
        {
            bool success = false;

            Print_Sql.Select_Print_Template_Def(out string templateStr);
            var printContent = Template_Make_Zpl(templateStr, code);

            PrintTo.Print(true, PP.PrintURL, new string[] { printContent });

            return success;
        }


        public static string Template_Make_Zpl(string templateStr,string TowCode)
        {
            return templateStr.Replace("@TowCode", TowCode);
        }


    }
}
