private void vịTríToolStripMenuItem_Click(object sender, EventArgs e) { FormViTri formViTri = new FormViTri(); formViTri.TopLevel = false; formViTri.Visible = true; formViTri.FormBorderStyle = FormBorderStyle.None; formViTri.Dock = DockStyle.Fill; tabCtlChinh.TabPages.Add("Vị trí"); tabCtlChinh.TabPages[tabCtlChinh.TabPages.Count - 1].Controls.Add(formViTri); tabCtlChinh.SelectedIndex = tabCtlChinh.TabPages.Count - 1; }
private void btnThemViTri_Click(object sender, EventArgs e) { FormViTri diaglogViTri = new FormViTri(); diaglogViTri.StartPosition = FormStartPosition.CenterScreen; if (diaglogViTri.ShowDialog(this) == DialogResult.Yes) { } else { cbViTri.DataSource = viTriBLL.LayDanhSachViTri(); } }