/// <summary> /// 根据函数名称实例化窗体 /// </summary> public void InstanceWorkForm() { if (_functionName == "") { throw new Exception("引出函数名不能为空!"); } FrmSSApply frmSSApply = null; FrmSSQuery frmSSQuery = null; FrmTssSh frmtssh = null; switch (_functionName) { case "Fun_Ts_zyys_sssq": frmSSApply = new FrmSSApply(_currentUser.UserID, _currentDept.DeptId, _chineseName); if (_mdiParent != null) { frmSSApply.MdiParent = _mdiParent; } frmSSApply.BringToFront(); frmSSApply.ShowDialog(); break; case "Fun_Ts_zyys_sscx": frmSSQuery = new FrmSSQuery(_currentUser.UserID, _currentDept.DeptId, _chineseName); if (_mdiParent != null) { frmSSQuery.MdiParent = _mdiParent; } frmSSQuery.BringToFront(); frmSSQuery.ShowDialog(); break; case "Fun_Ts_zyys_ssapcx": frmSSQuery = new FrmSSQuery(_currentUser.UserID, _currentDept.DeptId, _chineseName); if (_mdiParent != null) { frmSSQuery.MdiParent = _mdiParent; } frmSSQuery.WindowState = FormWindowState.Maximized; frmSSQuery.BringToFront(); frmSSQuery.Show(); break; case "Fun_Ts_zyys_tssssh": frmtssh = new FrmTssSh(); if (_mdiParent != null) { frmtssh.MdiParent = _mdiParent; } frmtssh.WindowState = FormWindowState.Maximized; frmtssh.BringToFront(); frmtssh.Show(); break; default: throw new Exception("引出函数名错误!"); } }
/// <summary> /// 返回一个FORM对象 /// </summary> /// <returns></returns> public object GetObject() { if (_functionName == "") { throw new Exception("引出函数名不能为空!"); } FrmSSApply frmSSApply = null; FrmSSQuery frmSSQuery = null; Form ff = new Form(); switch (_functionName) { case "Fun_Ts_zyys_sssq": if (_communicateValue != null) { frmSSApply = new FrmSSApply(_currentUser.UserID, _currentDept.DeptId, _chineseName, _communicateValue); } else { frmSSApply = new FrmSSApply(_currentUser.UserID, _currentDept.DeptId, _chineseName); } if (_mdiParent != null) { frmSSApply.MdiParent = _mdiParent; } ff = frmSSApply; break; //add by zouchihua 2013-8-28 手术申请查询 case "Fun_Ts_zyys_sssq_cx": if (_communicateValue != null) { frmSSApply = new FrmSSApply(_currentUser.UserID, _currentDept.DeptId, _chineseName, _communicateValue); } else { frmSSApply = new FrmSSApply(_currentUser.UserID, _currentDept.DeptId, _chineseName); } frmSSApply._ck = true; if (_mdiParent != null) { frmSSApply.MdiParent = _mdiParent; } ff = frmSSApply; break; case "Fun_Ts_zyys_sscx": if (_communicateValue != null) { frmSSQuery = new FrmSSQuery(_currentUser.UserID, _currentDept.DeptId, _chineseName, _communicateValue); } else { frmSSQuery = new FrmSSQuery(_currentUser.UserID, _currentDept.DeptId, _chineseName); } if (_mdiParent != null) { frmSSQuery.MdiParent = _mdiParent; } ff = frmSSQuery; break; case "Fun_Ts_zyys_ssapcx": frmSSQuery = new FrmSSQuery(_currentUser.UserID, _currentDept.DeptId, _chineseName); if (_mdiParent != null) { frmSSQuery.MdiParent = _mdiParent; } ff = frmSSQuery; break; case "Fun_Ts_zyys_sssq_hs": //这个引出函数仅给护士开医嘱使用 Add By Tany 2007-09-20 frmSSApply = new FrmSSApply(_currentUser.UserID, _currentDept.DeptId, _chineseName, true, _communicateValue); if (_mdiParent != null) { frmSSApply.MdiParent = _mdiParent; } ff = frmSSApply; break; case "Fun_Ts_zyys_sssq_cp": //这个引出函数仅给临床路径使用 Add By Tany 2012-09-28 frmSSApply = new FrmSSApply(_currentUser.UserID, _currentDept.DeptId, _chineseName, 1, _communicateValue); if (_mdiParent != null) { frmSSApply.MdiParent = _mdiParent; } ff = frmSSApply; break; case "Fun_Ts_zyys_tssssh": FrmTssSh frmtssh = new FrmTssSh(); if (_mdiParent != null) { frmtssh.MdiParent = _mdiParent; } frmtssh.WindowState = FormWindowState.Maximized; frmtssh.BringToFront(); frmtssh.Show(); ff = frmtssh; break; default: throw new Exception("引出函数名称错误!"); } return(ff); }