示例#1
0
 private List <GoodsStockExtend> QueryGoods(Model.StockQueryAgrs entity)
 {
     if (user.IsAdmin && string.IsNullOrEmpty(entity.StoreID.ToString()))
     {
         entity.StoreID = null;
     }
     if (!user.IsAdmin)
     {
         entity.StoreID = user.StoreID;
     }
     return(stockBLL.GetGoodsStockInfo(entity));
 }
示例#2
0
        public ActionResult GetGoodsStockListJson(Pagination pagination, Model.StockQueryAgrs entity)
        {
            //if (user.IsAdmin&&string.IsNullOrEmpty(entity.StoreID.ToString()))
            //{
            //    entity.StoreID = null;
            //}
            //if(!user.IsAdmin) {
            //    entity.StoreID = user.StoreID;
            //}
            var stockList = QueryGoods(entity);

            if (stockList == null)
            {
                return(Error("未找到符合条件的记录!"));
            }
            return(Content(GetPagingJson(stockList, pagination)));
        }