private void btnThemLoaiThuoc_Click(object sender, EventArgs e)
        {
            frmThemToaThuoc frm = new frmThemToaThuoc();

            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.MaximizeBox   = false;
            frm.MinimizeBox   = false;
            frm.FormClosing  += new FormClosingEventHandler(ChildFormClosing);
            frm.ShowDialog();
        }
Beispiel #2
0
        private void btnToaThuoc_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            bool _IsActive = false;

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