Example #1
0
        /// <summary>
        /// 获取归属地的下拉
        /// </summary>
        /// <returns></returns>
        public DropDownTypeResponse GetTypes(DropDownTypeRequest request)
        {
            DropDownTypeResponse response = new DropDownTypeResponse();

            var list = ProductDal.Instance.GetTypes();

            //判断是否有数据
            if (list.Count <= 0)
            {
                //给返回对象属性赋值
                response.Status  = false;
                response.Message = "获取类型信息失败,请检查网络问题";
            }
            else
            {
                //给返回对象赋值
                response.Types   = list;
                response.Message = $"获取类型信息成功,共{list.Count}条数据";
            }
            return(response);
        }
Example #2
0
 /// <summary>
 /// 获取类型信息
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public DropDownTypeResponse GetTypes(DropDownTypeRequest request)
 {
     return(ApiRequestHelper.Post <DropDownTypeRequest, DropDownTypeResponse>(request));
 }
 public DropDownTypeResponse GetTypes(DropDownTypeRequest request)
 {
     return(ProductBll.Instance.GetTypes(request));
 }
Example #4
0
 /// <summary>
 /// 获取类型信息
 /// </summary>
 /// <returns></returns>
 public JsonResult GetTypes(DropDownTypeRequest request)
 {
     return(Json(ProductBll.Instance.GetTypes(request)));
 }