Beispiel #1
0
        private void tslPurchaseReturn_Click(object sender, EventArgs e)
        {
            bool IsOpen   = false;
            int  tabcount = 0;

            foreach (Form f in Application.OpenForms)
            {
                if (f.Text == "Purchase Return")
                {
                    tabForms.SelectedTab = tabForms.TabPages[tabcount - 2];
                    IsOpen = true;
                    f.Focus();
                    break;
                }
                tabcount++;
            }



            if (IsOpen == false)
            {
                frmPurchaseReturn frm = new frmPurchaseReturn();
                frm.FormBorderStyle  = FormBorderStyle.None;
                frm.StartPosition    = FormStartPosition.Manual;
                frm.Location         = new Point((this.Width - frm.Width) / 2, this.Location.Y + (this.Height - frm.Height) / 2);
                this.pnlMain.Visible = false;
                frm.MdiParent        = this;

                frm.Show();
            }
        }
        private void addPurchaseReturnDebitNoteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmPurchaseReturn purchaseReturn = new frmPurchaseReturn();

            purchaseReturn.Show();
        }