示例#1
0
        private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
        {
            ReceiptDetails details = new ReceiptDetails();

            details.ControlNumber = 000335656.ToString();
            details.CustomerName  = "Jamil Villones";
            details.TransactBy    = "admin";
            details.Tendered      = 1000000;

            for (int i = 1; i <= 5; i++)
            {
                details.Additem("Lerom Ipsum", "serial", i, 2500.25m, 365);
            }

            e.FormatReciept(printAction, details);
        }
示例#2
0
        private void printDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
        {
            ReceiptDetails details = new ReceiptDetails();

            details.ControlNumber = saleId.ToString();
            details.CustomerName  = soldTo.Text;
            details.TransactBy    = UserManager.instance.currentLogin.Username;
            details.Tendered      = amountRecieved.Value;

            for (int i = 0; i < cartTable.RowCount; i++)
            {
                details.Additem(cartTable[2, i].Value.ToString(), cartTable[1, i].Value?.ToString(), (int)cartTable[3, i].Value, (decimal)cartTable[4, i].Value, (decimal)cartTable[5, i].Value);
            }

            e.FormatReciept(printAction, details);
        }