コード例 #1
0
ファイル: LookupServiceImpl.cs プロジェクト: SenerDemiral/M2
        // DepartmanTanim
        public override async Task KdtL(QueryLookupProxy request, IServerStreamWriter <KdtLookupProxy> responseStream, ServerCallContext context)
        {
            KdtLookupProxy        proxy;
            BbMsg                 bbMsg;
            List <KdtLookupProxy> proxyList = new List <KdtLookupProxy>();

            await Scheduling.RunTask(() =>
            {
                for (int i = 0; i < 1; i++)
                {
                    foreach (var row in Db.SQL <KDT>("select r from KDT r"))
                    {
                        bbMsg = new BbMsg
                        {
                            Kd   = row.Kd ?? "",
                            Ad   = row.Ad ?? "",
                            Info = row.Info ?? "",
                        };
                        proxy = new KdtLookupProxy
                        {
                            RowKey = row.GetObjectNo(),
                            BB     = bbMsg
                        };

                        proxyList.Add(proxy);
                    }
                }
            });

            foreach (var p in proxyList)
            {
                await responseStream.WriteAsync(p);
            }
        }
コード例 #2
0
ファイル: LookupServiceImpl.cs プロジェクト: SenerDemiral/M2
        // HesapPlani
        public override async Task AhpL(QueryLookupProxy request, IServerStreamWriter <AhpLookupProxy> responseStream, ServerCallContext context)
        {
            AhpLookupProxy        proxy;
            BbMsg                 bbMsg;
            List <AhpLookupProxy> proxyList = new List <AhpLookupProxy>();

            await Scheduling.RunTask(() =>
            {
                for (int i = 0; i < 1; i++)
                {
                    foreach (var row in Db.SQL <AHP>("select r from AHP r"))
                    {
                        bbMsg = new BbMsg
                        {
                            Kd   = row.Kd ?? "",
                            Ad   = row.Ad ?? "",
                            Info = row.Info ?? "",
                        };
                        proxy = new AhpLookupProxy
                        {
                            RowKey = row.GetObjectNo(),
                            BB     = bbMsg,
                            HspNo  = row.HspNo,
                            P      = row.P == null ? 0 : row.P.GetObjectNo(),
                            IsW    = row.IsW
                        };

                        proxyList.Add(proxy);
                    }
                }
            });

            foreach (var p in proxyList)
            {
                await responseStream.WriteAsync(p);
            }
        }