private void AddModelTwo_Load(object sender, EventArgs e) { dt = BSysFun.GetList(" MODEL_CLASS='1' ORDER BY MODEL_ID "); GetClassTwoModel(); BindClassOne(); this.btnFunName.Text = this.Text.ToString(); GvFunClassTwo.ReadOnly = true; }
private void BindSystemName()//绑定一级模块名称 { DataTable dt = BSysFun.GetList(" MODEL_CLASS='1' "); DataRow dr = dt.NewRow(); dt.Rows.InsertAt(dr, 0); dr[0] = 0; if (dt.Rows.Count > 0) { this.CbSystemName.DataSource = dt.DefaultView; this.CbSystemName.DisplayMember = "MODEL_NAME"; this.CbSystemName.ValueMember = "MODEL_ID"; } }
/// <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); } } } }
/// <summary> /// 获取三级菜单 /// </summary> /// <param name="id">模型ID</param> /// <param name="isCreate">是否创建标志</param> /// <returns></returns> public bool GetThreeModel(int id, bool isCreate) { bool isHas = false; System.Data.DataTable dt_Three = BSysFun.GetList(" MODEL_CLASS='3' and UP_MODEL_ID=" + id + " ORDER BY SORT_FLAG"); if (dt_Three.Rows.Count > 0) { isHas = true; if (isCreate) { for (int i = 0; i < dt_Three.Rows.Count; i++) { NewButton(dt_Three.Rows[i], this.p_Three, ref this.y_Three); } } } return(isHas); }
private void GetClassThreeModel()//获取第三级模块 { DataTable dt = new DataTable(); dt = BSysFun.GetList(3); GvFunClassThree.DataSource = dt; if (dt.Rows.Count > 0) { this.GvFunClassThree.Visible = true; this.gb_PromptInfo.Visible = false; } else { this.GvFunClassThree.Visible = false; this.gb_PromptInfo.Visible = true; } rowcount = this.GvFunClassThree.Rows.Count + 1;; }
private void GetClassOneModel()//获取第一级模块 { dt = BSysFun.GetList(" MODEL_CLASS = '1' ORDER BY MODEL_ID"); this.GvFunClassOne.DataSource = dt; if (dt.Rows.Count > 0) { this.GvFunClassOne.Visible = true; this.gb_PromptInfo.Visible = false; } else { this.GvFunClassOne.Visible = false; this.gb_PromptInfo.Visible = true; } rowcount = GvFunClassOne.Rows.Count + 1; }
private void GetClassOneModel()//获取第一级模块 { try { dt = BSysFun.GetList("MODEL_ID = 1 and Up_MODEL_ID = 0");; if (dt.Rows.Count > 0) { this.GvFunClassOne.DataSource = dt.DefaultView; } for (int i = 0; i < dt.Rows.Count; i++) { GvFunClassOne.Rows[i].ReadOnly = true; } }catch (Exception ex) { MessageBox.Show(ex.Message); } }