예제 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Cashier currentCashier = BusinessCashier.GetCurrentCashier();

            if (currentCashier != null)
            {
                CurrentCashier cashier = new CurrentCashier {
                    MdiParent = this.MdiParent
                };
                cashier.Show();
            }
            else
            {
                MessageBox.Show("Debe abrir una nueva caja");
            }
        }
예제 #2
0
        // Método para crear una nueva caja

        private void nuevaCajaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                Cashier cashier = BusinessCashier.OpenCashier();
                if (cashier == null)
                {
                    MessageBox.Show("Error abriendo la caja, inténtelo de nuevo");
                }
                else
                {
                    CurrentCashier currentCashier = new CurrentCashier {
                        MdiParent = this.MdiParent
                    };
                    currentCashier.Show();
                }
            }
            catch (ArgumentException ex)
            {
                MessageBox.Show(ex.Message);
            }
        }