Example #1
0
        /// <summary>
        /// 根据店铺ID返回所有商品信息
        /// </summary>
        /// <param name="shopID"></param>
        /// <returns></returns>
        public JsonResult GetGoodsInfoByShopID(int shopID)
        {
            List <TB_GOODS> list = SellerMgr.GetGoodsInfoByShopID(shopID);

            //LayUITableModel res = new LayUITableModel(list.Count, list);
            return(Json(list));
        }
Example #2
0
        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="page"></param>
        /// <returns></returns>
        public JsonResult GetArticleByPager(PageParam page)
        {
            int             shopID = int.Parse(Session["shopID"].ToString());
            var             res    = SellerMgr.GetArticlesByPager(page, shopID);
            LayUITableModel model  = new LayUITableModel(res.Total, res.Rows);

            return(Json(model));
        }
Example #3
0
        /// <summary>
        /// 查询所有订单
        /// </summary>
        /// <returns></returns>
        public JsonResult OrderQuery()
        {
            List <TB_ORDER> list = SellerMgr.OrderQuery();

            //string jsonStr = Newtonsoft.Json.JsonConvert.SerializeObject(list, Config.FULL_DATE_FORMAT);
            //return Json(jsonStr);

            //使用layui table的方式
            LayUITableModel res = new LayUITableModel(list.Count, list);

            return(Json(res));
        }
Example #4
0
        /// <summary>
        /// 保存商品信息
        /// </summary>
        /// <param name="goods"></param>
        /// <returns></returns>
        public JsonResult SaveGoods(TB_GOODS goods)
        {
            bool res = false;

            goods.GOODS_SHOP_ID = int.Parse(Session["shopID"].ToString());

            //ID为-1,则为添加商品
            if (goods.ID == -1)
            {
                res = SellerMgr.Add(goods);
            }
            else
            {
                res = SellerMgr.Update(goods);
            }
            return(Json(res));
        }
Example #5
0
 /// <summary>
 /// 通过订单ID修改订单状态(卖家派送)
 /// </summary>
 /// <param name="id"></param>
 public void UpdateStateByID(int id)
 {
     SellerMgr.UpdateStateByID(id);
 }
Example #6
0
        /// <summary>
        /// 根据商品ID返回商品信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public JsonResult GetGoodsInfoByID(int id)
        {
            TB_GOODS model = SellerMgr.GetGoodsInfoByID(id);

            return(Json(model));
        }
Example #7
0
        /// <summary>
        /// 根据店铺ID、搜索关键词返回所有商品信息
        /// </summary>
        /// <param name="shopID"></param>
        /// <param name="keyWord"></param>
        /// <returns></returns>
        public JsonResult SearchGoods(int shopID, string keyWord)
        {
            List <TB_GOODS> list = SellerMgr.SearchGoods(shopID, keyWord);

            return(Json(list));
        }
Example #8
0
        /// <summary>
        /// 根据商品ID删除商品
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public JsonResult RemoveGoods(int id)
        {
            bool res = SellerMgr.RemoveGoods(id);

            return(Json(res));
        }
Example #9
0
        /// <summary>
        /// 修改店铺信息
        /// </summary>
        /// <param name="shop"></param>
        /// <returns></returns>
        public JsonResult UpdateShopInfo(TB_SHOP shop)
        {
            bool res = SellerMgr.UpdateShopInfo(shop);

            return(Json(res));
        }
Example #10
0
        /// <summary>
        /// 通过店铺ID查询店铺信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public JsonResult GetShopByID(int id)
        {
            TB_SHOP model = SellerMgr.GetShopByID(id);

            return(Json(model));
        }