private void bàiViếtToolStripMenuItem_Click(object sender, EventArgs e) { FormBaiViet formBaiViet = new FormBaiViet(); formBaiViet.TopLevel = false; formBaiViet.Visible = true; formBaiViet.FormBorderStyle = FormBorderStyle.None; formBaiViet.Dock = DockStyle.Fill; tabCtlChinh.TabPages.Add("Bài viết"); tabCtlChinh.TabPages[tabCtlChinh.TabPages.Count - 1].Controls.Add(formBaiViet); tabCtlChinh.SelectedIndex = tabCtlChinh.TabPages.Count - 1; }
private void btnQuanLyBaiViet_Click(object sender, EventArgs e) { if (id != "") { FormBaiViet diaglogBaiViet = new FormBaiViet(Int32.Parse(txtMaChiTietQuangCao.Text.ToString())); diaglogBaiViet.StartPosition = FormStartPosition.CenterScreen; if (diaglogBaiViet.ShowDialog(this) == DialogResult.Yes) { } else { //txtSoLuongQuangCao.Text = chiTietQuangCaoBLL.LayDanhSachChiTietQuangCaoTheoMaPhieuDangKy(Int32.Parse(txtMaPhieuDangKy.Text)).Rows.Count.ToString(); } } else { MessageBox.Show("Vui lòng chọn Chi tiết quảng cáo muốn xem bài viết!"); } }