/// <summary> /// 绑定CLS /// </summary> public static void BindCLS(CheckedListBoxControl p_CHK, string p_TableName, string p_FieldName) { string sql = string.Empty; sql = "SELECT CLSNM FROM Data_CLS WHERE CLSListID IN(SELECT ID FROM Data_CLSList WHERE 1=1 "; sql += " AND CLSA=" + SysString.ToDBString(p_TableName) + " AND CLSB=" + SysString.ToDBString(p_FieldName) + ")"; sql += " ORDER BY CLSIDC,CLSNM"; p_CHK.DataSource = SysUtils.Fill(sql); p_CHK.DisplayMember = "CLSNM"; p_CHK.ValueMember = "CLSNM"; p_CHK.Show(); }