Exemplo n.º 1
0
        private void doTheItemsExist()
        {
            connection = DBReader.connectionCreator(DBName);
            try
            {
                DBReader.connectionOpen(connection);

                if (DBReader.procedureStatus(connection, tableName).Count() > 0)
                {
                    buttonShowItems.Enabled = true;
                    items = DBReader.selectItems(connection, tableName);
                }
                else
                {
                    buttonShowItems.Enabled = false;
                }
            }
            catch (MySqlException ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                DBReader.connectionEnd(connection);
            }
        }