예제 #1
0
        private void supplierToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            try
            {
                AddNewSupplier ARF = null;

                if (IsFormAlreadyOpen(typeof(AddNewSupplier)) == null)
                {
                    ARF           = new AddNewSupplier();
                    ARF.MdiParent = this;
                    ARF.Show();
                }
                else
                {
                    Form selectedForm = IsFormAlreadyOpen(typeof(AddNewSupplier));
                    foreach (Form OpenForm in this.MdiChildren)
                    {
                        if (OpenForm == selectedForm)
                        {
                            if (selectedForm.WindowState == FormWindowState.Minimized)
                            {
                                selectedForm.WindowState = FormWindowState.Normal;
                            }
                            selectedForm.Select();
                        }
                    }
                }
            }
            catch (Exception x)
            {
                MessageBox.Show(x.GetBaseException().ToString());
            }
        }
예제 #2
0
        public void showAddNewSupplierForm()
        {
            try
            {
                AddNewSupplier ARF = null;

                if (IsFormAlreadyOpen(typeof(AddNewSupplier)) == null)
                {
                    ARF           = new AddNewSupplier();
                    ARF.MdiParent = this.MdiParent;
                    ARF.Show();
                }
                else
                {
                    Form selectedForm = IsFormAlreadyOpen(typeof(AddNewSupplier));
                    foreach (Form OpenForm in this.MdiChildren)
                    {
                        if (OpenForm == selectedForm)
                        {
                            if (selectedForm.WindowState == FormWindowState.Minimized)
                            {
                                selectedForm.WindowState = FormWindowState.Normal;
                            }
                            selectedForm.Select();
                        }
                    }
                }
            }
            catch (Exception x)
            {
                MessageBox.Show(x.GetBaseException().ToString());
            }
        }
예제 #3
0
        public void showAddNewSupplierForm()
        {
            try
            {
                AddNewSupplier ARF = null;

                if (IsFormAlreadyOpen(typeof(AddNewSupplier)) == null)
                {
                    ARF = new AddNewSupplier();
                    ARF.MdiParent = this.MdiParent;
                    ARF.Show();
                }
                else
                {
                    Form selectedForm = IsFormAlreadyOpen(typeof(AddNewSupplier));
                    foreach (Form OpenForm in this.MdiChildren)
                    {
                        if (OpenForm == selectedForm)
                        {
                            if (selectedForm.WindowState == FormWindowState.Minimized)
                            {
                                selectedForm.WindowState = FormWindowState.Normal;
                            }
                            selectedForm.Select();
                        }
                    }
                }
            }
            catch (Exception x)
            {
                MessageBox.Show(x.GetBaseException().ToString());
            }
        }
예제 #4
0
        private void supplierToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            try
            {
                AddNewSupplier ARF = null;

                if (IsFormAlreadyOpen(typeof(AddNewSupplier)) == null)
                {
                    ARF = new AddNewSupplier();
                    ARF.MdiParent = this;
                    ARF.Show();
                }
                else
                {
                    Form selectedForm = IsFormAlreadyOpen(typeof(AddNewSupplier));
                    foreach (Form OpenForm in this.MdiChildren)
                    {
                        if (OpenForm == selectedForm)
                        {
                            if (selectedForm.WindowState == FormWindowState.Minimized)
                            {
                                selectedForm.WindowState = FormWindowState.Normal;
                            }
                            selectedForm.Select();
                        }
                    }
                }
            }
            catch (Exception x)
            {
                MessageBox.Show(x.GetBaseException().ToString());
            }
        }