Exemplo n.º 1
0
        private void changePage(string page)
        {
            if (this.Form.Name == "frmAssets")
            {
                switch (page)
                {
                case "SNAssets":
                    this.Form.CloseDrawer();
                    //frmAssets frm = new frmAssets();
                    //Form.Show(frm, (obj,args) => {
                    //    LeftMenu lf = (LeftMenu)frm.Drawer;
                    //    changePage(lf.pagename); });
                    break;

                case "SNJieyong":
                    frmBorrowOrder frm1 = new frmBorrowOrder();
                    Form.Show(frm1, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm1.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "SNGuiHuan":
                    frmReturnOrder frm2 = new frmReturnOrder();
                    Form.Show(frm2, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm2.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "SNLingYong":
                    frmCollarOrder frm3 = new frmCollarOrder();
                    Form.Show(frm3, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm3.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "SNTuiKu":
                    frmRestoreOrder frm4 = new frmRestoreOrder();
                    Form.Show(frm4, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm4.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "SNDiaoBo":
                    frmTransferRowsSN frm5 = new frmTransferRowsSN();
                    Form.Show(frm5, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm5.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "SNWeiXiu":
                    frmRepairRowsSN frm6 = new frmRepairRowsSN();
                    Form.Show(frm6, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm6.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "SNBaoFei":
                    frmScrapRowsSN frm7 = new frmScrapRowsSN();
                    Form.Show(frm7, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm7.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "SNPanDian":
                    frmAssInventory frm8 = new frmAssInventory();
                    Form.Show(frm8, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm8.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "SNZiChanFenLei":
                    frmAssetsTypeRows frm9 = new frmAssetsTypeRows();
                    Form.Show(frm9, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm9.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "SNQuYu":
                    frmLocationRows frm10 = new frmLocationRows();
                    Form.Show(frm10, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm10.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "SNBuMen":
                    frmDepartment frm11 = new frmDepartment();
                    Form.Show(frm11, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm11.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "HaoCai":
                    frmConsumables frm12 = new frmConsumables();
                    Form.Show(frm12, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm12.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "ruku":
                    frmWarehouseReceipt frm13 = new frmWarehouseReceipt();
                    Form.Show(frm13, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm13.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "chuku":
                    frmOutboundOrder frm14 = new frmOutboundOrder();
                    Form.Show(frm14, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm14.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "DiaoBo":
                    frmTransferRows frm15 = new frmTransferRows();
                    Form.Show(frm15, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm15.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "pandian":
                    frmConInventory frm16 = new frmConInventory();
                    Form.Show(frm16, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm16.Drawer;
                        changePage(lf.pagename);
                    });
                    break;

                case "plPerson":
                    frmMessage frm17 = new frmMessage();
                    Form.Show(frm17, (obj, args) => {
                        LeftMenu lf = (LeftMenu)frm17.Drawer;
                        if (lf != null)
                        {
                            changePage(lf.pagename);
                        }
                        this.Form.CloseDrawer();
                    });
                    break;
                }
            }
            else
            {
                this.Form.Close();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 跳转到区域界面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SNQuYu_Press(object sender, EventArgs e)
        {
            frmLocationRows frm = new frmLocationRows();

            Form.Show(frm);
        }