using Common.Model; using CoreEntity.Entity; using PublicLibrary.Model; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Text; using ZcPeng.PublicLibrary; namespace CoreEntity.DAL { public class TerminalDAL { public static IList getTerms() { #region 获取机构列表 DataTable dt = new DataTable(); string result; IList permss = new List(0); string commandText1 = //"select A.*" + //" from Mem_Terminaldoc as A " + //" where 1=1 " //+ " ORDER BY A.TerminalCode desc"; @" select Text as TerminalName,[Value] as TerminalCode,[Key] as TerminalDesc,cast(Id as varchar) as SourceTerminalKey,ParentId as ParentTerminalKey,SortKey as SourceTerminalSort from Mall..DataDictory b where b.ParentId IN (785,786) AND b.IsHide=0 "; bool success = DataAccess.GetValues(commandText1, ref dt, null, out result); #endregion if (dt != null && dt.Rows.Count > 0) { // 把DataTable转换为IList permss = ModelConvertHelper.ConvertToModel(dt); } return permss; } } }