Example #1
0
        /// <summary>
        /// 动态夹杂着子系统模块,超声科
        /// </summary>
        private void BuildStruct()//动态加载子系统模块
        {
            if (GetConfig.SystemType.ToUpper() == "REGISTER")
            {
                BuildStructPacs();
            }
            else
            {
                BSystemFun BSysFun = new BSystemFun();
                MSystemFun MsysFun = new MSystemFun();

                DataTable       dt    = new DataTable();
                SIS_Model.MUser muser = (SIS_Model.MUser)iUser;

                switch (muser.DOCTOR_ROLE)
                {
                case "1":
                    dt = BSysFun.GetList(" MODEL_CLASS='1' AND UP_MODEL_ID=0 AND MODEL_NAME ='检查登记' ORDER BY SORT_FLAG ");
                    break;

                case "2":
                    dt = BSysFun.GetList(" MODEL_CLASS='1' AND UP_MODEL_ID=0 ORDER BY SORT_FLAG ");
                    break;
                }
                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        frmDockForm tsl = new frmDockForm();
                        tsl.DockHandler.GetPersistStringCallback = null;
                        tsl.DockHandler.PersistString            = dt.Rows[i]["MODEL_ID"].ToString();
                        tsl.Name = dt.Rows[i]["MODEL_ID"].ToString();//将目录ID设置为名称
                        tsl.Tag  = "SIS.comm.ToolboxPanel";
                        tsl.Text = dt.Rows[i]["MODEL_NAME"].ToString();
                        if (dt.Rows[i]["IMAGE_ADDRESS"].ToString() != "")
                        {
                            tsl.Icon = new Icon(Application.StartupPath + "\\images\\" + dt.Rows[i]["IMAGE_ADDRESS"].ToString());
                        }
                        tsl.p = this.p_Sub;
                        DockForm df = new DockForm();
                        df.frmDock = tsl;
                        df.isShow  = false;
                        this.frmDockList.Add(df);
                    }
                }
            }
        }