Example #1
0
        private void button8_Click(object sender, EventArgs e)
        {
            payment_Frame payment = new payment_Frame(this.inv, this);

            payment.Show();
            updateInvoice();
        }
Example #2
0
 private void textBoxDiscount_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {   //take the discount amount from the text box
         double discountAmount = Convert.ToDouble(textBoxDiscount.Text);
         this.inv.discount = discountAmount;
         updateAmount();
         receivedAmount.Focus();
         payment_Frame pf = new payment_Frame(this.inv, this);
         pf.Show();
     }
 }
Example #3
0
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            switch (keyData)
            {
            case (Keys.Control | Keys.S):
                new ProductSearch_Frame(this).Show();
                return(true);

            case (Keys.Control | Keys.N):
                if (this.inv == null)
                {
                    createInvoice();
                }
                else
                {
                    MessageDialog.ShowAlert("Complete Current Invoice First", "Alert Message", "warning");
                }
                break;

            case (Keys.Control | Keys.P):
                PrinterSelect_Frame pf = new PrinterSelect_Frame(this.inv);
                pf.Show();
                break;

            case (Keys.Control | Keys.M):
                if (this.inv != null)
                {
                    if (inv.invoice_total > 0)
                    {
                        MemberShip_Frame memberShip = new MemberShip_Frame(this.inv);
                        memberShip.Show();
                    }
                    else
                    {
                        MessageBox.Show("Please Select Some Product First");
                    }
                }
                else
                {
                    MessageDialog.ShowAlert("No invoice found", "Alert Message", "warning");
                }

                break;

            case (Keys.Control | Keys.A):
                if (this.inv != null)
                {
                    payment_Frame payment = new payment_Frame(this.inv, this);
                    payment.Show();
                    updateInvoice();
                }
                else
                {
                    MessageDialog.ShowAlert("No invoice found", "Alert Message", "warning");
                }
                break;

            case (Keys.Return):
                checkForInvoice();
                break;
            }
            return(base.ProcessCmdKey(ref msg, keyData));
        }