private void btnView_Click(object sender, EventArgs e)
        {
            if (lvTransactionList.SelectedItems.Count == 0)
            {
                return;
            }

            int   idx = Convert.ToInt32(lvTransactionList.SelectedItems[0].Tag);
            Queue q   = new Queue();

            q.LoadQueue(idx);

            Console.WriteLine(q.QueueColl.Count);
            foreach (QueueLines orders in q.QueueColl)
            {
                MenuItem smenu = new MenuItem();

                smenu.ID = orders.MenuID;
                smenu.LoadMenuItem();

                if (Application.OpenForms["frmCasher"] != null)
                {
                    (Application.OpenForms["frmCasher"] as frmCasher).isView      = true;
                    (Application.OpenForms["frmCasher"] as frmCasher).OrderNumber = lvTransactionList.SelectedItems[0].Text;
                    (Application.OpenForms["frmCasher"] as frmCasher).AddMenuItem(smenu);
                }
                else
                {
                    frmCasher frm = new frmCasher();
                    frm.isView      = true;
                    frm.OrderNumber = lvTransactionList.SelectedItems[0].Text;
                    frm.Show();
                    frm.AddMenuItem(smenu);
                }
            }

            this.Close();
        }
Beispiel #2
0
        private void btnCasher_Click(object sender, EventArgs e)
        {
            frmCasher frm = new frmCasher();

            frm.Show();
        }