Ejemplo n.º 1
0
 private void buttonPrint_Click(object sender, EventArgs e)
 {
     if (radioButtonA4.Checked)
     {
         InvoiceReport_Frame recept = new InvoiceReport_Frame(this.inv);
         recept.Show();
     }
     else
     {
         string printer = lstPrinterList.GetItemText(lstPrinterList.SelectedItem);
         if (printer != null && printer != "")
         {
             PosReceipt pos = new PosReceipt(this.inv, printer, this.received);
             pos.print();
         }
         else
         {
             MessageBox.Show("Slect A Printer");
         }
     }
 }
Ejemplo n.º 2
0
        private void textBoxChange_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Return)
            {
                double amountReceived = Math.Round(Convert.ToDouble(receivedAmount.Text), 2);
                double DueAmount      = Math.Round(Convert.ToDouble(textBoxNetDue.Text), 2);

                if (amountReceived > DueAmount)
                {
                    String       paymentInformation = "Total :" + this.inv.net_total + " Received :" + amountReceived + " Change:" + textBoxChange.Text;
                    DialogResult result             = MessageDialog.Show("Print!", paymentInformation + " Are you want to print the receipt now!");
                    if (result == DialogResult.Yes)
                    {
                        PosReceipt ps = new PosReceipt(this.inv);
                        ps.print();
                    }
                    result = MessageDialog.Show("Next Invoice!", "Is this invoice close and process next invoice?");
                    if (result == DialogResult.Yes)
                    {
                        resetInvoice();
                    }
                }
                else
                {
                    DialogResult result = MessageDialog.Show("Print!", "Are you want to print the receipt now!");
                    if (result == DialogResult.Yes)
                    {
                        PosReceipt ps = new PosReceipt(this.inv);
                        ps.print();
                    }
                    result = MessageDialog.Show("Next Invoice!", "Is this invoice close and process next invoice?");
                    if (result == DialogResult.Yes)
                    {
                        resetInvoice();
                    }
                }
            }
        }