示例#1
0
        /// <summary>
        /// 返回一个FORM对象
        /// </summary>
        /// <returns></returns>
        public object GetObject()
        {
            //if(IsSsDept()==false)
            //{
            //    return null;
            //}
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }
            FrmShbl     frmShbl = null;
            FrmShblJcwh jcwh    = null;

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

                if (_mdiParent != null)
                {
                    frmShbl.MdiParent = _mdiParent;
                }

                break;

            case "Fun_Ts_ss_shbl_jcsswh":
                jcwh             = new FrmShblJcwh();
                jcwh.WindowState = FormWindowState.Maximized;
                if (_mdiParent != null)
                {
                    jcwh.MdiParent = _mdiParent;
                }
                break;

            default:
                throw new Exception("引出函数名称错误!");
            }
            return(frmShbl);
        }
示例#2
0
        /// <summary>
        /// 根据函数名称实例化窗体
        /// </summary>
        public void InstanceWorkForm()
        {
            //if(IsSsDept()==false)
            //{
            //    return;
            //}
            if (_functionName == "")
            {
                throw new Exception("引出函数名不能为空!");
            }
            FrmShbl     frmShbl = null;
            FrmShblJcwh jcwh    = null;

            switch (_functionName)
            {
            case "Fun_Ts_ss_shbl":
                frmShbl = new FrmShbl(_currentUser.UserID, _currentDept.DeptId, _chineseName);
                if (_mdiParent != null)
                {
                    frmShbl.MdiParent = _mdiParent;
                }
                frmShbl.WindowState = FormWindowState.Maximized;
                frmShbl.BringToFront();
                frmShbl.ShowDialog();
                break;

            case "Fun_Ts_ss_shbl_jcsswh":
                jcwh             = new FrmShblJcwh();
                jcwh.WindowState = FormWindowState.Maximized;
                jcwh.BringToFront();
                jcwh.ShowDialog();
                break;

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