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

            string sql;


            GWMHIS.BussinessLogicLayer.Classes.User     currentUser  = new GWMHIS.BussinessLogicLayer.Classes.User(_currentUserId);
            GWMHIS.BussinessLogicLayer.Classes.Deptment currentDept  = new GWMHIS.BussinessLogicLayer.Classes.Deptment(_currentDeptId);
            GWMHIS.BussinessLogicLayer.Classes.Group    currentGroup = new GWMHIS.BussinessLogicLayer.Classes.Group();


            switch (_functionName)
            {
            case "Fxc_HisReport":
                fMain = new FrmReport(currentUser, currentDept);    //(_currentUserId, _currentDeptId, _chineseName);
                if (_mdiParent != null)
                {
                    fMain.MdiParent = _mdiParent;
                }
                fMain.WindowState = FormWindowState.Maximized;
                fMain.BringToFront();
                fMain.Show();
                break;

            case "Fxc_HisReportShow":
                fMain = new FrmReportShow(currentUser, currentDept, currentUser.GetGroupInfo());    //(_currentUserId, _currentDeptId, _chineseName);
                if (_mdiParent != null)
                {
                    fMain.MdiParent = _mdiParent;
                }
                fMain.WindowState = FormWindowState.Maximized;
                fMain.BringToFront();
                fMain.Show();
                break;

            case "Fun_ReportPermission":
                fMain = new FrmReportGroup();    // frmReportPermissionManager();
                if (_mdiParent != null)
                {
                    fMain.MdiParent = _mdiParent;
                }
                fMain.WindowState = FormWindowState.Maximized;
                fMain.BringToFront();
                fMain.Show();
                break;

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