WEB开发网
开发学院软件开发C语言 个人开发框架总结(二) 阅读

个人开发框架总结(二)

 2009-05-05 08:27:18 来源:WEB开发网   
核心提示: BuildLists 构造右边信息数据 /// <summary> /// 构造信息集合 /// </summary> /// <param name="queryArgs"></param> /// <param

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;
        }

上一页  1 2 3 4 5 6 7 8 9  下一页

Tags:个人 开发 框架

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接