Exemplo n.º 1
0
        public ItemsInformationcs()
        {
            InitializeComponent();

            FormBorderStyle = FormBorderStyle.FixedDialog;

            MaximizeBox = false;

            StartPosition = FormStartPosition.CenterScreen;

            try
            {
                SQLItemsControl = new SQLDataControl();
            }
            catch (MySqlException)
            {
                MessageBox.Show("Database connection problem");
            }

            foreach (string productitem in SQLItemsControl.GetBuyProducts())
            {
                cbProducts.Items.Add(productitem).ToString();
            }
            foreach (string productitem in SQLItemsControl.GetLoanProducts())
            {
                cbLoanProducts.Items.Add(productitem).ToString();
            }
            ItemTimer.Start();
        }
Exemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();
            FormBorderStyle = FormBorderStyle.FixedDialog;

            // Set the MaximizeBox to false to remove the maximize box.
            MaximizeBox = false;


            // Set the MinimizeBox to false to remove the minimize box.
            //MinimizeBox = false;

            // Set the start position of the form to the center of the screen.
            StartPosition = FormStartPosition.CenterScreen;

            try
            {
                sqlControl = new SQLDataControl();
                MessageBox.Show("Connection successful");
            }
            catch (MySqlException ex)
            {
                MessageBox.Show(ex.Message);
            }

            GeneralTimer.Start();
        }
Exemplo n.º 3
0
        public AddProducts()
        {
            InitializeComponent();
            FormBorderStyle = FormBorderStyle.FixedDialog;

            // Set the MaximizeBox to false to remove the maximize box.
            MaximizeBox = false;

            // Set the MinimizeBox to false to remove the minimize box.
            //MinimizeBox = false;

            // Set the start position of the form to the center of the screen.
            StartPosition = FormStartPosition.CenterScreen;



            try
            {
                SqlAddProduct = new SQLDataControl();
            }
            catch (MySqlException)
            {
                MessageBox.Show("Database connection problem");
            }
            foreach (string productType in SqlAddProduct.GetBuyProducts())
            {
                cBProductName.Items.Add(productType).ToString();
            }
            tBPrice.Enabled = false;
        }
Exemplo n.º 4
0
        public CampingInformation()
        {
            InitializeComponent();
            FormBorderStyle = FormBorderStyle.FixedDialog;

            // Set the MaximizeBox to false to remove the maximize box.
            MaximizeBox = false;

            // Set the MinimizeBox to false to remove the minimize box.
            //MinimizeBox = false;

            // Set the start position of the form to the center of the screen.
            StartPosition = FormStartPosition.CenterScreen;
            try
            {
                sqlControl = new SQLDataControl();
            }
            catch (MySqlException)
            {
                MessageBox.Show("Database connection problem");
            }

            TimerCamping.Start();
        }