コード例 #1
0
ファイル: AppServiceServer'1.cs プロジェクト: xqj/Security
        private static List <AppService> GetAppServiceByAppId(int appId)
        {
            var parmater = new AppServiceSearchPamater();

            parmater.SetAppId(appId, PamaterOperationType.Equal);
            parmater.SetStatus(null, PamaterOperationType.In);
            parmater.StatusList = new List <byte>()
            {
                0, 1
            };
            var source = AppServiceDal.GetList(parmater);

            if (source != null)
            {
                var functionParamter = new AppFunctionSearchPamater();
                functionParamter.SetAppServiceId(null, PamaterOperationType.In);
                functionParamter.AppServiceIdList = source.Select(a => a.AppServiceId).ToList();
                functionParamter.SetStatus(null, PamaterOperationType.In);
                functionParamter.StatusList = new List <byte>()
                {
                    0, 1
                };
                var functionSource = AppFunctionDal.GetList(functionParamter);
                if (functionSource != null)
                {
                    source.ForEach(ap =>
                    {
                        ap.AppFunctions = functionSource.FindAll(af => af.AppServiceId == ap.AppServiceId);
                    });
                }
            }

            return(source);
        }
コード例 #2
0
ファイル: AppServiceServer'1.cs プロジェクト: xqj/Security
        public FunctionOpenResult <bool> ExistAppService(int appId)
        {
            var r = new FunctionOpenResult <bool>();

            var parmater = new AppServiceSearchPamater();

            parmater.SetAppId(appId, PamaterOperationType.Equal);
            var source = AppServiceDal.GetList(parmater);

            if ((source != null) && (source.Count > 0))
            {
                r.Data = true;
            }
            else
            {
                r.Data = false;
            }
            return(r);
        }
コード例 #3
0
ファイル: AppServiceServer.cs プロジェクト: xqj/Security
 public FunctionListResult <AppService> GetList(AppServiceSearchPamater pamater)
 {
     var r = new FunctionListResult <AppService>(); r.Data = AppServiceDal.GetList(pamater); return(r);
 }