private void báoChíToolStripMenuItem_Click(object sender, EventArgs e) { FormBao formBao = new FormBao(); formBao.TopLevel = false; formBao.Visible = true; formBao.FormBorderStyle = FormBorderStyle.None; formBao.Dock = DockStyle.Fill; tabCtlChinh.TabPages.Add("Báo chí"); tabCtlChinh.TabPages[tabCtlChinh.TabPages.Count - 1].Controls.Add(formBao); tabCtlChinh.SelectedIndex = tabCtlChinh.TabPages.Count - 1; }
private void btnThemBao_Click(object sender, EventArgs e) { FormBao diaglogBao = new FormBao(); diaglogBao.StartPosition = FormStartPosition.CenterScreen; if (diaglogBao.ShowDialog(this) == DialogResult.Yes) { } else { cbBao.DataSource = baoBLL.LayDanhSachBao(); } }