Ejemplo n.º 1
0
        private void viewSpectaclesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (currentView != null)
            {
                currentView.dismissFromContainer();
            }
            Array spectacles = SpectacleBL.getAllSpectacles().ToArray();

            spectalesTable.drawInForm(this);
            spectalesTable.refreshWithData(spectacles);
            currentView = spectalesTable;
        }
        private void viewEmployeesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Array users = UserBL.getAllUsers().ToArray();

            if (users == null)
            {
                MessageBox.Show("Cannot get data");
                return;
            }
            if (currentView != null)
            {
                currentView.dismissFromContainer();
            }
            userTable.drawInForm(this);
            userTable.refreshWithData(users);
            currentView = userTable;
        }
        // Spectacles Operations
        private void viewSpectaclesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Array spectacles = SpectacleBL.getAllSpectacles().ToArray();

            if (spectacles == null)
            {
                MessageBox.Show("Cannot get data");
                return;
            }
            if (currentView != null)
            {
                currentView.dismissFromContainer();
            }
            spectalesTable.drawInForm(this);
            spectalesTable.refreshWithData(spectacles);
            currentView = spectalesTable;
        }
Ejemplo n.º 4
0
        private void handlerTableEditRow(object sender, System.Collections.Specialized.OrderedDictionary e)
        {
            if (sender.Equals(spectalesTable))
            {
                string titlu   = e[Constants.titluField].ToString();
                Array  tickets = TicketBL.getAllTicketsForSpectacle(titlu).ToArray();
                if (tickets == null || tickets.Length == 0)
                {
                    MessageBox.Show("No tickets added for this spectacle");
                    return;
                }


                if (currentView != null)
                {
                    currentView.dismissFromContainer();
                }
                ticketsTable.drawInForm(this);
                ticketsTable.refreshWithData(tickets);
                currentView = ticketsTable;
            }
        }