示例#1
0
        private void DealerOrder_Click(object sender, EventArgs e)
        {
            if (p1.GetDealer.dealertype == "Shipment Dealer")
            {
                f1          = new PuttingOrderForShipment.Form1(p1.GetDealer);
                f1.TopLevel = false;
                DealerContainer.Controls.Add(f1);
                this.WindowState = FormWindowState.Maximized;

                f1.Show();
                f1.BringToFront();
                f1.Dock = DockStyle.Fill;
                //  MessageBox.Show("");
            }
            else if (p1.GetDealer.dealertype == "Calendaring Dealer")
            {
                f2          = new PuttingOrderForCalendar.Form1(p1.GetDealer);
                f2.TopLevel = false;
                DealerContainer.Controls.Add(f2);

                f2.Show();
                f2.BringToFront();
                f2.Dock = DockStyle.Fill;
            }
            else if (p1.GetDealer.dealertype == "Embroidery Dealer")
            {
                f3          = new PuttingOrderForEmbroidery.Form1(p1.GetDealer);
                f3.TopLevel = false;
                DealerContainer.Controls.Add(f3);

                f3.Show();
                f3.BringToFront();
                f3.Dock = DockStyle.Fill;
            }
            else if (p1.GetDealer.dealertype == "Stitching Dealer")
            {
                f4          = new PuttingOrderForStitching.Form1(p1.GetDealer);
                f4.TopLevel = false;
                DealerContainer.Controls.Add(f4);

                f4.Show();
                f4.BringToFront();
                f4.Dock = DockStyle.Fill;
            }

            //if (this.IsMdiChild == true)
            //{

            //    this.MdiParent.WindowState = FormWindowState.Maximized;
            //}
            //else
            this.WindowState = FormWindowState.Maximized;
        }
示例#2
0
        private void CloseDealerProfile_Click(object sender, EventArgs e)
        {
            dashboardpanel.Hide();
            BillViewContainer.Hide();
            AmountPayment.Hide();

            SearchPanel.Visible = true;
            SearchPanel.BringToFront();
            if (f1 != null && !f1.IsDisposed)
            {
                f1.Close();
                f1.Hide();
                f1.Dispose();
                f1 = null;
            }

            if (f2 != null && !f2.IsDisposed)
            {
                f2.Close();
                f2.Hide();
                f2.Dispose();
                f2 = null;
            }
            if (f3 != null && !f3.IsDisposed)
            {
                f3.Close();
                f3.Hide();
                f3.Dispose();
                f3 = null;
            }
            if (f4 != null && !f4.IsDisposed)
            {
                f4.Close();
                f4.Hide();
                f4.Dispose();
                f4 = null;
            }
        }