private void btnXemHD_Click(object sender, EventArgs e)
        {
            frmHoaDonThanhToan frm = new frmHoaDonThanhToan();

            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox   = false;
            frm.MinimizeBox   = false;
            frm.ShowDialog();
        }
Example #2
0
        private void btnHoaDon_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            bool _IsActive = false;

            foreach (Form form in Application.OpenForms.OfType <Form>().ToList())
            {
                if (form.GetType() == typeof(frmHoaDonThanhToan))
                {
                    form.Activate();
                    _IsActive = true;
                }
            }
            if (!_IsActive)
            {
                frmHoaDonThanhToan frm = new frmHoaDonThanhToan();
                frm.MdiParent = this;
                frm.Show();
            }
        }