Пример #1
0
        private void BuildHeader(DocketLayout outDocketLayout, Order inOrder)
        {
            PrinterInstruction currentInstruction;

            // Chit Information
            currentInstruction       = new PrinterInstruction();
            currentInstruction.Value = inOrder.ChitValue;
            outDocketLayout.AddInstruction(currentInstruction);
            // Kitchen Timings
            currentInstruction               = new PrinterInstruction();
            currentInstruction.Value         = "IN  " + inOrder.SaleStartTime.ToString("T") + "\n" + "OUT " + DateTime.Now.ToString("T");
            currentInstruction.DrawLineAfter = true;
            outDocketLayout.AddInstruction(currentInstruction);
        }
Пример #2
0
        private void BuildFooter(DocketLayout outDocketLayout, Order inOrder)
        {
            PrinterInstruction currentInstruction;

            // Server Name
            currentInstruction                = new PrinterInstruction();
            currentInstruction.Value          = inOrder.ServerName;
            currentInstruction.DrawLineBefore = true;
            outDocketLayout.AddInstruction(currentInstruction);
            // Date
            currentInstruction          = new PrinterInstruction();
            currentInstruction.Value    = DateTime.Now.Date.ToString("d");
            currentInstruction.CutAfter = true;
            outDocketLayout.AddInstruction(currentInstruction);
        }
Пример #3
0
        private void BuildItem(DocketLayout outDocketLayout, Item inItem)
        {
            PrinterInstruction currentInstruction;

            // Item Name
            currentInstruction       = new PrinterInstruction();
            currentInstruction.Value = inItem.Name;
            outDocketLayout.AddInstruction(currentInstruction);
            foreach (var side in inItem.Sides)
            {
                currentInstruction       = new PrinterInstruction();
                currentInstruction.Value = " > " + side.Name;
                outDocketLayout.AddInstruction(currentInstruction);
            }
            foreach (var option in inItem.Options)
            {
                currentInstruction        = new PrinterInstruction();
                currentInstruction.Value  = option.IsPlus ? " + " : " - ";
                currentInstruction.Value += option.Name;
                outDocketLayout.AddInstruction(currentInstruction);
            }
        }