private void btnSaleProduct_Click(object sender, EventArgs e) { UCShowProduct product = new UCShowProduct(); pnlContent.Controls.Clear(); product.Dock = DockStyle.Fill; pnlContent.Controls.Add(product); product.Show(); }
//GunaButton button; private void btnProduct_Click(object sender, EventArgs e) { //foreach (var a in db.nhomSPs) //{ // button = new GunaButton(); // button.Height = 35; // button.Text = a.tenLoai.ToString(); // flowLayoutPanel1.Controls.Add(button); //} panelShowSP.Controls.Clear(); UCShowProduct uCShowProduct = new UCShowProduct(); panelShowSP.Controls.Add(uCShowProduct); uCShowProduct.Show(); }