예제 #1
0
        /// <summary>
        /// 获取设置列表
        /// </summary>
        /// <param name="filter">筛选条件</param>
        /// <returns></returns>
        /// <remarks>2016-02-18 朱成果 创建</remarks>
        public override Pager <CBQJTProductImei> GetList(ParProductImeiFilter filter)
        {
            Pager <CBQJTProductImei> pager = new Pager <CBQJTProductImei>();

            pager.CurrentPage = filter.Id;
            pager.PageSize    = filter.PageSize;
            string from = @"QJTProductImei qt
                                        left outer join PdCategory  pd
                                        on qt.productcategorysysno=pd.sysno
                                        left outer join PdProduct pdt
                                        on pdt.sysno=qt.productsysno
                                        left outer join syuser su1
                                        on su1.sysno=qt.createdby
                                        left outer join syuser su2
                                        on su2.sysno=qt.lastupdateby";

            string where = "1=1";
            System.Collections.ArrayList arrlst = new System.Collections.ArrayList();
            if (filter.IsUseCategory.HasValue)
            {
                where += " and qt.IsUseCategory=@IsUseCategory";
                arrlst.Add(filter.IsUseCategory.Value);
            }
            pager.TotalRows = Context.Select <int>("count(0)")
                              .From(from)
                              .Where(where)
                              .Parameters(arrlst)
                              .QuerySingle();

            pager.Rows = Context.Select <CBQJTProductImei>(@"qt.*,
                                                            pd.categoryname as ProductCategoryName,
                                                            pdt.easname as ProductName,
                                                            su1.username as CreateUserName,
                                                            su2.username as UpdateUserName")
                         .From(from)
                         .Where(where)
                         .Parameters(arrlst)
                         .Paging(filter.Id, filter.PageSize)
                         .OrderBy("qt.sysno desc")
                         .QueryMany();
            return(pager);
        }
예제 #2
0
 /// <summary>
 /// 获取设置列表
 /// </summary>
 /// <param name="filter">筛选条件</param>
 /// <returns></returns>
 /// <remarks>2016-02-18 朱成果 创建</remarks>
 public abstract Pager <CBQJTProductImei> GetList(ParProductImeiFilter filter);
예제 #3
0
 /// <summary>
 /// 获取设置列表
 /// </summary>
 /// <param name="filter">筛选条件</param>
 /// <returns></returns>
 /// <remarks>2016-02-18 朱成果 创建</remarks>
 public Pager <CBQJTProductImei> GetList(ParProductImeiFilter filter)
 {
     return(IQJTProductImeiDao.Instance.GetList(filter));
 }