source: BMXNET_RPMS_dotNET_UTILITIES-BMX/branch/BMX41000/IHS BMX Framework/IndianHealthService.BMXNet/Sevices/BMXNetPooledSession.cs@ 1745

Last change on this file since 1745 was 1146, checked in by Sam Habiel, 14 years ago

Initial Import of BMX4

File size: 5.9 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Text;
4using IndianHealthService.BMXNet.Model;
5using IndianHealthService.BMXNet.Ado;
6using System.Data;
7
8namespace IndianHealthService.BMXNet.Services
9{
10 public class BMXNetPooledSession:RemoteSession
11 {
12
13 public BMXNetPooledSession(RemoteSession aSession)
14 {
15 this.Session = aSession;
16 }
17
18 private RemoteSession _session;
19
20 protected RemoteSession Session
21 {
22 get { return _session; }
23 set { _session = value; }
24 }
25
26 #region BMXNetSession Members
27
28 public string HostAddress
29 {
30 get { return this.Session.HostAddress; }
31 }
32
33 public string UserName
34 {
35 get { return this.Session.UserName; }
36 }
37
38 public string DUZ
39 {
40 get { return this.Session.DUZ; }
41 }
42
43 public string TransmitRPC(string rpcCommand, string rpcParameter, string context)
44 {
45 return this.Session.TransmitRPC(rpcCommand, rpcParameter, context);
46 }
47
48 public string SafelyTransmitRPC(string rpcCommand, string rpcParameter, string context)
49 {
50 return this.Session.SafelyTransmitRPC(rpcCommand, rpcParameter, context);
51 }
52
53 public string RpcResult
54 {
55 get { return this.Session.RpcResult; }
56 }
57
58 public string DebugLastResult
59 {
60 get { return this.Session.DebugLastResult; }
61 }
62
63 public DataTable VersionInfo
64 {
65
66 get { return this.Session.VersionInfo; }
67 }
68
69 public string DebugLastRpcSignature
70 {
71 get { return this.Session.DebugLastRpcSignature; }
72 }
73
74 public bool IsTableGenerationRpc(string aString)
75 {
76 return this.Session.IsTableGenerationRpc(aString);
77 }
78
79 public System.Data.DataTable TransmitTableGenerationRPC(string generationString)
80 {
81 return this.Session.TransmitTableGenerationRPC(generationString);
82 }
83
84 public System.Data.DataTable TransmitTableGenerationRPC(string generationString, System.Data.DataSet aDataSet)
85 {
86 return this.Session.TransmitTableGenerationRPC(generationString, aDataSet);
87 }
88
89 public System.Data.DataTable TableFromRPC(string rpcCommand, string rpcParameter, string context)
90 {
91 return this.Session.TableFromRPC(rpcCommand, rpcParameter, context);
92 }
93
94 public System.Data.DataTable TableFromRPC(string rpcCommand, string rpcParameter, string context, System.Data.DataSet aDataSet)
95 {
96 return this.Session.TableFromRPC(rpcCommand, rpcParameter, context, aDataSet);
97 }
98
99 public System.Data.DataTable TableFromSQL(string sql)
100 {
101 return this.Session.TableFromSQL(sql);
102 }
103
104 public bool SaveChanges(System.Data.DataTable aDataTable)
105 {
106 return this.Session.SaveChanges(aDataTable);
107 }
108
109 public void Close()
110 {
111 ///TODO: implement pool behavior. Current behavior is simple reuse
112 }
113
114 #endregion
115
116
117
118 public string AppContext
119 {
120 get
121 {
122 return this.Session.AppContext;
123 }
124 set
125 {
126 this.Session.AppContext = value;
127 }
128 }
129
130 public string TransmitRPC(string rpcCommand, string rpcParameter)
131 {
132 return this.TransmitRPC(rpcCommand, rpcParameter, this.AppContext);
133 }
134
135 public string SafelyTransmitRPC(string rpcCommand, string rpcParameter)
136 {
137 return this.SafelyTransmitRPC(rpcCommand, rpcParameter, this.AppContext);
138 }
139
140 public System.Data.DataTable TableFromRPC(string rpcCommand, string rpcParameter)
141 {
142 return this.TableFromRPC(rpcCommand, rpcParameter, this.AppContext);
143 }
144
145 public System.Data.DataTable TableFromRPC(string rpcCommand, string rpcParameter, System.Data.DataSet aDataSet)
146 {
147 return this.TableFromRPC(rpcCommand, rpcParameter, aDataSet);
148 }
149
150
151 #region BMXNetSession Members
152
153
154 public DataTableFuture AsyncTableFromRPC(string rpcCommand, string rpcParameter)
155 {
156 throw new NotImplementedException();
157 }
158
159 public DataTableFuture AsyncTableFromRPC(string rpcCommand, string rpcParameter, System.Data.DataSet aDataSet)
160 {
161 throw new NotImplementedException();
162 }
163
164 public DataTableFuture AsyncTableFromRPC(string rpcCommand, string rpcParameter, string context)
165 {
166 throw new NotImplementedException();
167 }
168
169 public DataTableFuture AsyncTableFromRPC(string rpcCommand, string rpcParameter, string context, System.Data.DataSet aDataSet)
170 {
171 throw new NotImplementedException();
172 }
173
174 public event EventHandler<RemoteEventArgs> RemoteEvent;
175
176 #endregion
177
178 #region BMXNetSession Members
179
180
181 public System.Data.DataTable TransmitTableGenerationRPC(string generationString, System.Data.DataSet aDataSet, string aTableName)
182 {
183 throw new NotImplementedException();
184 }
185
186 public RemoteEventService EventServices
187 {
188 get { return this.Session.EventServices; }
189 }
190
191 #endregion
192
193
194
195 public System.Data.DataTable TableFromSQL(string sql, System.Data.DataSet aDataSet)
196 {
197 return this.Session.TableFromSQL(sql, aDataSet);
198 }
199
200 public System.Data.DataTable TableFromSQL(string sql, System.Data.DataSet aDataSet, string aTableName)
201 {
202 return this.Session.TableFromSQL(sql, aDataSet,aTableName);
203 }
204
205 }
206}
Note: See TracBrowser for help on using the repository browser.