예제 #1
0
        /// <summary>
        /// 返回一个FORM对象
        /// </summary>
        /// <returns></returns>
        public object GetObject()
        {
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }
            FrmYZGL frmyzgl = null;
            Form    f       = null;
            string  _hszd   = "";
            string  sSql;

            switch (_functionName)
            {
            case "Fun_Ts_zyys_yzgl":       //医生工作站医嘱函数
                if (_communicateValue != null)
                {
                    frmyzgl = new FrmYZGL(_currentUser.UserID, _currentDept.DeptId, _chineseName, _communicateValue);
                }
                if (_mdiParent != null)
                {
                    frmyzgl.MdiParent = _mdiParent;
                    //						frmyzgl.Show();
                }
                break;

            case "Fun_Ts_zyys_hszd":       //护士账单医嘱函数
                if (_communicateValue != null)
                {
                    frmyzgl = new FrmYZGL(_currentUser.UserID, _currentDept.DeptId, _chineseName, _functionName, _hszd, _communicateValue);
                }
                if (_mdiParent != null)
                {
                    frmyzgl.MdiParent = _mdiParent;
                    //						frmyzgl.Show();
                }
                break;

            case "Fun_Ts_zyys_hsyz":       //护士医嘱函数(长期、临时医嘱,长期、临时账单)
                if (_communicateValue != null)
                {
                    frmyzgl = new FrmYZGL(_currentUser.UserID, _currentDept.DeptId, _communicateValue);
                }
                if (_mdiParent != null)
                {
                    frmyzgl.MdiParent = _mdiParent;
                    //						frmyzgl.Show();
                }
                break;

            case "Fun_Ts_zyys_mzyz":        //手术麻醉医嘱函数
                if (_communicateValue != null)
                {
                    sSql    = _communicateValue[7].ToString();
                    frmyzgl = new FrmYZGL(_currentUser.UserID, _currentDept.DeptId, _chineseName, sSql, _communicateValue);
                }
                break;

            case "Fun_Ts_zyys_dlwh":
                f = new FrmYZDLList();
                if (_mdiParent != null)
                {
                    f.MdiParent = _mdiParent;
                    //						frmyzgl.Show();
                }
                return(f);

                break;

            case "Fun_Ts_ksssh":
                f = new Frmksssh();
                if (_mdiParent != null)
                {
                    f.MdiParent = _mdiParent;
                }
                break;

            case "Fun_Ts_SsYp":
                f = new FrmSsYp();
                if (_mdiParent != null)
                {
                    f.MdiParent = _mdiParent;
                }
                break;

            case "Fun_Ts_zyys_H7N9":
                f = new FormDoctorH7N9Maintain();
                if (_mdiParent != null)
                {
                    f.MdiParent = _mdiParent;
                }
                break;

            default:
                throw new Exception("引出函数名称错误!");
            }
            return(frmyzgl);
        }
예제 #2
0
        /// <summary>
        /// 根据函数名称实例化窗体
        /// </summary>
        public void InstanceWorkForm()
        {
            switch (_functionName)
            {
            case "Fun_Ts_zyys_dlwh":
                FrmYZDLList f = new FrmYZDLList();
                if (_mdiParent != null)
                {
                    f.MdiParent = _mdiParent;
                    //						frmyzgl.Show();
                }
                f.WindowState = FormWindowState.Maximized;
                f.Show();
                break;

            case "Fun_Ts_zyys_qxwh":
                FrmScheme frm = new FrmScheme();
                if (_mdiParent != null)
                {
                    frm.MdiParent = _mdiParent;
                    //						frmyzgl.Show();
                }
                frm.WindowState = FormWindowState.Maximized;
                frm.Show();
                break;

            case "Fun_Ts_zyys_qxmxwh":
                FrmSchemeRelation frmMx = new FrmSchemeRelation();
                if (_mdiParent != null)
                {
                    frmMx.MdiParent = _mdiParent;
                    //						frmyzgl.Show();
                }
                frmMx.WindowState = FormWindowState.Maximized;
                frmMx.Show();
                break;

            case "Fun_Ts_zyys_qxmxwh_ks":
                FrmSchemeRltDpt frmMxKs = new FrmSchemeRltDpt();
                if (_mdiParent != null)
                {
                    frmMxKs.MdiParent = _mdiParent;
                    //						frmyzgl.Show();
                }
                frmMxKs.WindowState = FormWindowState.Maximized;
                frmMxKs.Show();
                break;

            case "Fun_Ts_ksSpr":
                FrmKsSpr fm = new FrmKsSpr();
                if (_mdiParent != null)
                {
                    fm.MdiParent = _mdiParent;
                    //						frmyzgl.Show();
                }
                fm.WindowState = FormWindowState.Maximized;
                fm.Show();
                break;

            case "Fun_Ts_SsYp":
                FrmSsYp frmsy = new FrmSsYp();
                if (_mdiParent != null)
                {
                    frmsy.MdiParent = _mdiParent;
                }
                frmsy.WindowState = FormWindowState.Maximized;
                frmsy.Show();
                break;

            case "Fun_Ts_ksssh":
                Frmksssh fmksh = new Frmksssh();
                if (_mdiParent != null)
                {
                    fmksh.MdiParent = _mdiParent;
                }
                fmksh.WindowState = FormWindowState.Maximized;
                fmksh.Show();
                break;

            case "Fun_Ts_zyys_kjwdy":
                FrmKssSqbPrint frmKjw = new FrmKssSqbPrint();
                if (_mdiParent != null)
                {
                    frmKjw.MdiParent = _mdiParent;
                }
                frmKjw.WindowState = FormWindowState.Maximized;
                frmKjw.Show();
                break;

            case "Fun_Ts_zyys_tsksShr":
                FrmSpecialKssChk frmTsksShr = new FrmSpecialKssChk();
                if (_mdiParent != null)
                {
                    frmTsksShr.MdiParent = _mdiParent;
                }
                frmTsksShr.WindowState = FormWindowState.Maximized;
                frmTsksShr.Show();
                break;

            case "Fun_Ts_zyys_tsksSh":
                FrmSpecialKssChkSh frmTsksSh = new FrmSpecialKssChkSh();
                if (_mdiParent != null)
                {
                    frmTsksSh.MdiParent = _mdiParent;
                }
                frmTsksSh.WindowState = FormWindowState.Maximized;
                frmTsksSh.Show();
                break;

            case "Fun_Ts_zyys_KssYymd":
                FrmKssDetailMemo fKssYymd = new FrmKssDetailMemo();
                if (_mdiParent != null)
                {
                    fKssYymd.MdiParent = _mdiParent;
                }
                fKssYymd.WindowState = FormWindowState.Maximized;
                fKssYymd.Show();
                break;

            case "Fun_Ts_zyys_QueryDisease":
                FrmQueryDisease fDiseaseQuery = new FrmQueryDisease();
                if (_mdiParent != null)
                {
                    fDiseaseQuery.MdiParent = _mdiParent;
                }
                fDiseaseQuery.WindowState = FormWindowState.Maximized;
                fDiseaseQuery.Show();
                break;

            case "Fun_Ts_zyys_KssItem":
                FrmKssItem fKssItem = new FrmKssItem();
                if (_mdiParent != null)
                {
                    fKssItem.MdiParent = _mdiParent;
                }
                fKssItem.WindowState = FormWindowState.Maximized;
                fKssItem.Show();
                break;

            case "Fun_Ts_zyys_H7N9":
                FormDoctorH7N9Maintain fDoctorH7N9Maintain = new FormDoctorH7N9Maintain();
                if (_mdiParent != null)
                {
                    fDoctorH7N9Maintain.MdiParent = _mdiParent;
                }
                fDoctorH7N9Maintain.WindowState = FormWindowState.Maximized;
                fDoctorH7N9Maintain.Show();
                break;
            }
        }