Beispiel #1
0
        /// <summary>
        /// 根据函数名称实例化窗体
        /// </summary>
        public void InstanceWorkForm()
        {
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }
            FrmJCSQ   frmjcsq   = null;
            FrmJCBWSZ frmjcbwsz = null;
            FrmYGXX   frmjybs   = null;
            FrmJCSQBW frmjcsqbw = null;

            switch (_functionName)
            {
            case "Fun_Ts_zyys_jcsq":
                frmjcsq = new FrmJCSQ(_currentUser.UserID, _currentDept.DeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frmjcsq.MdiParent = _mdiParent;
                }
                frmjcsq.BringToFront();
                frmjcsq.ShowDialog();
                break;

            case "Fun_Ts_zyys_jcsqbw":
                frmjcsqbw = new FrmJCSQBW(_currentUser.UserID, _currentDept.DeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frmjcsqbw.MdiParent = _mdiParent;
                }
                frmjcsqbw.BringToFront();
                frmjcsqbw.ShowDialog();
                break;

            //增加检查部位设置
            //Modify By lwl 2011-09-13
            case "Fun_Ts_zyys_jcbwsz":
                frmjcbwsz = new FrmJCBWSZ();
                if (_mdiParent != null)
                {
                    frmjcbwsz.MdiParent = _mdiParent;
                }
                frmjcbwsz.BringToFront();
                frmjcbwsz.Show();
                break;

            case "Fun_Ts_zyys_Jwbssz":
                frmjybs = new FrmYGXX();
                if (_mdiParent != null)
                {
                    frmjybs.MdiParent = _mdiParent;
                }
                frmjybs.BringToFront();
                frmjybs.Show();
                break;

            default:
                throw new Exception("引出函数名错误!");
            }
        }
Beispiel #2
0
        /// <summary>
        /// 返回一个FORM对象
        /// </summary>
        /// <returns></returns>
        public object GetObject()
        {
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }
            Form      frm       = new Form();
            FrmJCSQ   frmjcsq   = null;
            FrmJCBWSZ frmjcbwsz = null;
            FrmYGXX   frmjybs   = null;
            FrmJCSQBW frmjcsqbw = null;

            switch (_functionName)
            {
            case "Fun_Ts_zyys_jcsq":
                if (_communicateValue != null)
                {
                    frmjcsq = new FrmJCSQ(_currentUser.UserID, _currentDept.DeptId, _chineseName, _communicateValue);
                }
                else
                {
                    frmjcsq = new FrmJCSQ(_currentUser.UserID, _currentDept.DeptId, _chineseName);
                }

                if (_mdiParent != null)
                {
                    frmjcsq.MdiParent = _mdiParent;
                }
                frm = frmjcsq;
                break;

            case "Fun_Ts_zyys_jcsqbw":
                if (_communicateValue != null)
                {
                    frmjcsqbw = new FrmJCSQBW(_currentUser.UserID, _currentDept.DeptId, _chineseName, _communicateValue);
                }
                else
                {
                    frmjcsqbw = new FrmJCSQBW(_currentUser.UserID, _currentDept.DeptId, _chineseName);
                }

                if (_mdiParent != null)
                {
                    frmjcsqbw.MdiParent = _mdiParent;
                }
                frm = frmjcsqbw;
                break;


            //增加检查部位设置
            //Modify By lwl 2011-09-13
            case "Fun_Ts_zyys_jcbwsz":
                frmjcbwsz = new FrmJCBWSZ();
                if (_mdiParent != null)
                {
                    frmjcbwsz.MdiParent = _mdiParent;
                }
                // ff = frmjcbwsz;
                break;

            case "Fun_Ts_zyys_Jwbssz":
                frmjybs = new FrmYGXX();
                if (_mdiParent != null)
                {
                    frmjybs.MdiParent = _mdiParent;
                }
                break;

            default:
                throw new Exception("引出函数名称错误!");
            }
            return(frm);
        }