Пример #1
0
        private void dgvMenu_child_admin_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            switch (e.RowIndex)
            {
                case 0:
                    pnlMain.Controls.Clear();
                    frmProduct_update frmP = new frmProduct_update();
                    frmP.TopLevel = false;
                    pnlMain.Controls.Add(frmP);
                    frmP.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                    frmP.Dock = DockStyle.Fill;
                    frmP.Show();
                    break;

                case 1:
                    pnlMain.Controls.Clear();
                    frmBill_update frmB = new frmBill_update();
                    frmB.TopLevel = false;
                    pnlMain.Controls.Add(frmB);
                    frmB.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                    frmB.Dock = DockStyle.Fill;
                    frmB.Show();
                    break;

                case 2:
                    pnlMain.Controls.Clear();
                    frmStoreIn_update frmS = new frmStoreIn_update();
                    frmS.TopLevel = false;
                    pnlMain.Controls.Add(frmS);
                    frmS.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                    frmS.Dock = DockStyle.Fill;
                    frmS.Show();
                    break;

                case 3:
                    pnlMain.Controls.Clear();
                    frmCustomer_update frmC = new frmCustomer_update();
                    frmC.TopLevel = false;
                    pnlMain.Controls.Add(frmC);
                    frmC.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                    frmC.Dock = DockStyle.Fill;
                    frmC.Show();
                    break;

                case 4:
                    pnlMain.Controls.Clear();
                    frmProviders_update frmPs = new frmProviders_update();
                    frmPs.TopLevel = false;
                    pnlMain.Controls.Add(frmPs);
                    frmPs.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                    frmPs.Dock = DockStyle.Fill;
                    frmPs.Show();
                    break;

                case 5:
                    pnlMain.Controls.Clear();
                    frmPersonnel_update frmPl = new frmPersonnel_update();
                    frmPl.TopLevel = false;
                    pnlMain.Controls.Add(frmPl);
                    frmPl.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                    frmPl.Dock = DockStyle.Fill;
                    frmPl.Show();
                    break;

                default:
                    break;
            }
        }
Пример #2
0
        private void dgvMenu_child_admin_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            switch (e.RowIndex)
            {
            case 0:
                pnlMain.Controls.Clear();
                frmProduct_update frmP = new frmProduct_update();
                frmP.TopLevel = false;
                pnlMain.Controls.Add(frmP);
                frmP.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                frmP.Dock            = DockStyle.Fill;
                frmP.Show();
                break;

            case 1:
                pnlMain.Controls.Clear();
                frmBill_update frmB = new frmBill_update();
                frmB.TopLevel = false;
                pnlMain.Controls.Add(frmB);
                frmB.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                frmB.Dock            = DockStyle.Fill;
                frmB.Show();
                break;

            case 2:
                pnlMain.Controls.Clear();
                frmStoreIn_update frmS = new frmStoreIn_update();
                frmS.TopLevel = false;
                pnlMain.Controls.Add(frmS);
                frmS.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                frmS.Dock            = DockStyle.Fill;
                frmS.Show();
                break;

            case 3:
                pnlMain.Controls.Clear();
                frmCustomer_update frmC = new frmCustomer_update();
                frmC.TopLevel = false;
                pnlMain.Controls.Add(frmC);
                frmC.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                frmC.Dock            = DockStyle.Fill;
                frmC.Show();
                break;

            case 4:
                pnlMain.Controls.Clear();
                frmProviders_update frmPs = new frmProviders_update();
                frmPs.TopLevel = false;
                pnlMain.Controls.Add(frmPs);
                frmPs.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                frmPs.Dock            = DockStyle.Fill;
                frmPs.Show();
                break;

            case 5:
                pnlMain.Controls.Clear();
                frmPersonnel_update frmPl = new frmPersonnel_update();
                frmPl.TopLevel = false;
                pnlMain.Controls.Add(frmPl);
                frmPl.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                frmPl.Dock            = DockStyle.Fill;
                frmPl.Show();
                break;

            default:
                break;
            }
        }