Пример #1
0
        /// <summary>
        /// 加载功能列表
        /// </summary>
        private void LoadPermissionsTatal(string strPfid)
        {
            PermissionsTatalManage pslManage = new PermissionsTatalManage();
            //this.cblPermissionsTatal.DataSource = pslManage.Get(" Pf_id='" + strPfid + "' AND Pt_del = 0");
            StringBuilder strWhere = new StringBuilder();

            strWhere.Append(" 1=1");
            IList <MySqlParameter> parm = new List <MySqlParameter>();

            strWhere.Append(" and Pf_id=@strPfid AND Pt_del = 0 ");
            parm.Add(new MySqlParameter("@strPfid", strPfid));
            this.cblPermissionsTatal.DataSource     = pslManage.Get(strWhere.ToString(), parm);
            this.cblPermissionsTatal.DataTextField  = "Ptname";
            this.cblPermissionsTatal.DataValueField = "PtId";
            this.cblPermissionsTatal.DataBind();

            if (this.cblPermissionsTatal.Items.Count == 0)
            {
                this.lkPermissionsTatalEdit.Visible = true;
            }
        }