/// <summary> /// 获取要显示的字段 /// </summary> /// <param name="handle"></param> /// <param name="propertys"></param> /// <returns></returns> private List <BQLParamHandle> GetParam(BQLTableHandle handle, ScopeList lstScope) { List <BQLParamHandle> lstParams = lstScope.GetShowProperty(handle); return(lstParams); }
/// <summary> /// 获取本次查询需要显示的字段集合 /// </summary> /// <param name="lstScope">范围查询集合</param> /// <returns></returns> private static string GetSelectParams(ScopeList lstScope) { if (lstScope == null) { return(AllParamNames); } StringBuilder ret = new StringBuilder(); BQLEntityTableHandle table = CurEntityInfo.DBInfo.FindTable(typeof(T)); if (CommonMethods.IsNull(table)) { CurEntityInfo.DBInfo.ThrowNotFondTable(typeof(T)); } List <BQLParamHandle> propertyNames = lstScope.GetShowProperty(table); if (propertyNames.Count > 0) { foreach (BQLParamHandle property in propertyNames) { BQLEntityParamHandle eproperty = property as BQLEntityParamHandle; if (CommonMethods.IsNull(eproperty)) { continue; } EntityPropertyInfo info = eproperty.PInfo; if (info != null) { ret.Append(CurEntityInfo.DBInfo.CurrentDbAdapter.FormatParam(info.ParamName) + ","); } } } else { foreach (EntityPropertyInfo info in CurEntityInfo.PropertyInfo) { if (info != null) { ret.Append(CurEntityInfo.DBInfo.CurrentDbAdapter.FormatParam(info.ParamName) + ","); } } } if (ret.Length > 0) { return(ret.ToString(0, ret.Length - 1)); } return(AllParamNames); }