Пример #1
0
        private void PurchaseOrderMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                this.ActiveMdiChild.Close();
            }
            PurchaseOrdersForm purchaseOrderForm = new PurchaseOrdersForm();

            purchaseOrderForm.MdiParent = this;
            purchaseOrderForm.Show();
            purchaseOrderForm.WindowState = FormWindowState.Maximized;
        }
Пример #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            dbCtrl = new DBCtrl();
            Login login = new Login(dbCtrl);

            if (login.ShowDialog() == DialogResult.OK)
            {
                this.Text = login.GetCompanyName();
                PurchaseOrdersForm purchaseOrderForm = new PurchaseOrdersForm();
                purchaseOrderForm.MdiParent = this;
                purchaseOrderForm.Show();
                purchaseOrderForm.WindowState = FormWindowState.Maximized;
            }
            else
            {
                this.Close();
            }
        }