예제 #1
0
        private void btnMatHang_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Form frm = CheckForm(typeof(MatHang));

            if (frm != null)
            {
                frm.Activate();
            }
            else
            {
                MatHang fr = new MatHang();
                fr.MdiParent = this;
                fr.Show();
            }
        }
예제 #2
0
        private void btnThemMHMoi_Click(object sender, EventArgs e)
        {
            foreach (Form formCon in this.MdiParent.MdiChildren)
            {
                if (formCon.Name == "MatHang")
                {
                    formCon.Activate();
                    return;
                }
            }
            MatHang moMatHang = new MatHang();

            moMatHang.MdiParent = this.ParentForm;
            moMatHang.Show();
        }