private void panel2_Click(object sender, EventArgs e)
        {
            addProducts products = new addProducts(this);

            products.checkDelete.Hide();
            products.IdLabel.Hide();
            products.label5.Hide();
            String value = error.GenerateNumber(8);

            products.barcode.Text = "1111" + value.ToString();
            products.Show();
            products.btnUpdate.Enabled = false;
        }
        private void dataGridProducts_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            addProducts add = new addProducts(this);

            if (e.RowIndex >= 0)
            {
                DataGridViewRow dt = this.dataGridProducts.Rows[e.RowIndex];

                add.IdLabel.Text      = dt.Cells[0].Value.ToString();
                add.barcode.Text      = dt.Cells[1].Value.ToString();
                add.productName.Text  = dt.Cells[2].Value.ToString();
                add.categoryName.Text = dt.Cells[3].Value.ToString();
                add.brandName.Text    = dt.Cells[4].Value.ToString();
                add.description.Text  = dt.Cells[5].Value.ToString();
                add.quantity.Text     = dt.Cells[6].Value.ToString();
                add.price.Text        = dt.Cells[7].Value.ToString();
                add.reorder.Text      = dt.Cells[8].Value.ToString();

                add.submit.Enabled = false;
                add.checkDelete.Show();
                add.IdLabel.Hide();
                add.Show();
            }
        }