private void quyềnHạnToolStripMenuItem_Click(object sender, EventArgs e) { FormQuyenHan formQuyenHan = new FormQuyenHan(); formQuyenHan.TopLevel = false; formQuyenHan.Visible = true; formQuyenHan.FormBorderStyle = FormBorderStyle.None; formQuyenHan.Dock = DockStyle.Fill; tabCtlChinh.TabPages.Add("Quyền hạn"); tabCtlChinh.TabPages[tabCtlChinh.TabPages.Count - 1].Controls.Add(formQuyenHan); tabCtlChinh.SelectedIndex = tabCtlChinh.TabPages.Count - 1; }
private void btnThemQuyenHan_Click(object sender, EventArgs e) { FormQuyenHan diaglogQuyenHan = new FormQuyenHan(); diaglogQuyenHan.StartPosition = FormStartPosition.CenterScreen; if (diaglogQuyenHan.ShowDialog(this) == DialogResult.Yes) { } else { clbQuyenHan.DataSource = quyenHanBLL.LayDanhSachQuyenHan(); clbQuyenHan.DisplayMember = "TenQuyenHan"; clbQuyenHan.ValueMember = "MaQuyenHan"; } }