Exemple #1
0
        public ResponseResult <List <ResourceEntity> > GetLeftMenuList()
        {
            var result = ResponseResult <List <ResourceEntity> > .Default();

            try
            {
                var           resourceService = new ResourceDataService();
                ResourceQuery query           = new ResourceQuery {
                    UserID = -1000
                };
                var resourceList = resourceService.GetLeftMenuList(query.UserID);

                result = ResponseResult <List <ResourceEntity> > .Success(resourceList);
            }
            catch (System.Exception ex)
            {
                result = ResponseResult <List <ResourceEntity> > .Error(
                    string.Format("获取左侧导航资源数据失败!{0}", ex.Message)
                    );
            }
            return(result);
        }