Пример #1
0
        /// <summary>
        /// 根据函数名称实例化窗体
        /// </summary>
        public void InstanceXcForm()
        {
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }

            switch (_functionName)
            {
            case "Fxc_FrmRegister":
                FrmRegister frmreg = new FrmRegister(_currentUserId, _currentDeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frmreg.MdiParent = _mdiParent;
                }
                frmreg.WindowState = FormWindowState.Maximized;
                frmreg.Show();
                break;

            case "Fxc_FrmPresManager_Charge":
                FrmPresManager frmpresC = new FrmPresManager(_currentUserId, _currentDeptId, _chineseName, 0);
                if (_mdiParent != null)
                {
                    frmpresC.MdiParent = _mdiParent;
                }
                frmpresC.WindowState = FormWindowState.Maximized;
                frmpresC.Show();
                break;

            case "Fxc_FrmPresManager":

                FrmPresManager frmpres = new FrmPresManager(_currentUserId, _currentDeptId, _chineseName, 1);
                if (_mdiParent != null)
                {
                    frmpres.MdiParent = _mdiParent;
                }
                frmpres.WindowState = FormWindowState.Maximized;
                frmpres.Show();
                break;

            case "Fxc_FrmPresManager_IsOper":
                FrmPresManager frmpresO = new FrmPresManager(_currentUserId, _currentDeptId, _chineseName, 1, true);
                if (_mdiParent != null)
                {
                    frmpresO.MdiParent = _mdiParent;
                }
                frmpresO.WindowState = FormWindowState.Maximized;
                frmpresO.Show();
                break;

            case "Fxc_FrmCharge":
                FrmCharge frmcharge = new FrmCharge();
                frmcharge.currentDeptId = _currentDeptId;
                frmcharge.currentUserId = _currentUserId;
                frmcharge.chineseName   = _chineseName;

                if (_mdiParent != null)
                {
                    frmcharge.MdiParent = _mdiParent;
                }
                frmcharge.WindowState = FormWindowState.Maximized;
                frmcharge.Show();

                break;

            case "Fxc_FrmAccount":
                FrmAccount frmaccount = new FrmAccount(_currentUserId, _currentDeptId, _chineseName);

                if (_mdiParent != null)
                {
                    frmaccount.MdiParent = _mdiParent;
                }
                frmaccount.WindowState = FormWindowState.Maximized;
                frmaccount.Show();
                break;

            case "Fxc_FrmCost":
                FrmCost frmCost = new FrmCost();
                frmCost.currentDeptId = _currentDeptId;
                frmCost.currentUserId = _currentUserId;
                frmCost.chineseName   = _chineseName;
                if (_mdiParent != null)
                {
                    frmCost.MdiParent = _mdiParent;
                }
                frmCost.WindowState = FormWindowState.Maximized;
                frmCost.Show();
                break;

            case "Fxc_FrmTicketManage":
                FrmTicketManage frmtm = new FrmTicketManage();
                frmtm.currentDeptId = _currentDeptId;
                frmtm.currentUserId = _currentUserId;
                frmtm.chineseName   = _chineseName;
                if (_mdiParent != null)
                {
                    frmtm.MdiParent = _mdiParent;
                }
                frmtm.WindowState = FormWindowState.Maximized;
                frmtm.Show();
                break;

            case "Fxc_FrmCostList":
                FrmCostList frmcl = new FrmCostList();
                frmcl.currentDeptId = _currentDeptId;
                frmcl.currentUserId = _currentUserId;
                frmcl.chineseName   = _chineseName;
                if (_mdiParent != null)
                {
                    frmcl.MdiParent = _mdiParent;
                }
                frmcl.WindowState = FormWindowState.Maximized;
                frmcl.Show();
                break;

            case "Fxc_FrmItemList":
                FrmItemList frmil = null;
                frmil = new FrmItemList(_currentUserId, _currentDeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frmil.MdiParent = _mdiParent;
                }
                frmil.WindowState = FormWindowState.Maximized;
                frmil.Show();
                break;

            case "Fxc_FrmDeptRpt":
                FrmDeptRpt frmdr = new FrmDeptRpt(_currentUserId, _currentDeptId, _chineseName);
                frmdr.type = 0;
                if (_mdiParent != null)
                {
                    frmdr.MdiParent = _mdiParent;
                }
                frmdr.WindowState = FormWindowState.Maximized;
                frmdr.Show();
                break;

            case "Fxc_FrmPresDeptRpt":
                FrmDeptRpt frmpresdr = new FrmDeptRpt(_currentUserId, _currentDeptId, _chineseName);
                frmpresdr.type = 1;
                if (_mdiParent != null)
                {
                    frmpresdr.MdiParent = _mdiParent;
                }
                frmpresdr.WindowState = FormWindowState.Maximized;
                frmpresdr.Show();
                break;

            case "Fxc_FrmPresDocRpt":
                FrmDeptRpt frmpresdr1 = new FrmDeptRpt(_currentUserId, _currentDeptId, _chineseName);
                frmpresdr1.type = 2;
                if (_mdiParent != null)
                {
                    frmpresdr1.MdiParent = _mdiParent;
                }
                frmpresdr1.WindowState = FormWindowState.Maximized;
                frmpresdr1.Show();
                break;

            case "Fxc_FrmRegister_NotCharge":
                FrmRegister frmreg1 = new FrmRegister(_currentUserId, _currentDeptId, _chineseName, false);
                if (_mdiParent != null)
                {
                    frmreg1.MdiParent = _mdiParent;
                }
                frmreg1.WindowState = FormWindowState.Maximized;
                frmreg1.Show();
                break;

            case "Fxc_FrmPatRpt":
                FrmPatientRpt frmpr = new FrmPatientRpt(_currentUserId, _currentDeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frmpr.MdiParent = _mdiParent;
                }
                frmpr.WindowState = FormWindowState.Maximized;
                frmpr.Show();
                break;

            case "Fxc_FrmDoc":
                FrmPresManager frmpres1 = new FrmPresManager(_currentUserId, _currentDeptId, _chineseName, 1);
                if (_mdiParent != null)
                {
                    frmpres1.MdiParent = _mdiParent;
                }
                frmpres1.WindowState = FormWindowState.Maximized;
                frmpres1.Show();
                break;

            case "Fxc_CostOverSee0":
                Form form = CostOverSee.UsualMethod.GetCostOverSeeForm(0, HIS.SYSTEM.Core.EntityConfig.WorkID);
                if (_mdiParent != null)
                {
                    form.MdiParent = _mdiParent;
                }
                form.WindowState = FormWindowState.Maximized;
                form.Show();
                break;

            case "Fxc_CostOverSee1":
                Form form1 = CostOverSee.UsualMethod.GetCostOverSeeForm(1, HIS.SYSTEM.Core.EntityConfig.WorkID);
                if (_mdiParent != null)
                {
                    form1.MdiParent = _mdiParent;
                }
                form1.WindowState = FormWindowState.Maximized;
                form1.Show();
                break;

            case "Fxc_FrmAllAccount":
                FrmAllAccount frmAllAccount = new FrmAllAccount(_currentUserId, _currentDeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frmAllAccount.MdiParent = _mdiParent;
                }
                frmAllAccount.WindowState = FormWindowState.Maximized;
                frmAllAccount.Show();
                break;

            case "Fxc_FrmClearPatData":
                FrmClearPatData frmCpd = new FrmClearPatData();
                frmCpd.currentDeptId = _currentDeptId;
                frmCpd.currentUserId = _currentUserId;
                frmCpd.chineseName   = _chineseName;

                if (_mdiParent != null)
                {
                    frmCpd.MdiParent = _mdiParent;
                }
                frmCpd.WindowState = FormWindowState.Maximized;
                frmCpd.Show();
                break;

            case "Fxc_FrmSetting":
                FrmSetting fs = new FrmSetting();
                fs.ShowDialog();
                break;

            case "Fxc_FrmTicketRpt":
                FrmTicketRpt ftr = new FrmTicketRpt(_currentUserId, _currentDeptId, _chineseName);
                if (_mdiParent != null)
                {
                    ftr.MdiParent = _mdiParent;
                }
                ftr.WindowState = FormWindowState.Maximized;
                ftr.Show();
                break;

            case "Fxc_FrmFeeRpt":
                FrmFeeRpt ffr = new FrmFeeRpt(_currentUserId, _currentDeptId, _chineseName);
                if (_mdiParent != null)
                {
                    ffr.MdiParent = _mdiParent;
                }
                ffr.WindowState = FormWindowState.Maximized;
                ffr.Show();
                break;

            case "Fun_ZY_InvoiceManager":
                FrmInvoiceManager frmInvoiceManager = new FrmInvoiceManager(_chineseName, _currentUserId);
                if (_mdiParent != null)
                {
                    frmInvoiceManager.MdiParent = _mdiParent;
                }
                frmInvoiceManager.WindowState = FormWindowState.Maximized;
                frmInvoiceManager.BringToFront();
                frmInvoiceManager.Show();
                break;

            case "Fxc_FrmStatDrugMessage":
                FrmStatDrugMessage frmSdm = new FrmStatDrugMessage(_currentUserId, _currentDeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frmSdm.MdiParent = _mdiParent;
                }
                frmSdm.WindowState = FormWindowState.Maximized;
                frmSdm.Show();
                break;

            case "Fxc_FrmStatDrugMessage_IsOper":
                FrmStatDrugMessage frmSdmO = new FrmStatDrugMessage(_currentUserId, _currentDeptId, _chineseName, true);
                if (_mdiParent != null)
                {
                    frmSdmO.MdiParent = _mdiParent;
                }
                frmSdmO.WindowState = FormWindowState.Maximized;
                frmSdmO.Show();
                break;

            case "Fxc_FrmCollectDrug":
                FrmCollectDrug frmColldrug = new FrmCollectDrug(_currentUserId, _currentDeptId, _chineseName, false);
                if (_mdiParent != null)
                {
                    frmColldrug.MdiParent = _mdiParent;
                }
                frmColldrug.WindowState = FormWindowState.Maximized;
                frmColldrug.Show();
                break;

            case "Fxc_FrmCollectDrug_IsOper":
                FrmCollectDrug frmColldrug0 = new FrmCollectDrug(_currentUserId, _currentDeptId, _chineseName, true);
                if (_mdiParent != null)
                {
                    frmColldrug0.MdiParent = _mdiParent;
                }
                frmColldrug0.WindowState = FormWindowState.Maximized;
                frmColldrug0.Show();
                break;

            case "Fxc_FrmPatientNum":
                FrmPatientNum frmPNum = new FrmPatientNum(_currentUserId, _currentDeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frmPNum.MdiParent = _mdiParent;
                }
                frmPNum.WindowState = FormWindowState.Maximized;
                frmPNum.Show();
                break;

            case "Fxc_FrmChargeRpt":
                FrmChargeRpt frmCRpt = new FrmChargeRpt(_currentUserId, _currentDeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frmCRpt.MdiParent = _mdiParent;
                }
                frmCRpt.WindowState = FormWindowState.Maximized;
                frmCRpt.Show();
                break;

            case "Fxc_FrmPatFeeRpt":
                FrmPatFeeRpt frmPatFr = new FrmPatFeeRpt(_currentUserId, _currentDeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frmPatFr.MdiParent = _mdiParent;
                }
                frmPatFr.WindowState = FormWindowState.Maximized;
                frmPatFr.Show();
                break;

            case "Fxc_FrmInPatientRpt":
                FrmInPatientRpt frminpatrpt = new FrmInPatientRpt(_currentUserId, _currentDeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frminpatrpt.MdiParent = _mdiParent;
                }
                frminpatrpt.WindowState = FormWindowState.Maximized;
                frminpatrpt.Show();
                break;

            case "Fxc_FrmOutPatientRpt":
                FrmOutPatientRpt frmoutpatrpt = new FrmOutPatientRpt(_currentUserId, _currentDeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frmoutpatrpt.MdiParent = _mdiParent;
                }
                frmoutpatrpt.WindowState = FormWindowState.Maximized;
                frmoutpatrpt.Show();
                break;

            default:
                throw new Exception("引出函数名称错误!");
            }
        }
Пример #2
0
 //打印住院发票,结算ID
 private void Print(int CostMasterID)
 {
     FrmCost.Print(CostMasterID);
 }