/// <summary>
        /// 根据条件产品编号分页
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="ProId"></param>
        /// <returns></returns>
        public static Model.Jie.PageList TiaoJianProidPageListProbaict(int pageIndex, int pageSize, string ProId)
        {
            Model.Jie.PageList list = new Model.Jie.PageList();
            var obj = from p in entity.Probaict
                      where p.ProId == ProId
                      orderby p.ProId
                      select new
            {
                ProId      = p.ProId,
                ProName    = p.ProName,
                ProPrice   = p.ProPrice,
                PorGuiGe   = p.PorGuiGe,
                ProCId     = from pp in entity.ProbaictCatagory where p.ProCId == pp.ProCId select pp.ProCName,
                UnId       = from ppp in entity.Unit where p.UnId == ppp.UnId select ppp.UnName,
                CreateTime = p.CreateTime,
                IsDelete   = p.IsDelete,
                ProNumber  = p.ProNumber,
                ProJinhuo  = p.ProJinhuo,
                ProChuhuo  = p.ProChuhuo,
                ProBaosun  = p.ProBaosun,
                Remake     = p.Remake
            };

            list.DataList = obj.Skip((pageIndex - 1) * pageSize).Take(pageSize);
            int rows = entity.Probaict.Count();

            list.PageCount = rows % pageSize == 0 ? rows / pageSize : rows / pageSize + 1;
            return(list);
        }
Пример #2
0
        /// <summary>
        /// 分页查询Warehouse表所有数据
        /// 状态为2:审核通过
        /// </summary>
        /// <returns></returns>
        public static Model.Jie.PageList GetPageListDeliver2(int pageIndex, int pageSize)
        {
            CangChuEntities1 entity = new CangChuEntities1();

            Model.Jie.PageList list = new Model.Jie.PageList();
            var obj = from p in entity.Deliver
                      where p.AudiId == 2
                      orderby p.DeliId
                      select new
            {
                DeliId     = p.DeliId,
                DeliType   = p.DeliType,
                DeliaOrder = p.DeliaOrder,
                DelDate    = p.DelDate,
                CusId      = from pp in entity.Customer where p.CusId == pp.CusId select pp.CusName,
                DeliPerson = p.DeliPerson,
                CreateTime = p.CreateTime,
                IsDelete   = p.IsDelete,
                Remake     = p.Remake,
                AudiId     = from ppp in entity.Auditing where p.AudiId == ppp.AudiId select ppp.AudiName
            };

            list.DataList = obj.Skip((pageIndex - 1) * pageSize).Take(pageSize);
            int rows = entity.Probaict.Count();

            list.PageCount = rows % pageSize == 0 ? rows / pageSize : rows / pageSize + 1;
            return(list);
        }
Пример #3
0
        /// <summary>
        /// 分页查询Warehouse表所有数据
        /// 状态为2:审核通过
        /// </summary>
        /// <returns></returns>
        public static Model.Jie.PageList GetPageListWarehouse2(int pageIndex, int pageSize)
        {
            CangChuEntities1 entity = new CangChuEntities1();

            Model.Jie.PageList list = new Model.Jie.PageList();
            var obj = from p in entity.Warehouse
                      where p.AudiId == 2
                      orderby p.WarId
                      select new
            {
                WarId      = p.WarId,
                WarType    = p.WarType,
                WarOrder   = p.WarOrder,
                WarPerson  = p.WarPerson,
                VenId      = from pp in entity.Vendor where p.VenId == pp.VenId select pp.VenName,
                AudiId     = from ppp in entity.Auditing where p.AudiId == ppp.AudiId select ppp.AudiName,
                CreateTime = p.CreateTime,
                IsDelete   = p.IsDelete,
                Remake     = p.Remake
            };

            list.DataList = obj.Skip((pageIndex - 1) * pageSize).Take(pageSize);
            int rows = entity.Probaict.Count();

            list.PageCount = rows % pageSize == 0 ? rows / pageSize : rows / pageSize + 1;
            return(list);
        }
        /// <summary>
        /// 根据id查询分页
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="ProId"></param>
        /// <returns></returns>
        public static Model.Jie.PageList TiaoJianProidProbaictCatagory(int pageIndex, int pageSize, int ProId)
        {
            Model.Jie.PageList list = new Model.Jie.PageList();
            var obj = from p in entity.ProbaictCatagory
                      where p.ProCId == ProId
                      orderby p.ProCId
                      select new
            {
                ProCId        = p.ProCId,
                ProCName      = p.ProCName,
                ProCCreteName = p.ProCCreteName,
                CreateTime    = p.CreateTime,
                IsDelete      = p.IsDelete,
                Remake        = p.Remake
            };

            list.DataList = obj.Skip((pageIndex - 1) * pageSize).Take(pageSize);
            int rows = entity.Probaict.Count();

            list.PageCount = rows % pageSize == 0 ? rows / pageSize : rows / pageSize + 1;
            return(list);
        }