Пример #1
0
        /// <summary>
        /// 获取批量属性值信息
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public JsonResult GetAVByIds(string ids, long aid)
        {
            string[]     idstr = ids.Split(',');
            AttrValueBll bll   = new AttrValueBll();

            return(Json(bll.GetList(w => idstr.Contains(w.ID.ToString()) && w.AttributesID == aid), JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        /// <summary>
        /// <auth>徐柳</auth>
        /// 根据属性名获取属性值列表
        /// </summary>
        /// <param name="aid">属性名id</param>
        /// <returns></returns>
        public JsonResult GetAVListByP(int aid)
        {
            AttrValueBll bll = new AttrValueBll();
            var          tt  = bll.GetList(w => w.AttributesID == aid && w.Status == 0);

            return(Json(tt, JsonRequestBehavior.AllowGet));
        }
Пример #3
0
        /// <summary>
        /// 获取属性值列表
        /// </summary>
        /// <param name="PageIndex">页码(从1开始)</param>
        /// <param name="PageSize">每页大小</param>
        /// <returns></returns>
        public JsonResult GetAVList(long aid = 0, int pageIndex = 1, int pageSize = 0)
        {
            if (pageIndex == 0)
            {
                pageIndex = 1;
            }
            AttrValueBll bll = new AttrValueBll();

            return(Json(bll.GetAVList(aid, pageIndex, pageSize), JsonRequestBehavior.AllowGet));
        }
Пример #4
0
        /// <summary>
        /// 修改属性值
        /// </summary>
        /// <param name="id"></param>
        /// <param name="aname"></param>
        /// <returns></returns>
        public JsonResult UpdateAV(long id, string vname)
        {
            AttrValueBll bll   = new AttrValueBll();
            int          count = bll.Update(new AttrValue {
                VName = vname
            }, x => new { x.VName }, x => x.ID == id);

            // bool statuss = (count > 0) ? true : false;
            return(Json(new ReturnData <string>()
            {
                Status = true
            }, JsonRequestBehavior.AllowGet));
        }
Пример #5
0
        /// <summary>
        /// 合并属性值
        /// </summary>
        /// <param name="id"></param>
        /// <param name="ids"></param>
        /// <param name="gcid"></param>
        /// <returns></returns>
        public JsonResult CombineAV(long id, string ids, int aid)
        {
            AttrValueBll bll = new AttrValueBll();

            return(Json(bll.CombineAV(id, ids, aid), JsonRequestBehavior.AllowGet));
        }
Пример #6
0
        /// <summary>
        /// 获取属性值列表总数
        /// </summary>
        /// <returns></returns>
        // [Authoriz(Authorization.GoodsView)]
        public JsonResult GetAVAllCount(long aid)
        {
            AttrValueBll bll = new AttrValueBll();

            return(Json(bll.GetAllCount(aid), JsonRequestBehavior.AllowGet));
        }
Пример #7
0
 /// <summary>
 /// 修改属性值
 /// </summary>
 /// <param name="id"></param>
 /// <param name="aname"></param>
 /// <returns></returns>
 public JsonResult UpdateAV(long id, string vname)
 {
     AttrValueBll bll = new AttrValueBll();
     int count = bll.Update(new AttrValue { VName = vname }, x => new { x.VName }, x => x.ID == id);
     // bool statuss = (count > 0) ? true : false;
     return Json(new ReturnData<string>()
     {
         Status = true
     }, JsonRequestBehavior.AllowGet);
 }
Пример #8
0
 /// <summary>
 /// 合并属性值
 /// </summary>
 /// <param name="id"></param>
 /// <param name="ids"></param>
 /// <param name="gcid"></param>
 /// <returns></returns>
 public JsonResult CombineAV(long id, string ids, int aid)
 {
     AttrValueBll bll = new AttrValueBll();
     return Json(bll.CombineAV(id, ids, aid), JsonRequestBehavior.AllowGet);
 }
Пример #9
0
 /// <summary>
 /// 获取批量属性值信息
 /// </summary>
 /// <param name="ids"></param>
 /// <returns></returns>
 public JsonResult GetAVByIds(string ids, long aid)
 {
     string[] idstr = ids.Split(',');
     AttrValueBll bll = new AttrValueBll();
     return Json(bll.GetList(w => idstr.Contains(w.ID.ToString()) && w.AttributesID == aid), JsonRequestBehavior.AllowGet);
 }
Пример #10
0
 /// <summary>
 /// 获取属性值列表
 /// </summary>
 /// <param name="PageIndex">页码(从1开始)</param>
 /// <param name="PageSize">每页大小</param>
 /// <returns></returns>
 public JsonResult GetAVList(long aid = 0, int pageIndex = 1, int pageSize = 0)
 {
     if (pageIndex == 0) pageIndex = 1;
     AttrValueBll bll = new AttrValueBll();
     return Json(bll.GetAVList(aid, pageIndex, pageSize), JsonRequestBehavior.AllowGet);
 }
Пример #11
0
 /// <summary>
 /// 获取属性值列表总数
 /// </summary>
 /// <returns></returns>
 // [Authoriz(Authorization.GoodsView)]
 public JsonResult GetAVAllCount(long aid)
 {
     AttrValueBll bll = new AttrValueBll();
     return Json(bll.GetAllCount(aid), JsonRequestBehavior.AllowGet);
 }
Пример #12
0
 /// <summary>
 /// <auth>徐柳</auth>
 /// 根据属性名获取属性值列表
 /// </summary>
 /// <param name="aid">属性名id</param>
 /// <returns></returns>
 public JsonResult GetAVListByP(int aid)
 {
     AttrValueBll bll = new AttrValueBll();
     var tt = bll.GetList(w => w.AttributesID == aid && w.Status == 0);
     return Json(tt, JsonRequestBehavior.AllowGet);
 }