示例#1
0
        /// <summary>
        /// 查询列表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public List <WebLoaderModel> GetList(WebLoaderGetListRequest request)
        {
            List <DbParameter> paramenters = new List <DbParameter>();
            string             sqlWhere    = CreateWhereSql(request, paramenters);

            return(base.GetModels(sqlWhere, paramenters, request.Row, request.Page));
        }
示例#2
0
        public ServerResponse <WebLoaderGetListResponse> GetList(WebLoaderGetListRequest request)
        {
            ServerResponse <WebLoaderGetListResponse> response = new ServerResponse <WebLoaderGetListResponse>();

            try
            {
                //查数据
                var list = dal.GetList(request);
                //查总记录数
                var count = dal.GetCount(JsonHelper.CloneObject <WebLoaderGetCountRequest>(request));
                response.Data = new WebLoaderGetListResponse()
                {
                    DataList = list, Count = count
                };
                response.Code = ServerResponseType.成功;
            }
            catch (Exception ex)
            {
                response.Code     = ServerResponseType.调用异常;
                response.ErrorMsg = ex.ToString();
                Log.LogHelper.WriteErrorLog(GetType(), ex);
            }
            return(response);
        }
示例#3
0
 public ServerResponse <WebLoaderGetListResponse> GetList(WebLoaderGetListRequest request)
 {
     return(Action <WebLoaderGetListResponse>(request, "api/WebLoader/list"));
 }