private void simpleButton2_Click(object sender, EventArgs e) { frmQLKhachHang frm = new frmQLKhachHang(); frm.ShowDialog(); cboKH.DataSource = kh.getKhachHang(); cboKH.DisplayMember = "tenKH"; cboKH.ValueMember = "mathe"; cboKH.Text = ""; }
private void navBarItem8_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { Form frm = KiemTraTonTai(typeof(frmQLKhachHang)); if (frm != null) { frm.Activate(); } else { frmQLKhachHang f = new frmQLKhachHang(); f.MdiParent = this; f.Show(); } }
private void btnQLKhachHang_ItemClick(object sender, ItemClickEventArgs e) { Form frm = KiemTraTonTai(typeof(frmQLKhachHang)); if (frm != null) { frm.Activate(); } else { frmQLKhachHang f = new frmQLKhachHang(); f.MdiParent = this; f.Show(); } }
private void quanLyKhachHangToolStripMenuItem_Click(object sender, EventArgs e) { //----!Đóng tất cả form con đang hiện ---- foreach (Form f in MdiChildren) { if (f.ShowInTaskbar) { f.Close(); } } if (kiemTraTrungForm("frmQLKhachHang")) { frmQLKhachHang fQLKhachHang = new frmQLKhachHang(); fQLKhachHang.Name = "frmQLKhachHang"; fQLKhachHang.MdiParent = this; fQLKhachHang.Show(); } }