BuildLists 構造右邊信息數據
/// <summary>
/// 構造信息集合
/// </summary>
/// <param name="queryArgs"></param>
/// <param name="isFull"></param>
/// <returns></returns>
protected override IList BuildLists(bool isFull)
{
TCompanIEs list = null;
try
{
ATCompany objDAL = (ATCompany)DAFactory.CreateDA(typeof(ATCompany));
if (!isFull) objDAL.PageArgs = base.PageArgs;
//得到所有字段
string[] fields = GetInfoFIElds();
QueryBuilder qb = new QueryBuilder();
qb.Append(QueryRelation.And, QueryCompare.Equal, TCompany._BaseType, baseType.ToString("D"));
qb.Append(QueryRelation.And, QueryCompare.Equal, TCompany._IsDelete, 0);
qb.Append(QueryRelation.And, QueryCompare.Equal, TCompany._ParentId, ContextArgs.Instance.CompanyId);
if (QueryArgs.TypeId != 0)
{
qb.Append(QueryRelation.And, QueryCompare.Equal, TCompany._CompanyTypeId, QueryArgs.TypeId);
}
//加上查詢的條件
qb += QueryArgs.QueryBuilder;
list = objDAL.Select(qb, QueryArgs.Order, fIElds);
if (!isFull) base.PageArgs = objDAL.PageArgs;
objDAL.Dispose();
objDAL = null;
}
catch (System.Exception e)
{
Utility.ShowErrorMessage(e.Message);
}
return list;
}