コード例 #1
0
ファイル: left.aspx.cs プロジェクト: liu4434004/EHR2
        /// <summary>
        /// 绑定子菜单事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void LeftMenu_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            sys_ModuleTable s_Mt = (sys_ModuleTable)e.Item.DataItem;

            QueryParam qp = new QueryParam();

            qp.Orderfld  = " M_OrderLevel ";
            qp.OrderType = 0;
            qp.Where     = string.Format("Where M_Close=0 and M_ParentID ={0}", s_Mt.ModuleID);
            int       RecordCount = 0;
            ArrayList lst         = BusinessFacade.sys_ModuleList(qp, out RecordCount);

            BusinessFacade.Remove_MenuNoPermission(lst);
            if (lst.Count > 0)
            {
                Repeater LeftSubID = (Repeater)e.Item.FindControl("LeftMenu_Sub");
                LeftSubID.DataSource = lst;
                LeftSubID.DataBind();
            }
            else
            {
                e.Item.Visible = false;
            }
        }