-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviows.asmx.cs
316 lines (269 loc) · 14.2 KB
/
viows.asmx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Script.Services;
using System.IO;
using System.Xml.Serialization;
using System.Data;
using System.Xml;
using System.Net;
using System.Web.Services.Protocols;
namespace CVioWebServis {
/// <summary>Vio WebServis Islemleri</summary>
//[WebService( Namespace = "http://tempuri.org/" )]
[WebService( Namespace = "http://vioyazilim.com.tr/viows" )]
[WebServiceBinding( ConformsTo = WsiProfiles.BasicProfile1_1 )]
[System.ComponentModel.ToolboxItem( false )]
[ScriptService()]
[XmlInclude( typeof( CIOType ) ), XmlInclude( typeof( DataTable ) ), XmlInclude( typeof( DataSet ) )]
[XmlInclude( typeof( Filtre ) ), XmlInclude( typeof( FiltreBasiSonu ) ), XmlInclude( typeof( FiltreOzellik ) ), XmlInclude( typeof( FiltreListe ) )]
[XmlInclude( typeof( CRRMRequest ) ), XmlInclude( typeof( CRRMSimpleRequest ) ), XmlInclude( typeof( CRRMXmlRequest ) ), XmlInclude( typeof( CRRMErrorResponse ) ), XmlInclude( typeof( CRRMErrorCategory ) )]
[XmlInclude( typeof( CRRMBinaryRequest ) ), XmlInclude( typeof( CRRMDownloadRequest ) )]
[XmlInclude( typeof( CRRMResponse ) ), XmlInclude( typeof( CRRMStringResponse ) ), XmlInclude( typeof( CRRMBoolResponse ) ), XmlInclude( typeof( CRRMIntegerResponse ) )]
[XmlInclude( typeof( CRRMBasicXmlResponse ) ), XmlInclude( typeof( CRRMXmlResponse ) )]
[XmlInclude( typeof( CRRMBinaryResponse ) ), XmlInclude( typeof( CRRMDownloadResponse ) )]
/*[XmlInclude( typeof( CRRMWSBilgiResponse ) ), XmlInclude( typeof( CRRMSessionInfoResponse ) ), XmlInclude( typeof( CRRMProgramVersionResponse ) )]
[XmlInclude( typeof( CRRMPingResponse ) ), XmlInclude( typeof( CRRMLoginResponse ) ), XmlInclude( typeof( CRRMLogoutResponse ) ), XmlInclude( typeof( CRRMIslemListesiResponse ) )]
[XmlInclude( typeof( CRRMRecord ) ), XmlInclude( typeof( CRRMRecordList<CRRMRecord> ) ), XmlInclude( typeof( CRRMR_KodVeAdiYapi ) ), XmlInclude( typeof( CRRMR_KodNoVeAdiYapi ) )]
[XmlInclude( typeof( CRRMMasterResponse<CRRMR_KodYapi> ) ), XmlInclude( typeof( CRRMMasterResponse<CRRMR_KodVeAdiYapi> ) )]
[XmlInclude( typeof( CRRMMasterResponse<CRRMR_Stok> ) ), XmlInclude( typeof( CRRMMasterResponse<CRRMR_Cari> ) ), XmlInclude( typeof( CRRMMasterResponse<CRRMR_Plasiyer> ) )]
[XmlInclude( typeof( CRRMMasterResponse<CRRMR_Il> ) ), XmlInclude( typeof( CRRMMasterResponse<CRRMR_Sube> ) )]*/
public class VioWS : WebService {
protected CWSComm wsComm;
#region Web Service Methods
[WebMethod()]
public bool pingBasit() {
CRRMPingResponse response;
response = ping( new CRRMPingRequest() );
return response == null ? false : response.Value;
}
[WebMethod()]
public CRRMPingResponse ping( CRRMPingRequest request ) {
return (CRRMPingResponse)request.wsCall( wsComm );
}
[WebMethod()]
public CRRMIslemListesiResponse islemListesi( CRRMIslemListesiRequest request ) {
return (CRRMIslemListesiResponse)request.wsCall( wsComm );
}
[WebMethod()]
public CRRMSessionInfoResponse getSessionInfo( CRRMSessionInfoRequest request ) {
return (CRRMSessionInfoResponse)request.wsCall( wsComm );
}
[WebMethod()]
public CRRMWSBilgiResponse wsBilgi( CRRMWSBilgiRequest request ) {
return (CRRMWSBilgiResponse)request.wsCall( wsComm );
}
[WebMethod()]
public CRRMProgramVersionResponse programVersion( CRRMProgramVersionRequest request ) {
return (CRRMProgramVersionResponse)request.wsCall( wsComm );
}
[WebMethod()]
public CRRMLoginResponse login( CRRMLoginRequest request ) {
return (CRRMLoginResponse)request.wsCall( wsComm );
}
[WebMethod()]
public CRRMLogoutResponse logout( CRRMLogoutRequest request ) {
return (CRRMLogoutResponse)request.wsCall( wsComm );
}
[WebMethod()]
public CRRMKayitDegistiKontroluResponse kayitDegistiKontrolu( CRRMKayitDegistiKontroluRequest request ) {
return (CRRMKayitDegistiKontroluResponse)request.wsCall( wsComm );
}
[WebMethod()]
public CRRM_FRRaporBilgilerResponse frRaporBilgiler( CRRM_FRRaporBilgilerRequest request ) {
return (CRRM_FRRaporBilgilerResponse)request.wsCall( wsComm );
}
[WebMethod()]
public CRRM_FRRaporOlusturResponse frRaporOlustur( CRRM_FRRaporOlusturRequest request ) {
return (CRRM_FRRaporOlusturResponse)request.wsCall( wsComm );
}
[WebMethod()]
public CRRM_FRRaporOlusturResponse frRaporGetStream( CRRM_FRRaporGetStreamRequest request ) {
return (CRRM_FRRaporOlusturResponse)request.wsCall( wsComm );
}
[WebMethod()]
public CRRMMasterResponse<CRRMR_Il> ilListe( CRRMMasterRequest<CRRMR_Il> request ) {
return (CRRMMasterResponse<CRRMR_Il>)request.wsCall( wsComm, new CRRMCallArgs( "ilListe" ) );
}
[WebMethod()]
public CRRMMasterResponse<CRRMR_Cari> cariListe( CRRMMasterRequest<CRRMR_Cari> request ) {
return (CRRMMasterResponse<CRRMR_Cari>)request.wsCall( wsComm, new CRRMCallArgs( "cariListe" ) );
}
[WebMethod()]
public CRRMMasterResponse<CRRMR_Plasiyer> plasiyerListe( CRRMMasterRequest<CRRMR_Plasiyer> request ) {
return (CRRMMasterResponse<CRRMR_Plasiyer>)request.wsCall( wsComm, new CRRMCallArgs( "plasiyerListe" ) );
}
[WebMethod()]
public CRRMMasterResponse<CRRMR_Sube> subeListe( CRRMMasterRequest<CRRMR_Sube> request ) {
return (CRRMMasterResponse<CRRMR_Sube>)request.wsCall( wsComm, new CRRMCallArgs( "subeListe" ) );
}
[WebMethod()]
public CRRMMasterResponse<CRRMR_Stok> stokListe( CRRMMasterRequest<CRRMR_Stok> request ) {
return (CRRMMasterResponse<CRRMR_Stok>)request.wsCall( wsComm, new CRRMCallArgs( "stokListe" ) );
}
[WebMethod()]
public CRRMMasterResponse<CRRMR_TahsilSekli> tahsilSekliListe( CRRMMasterRequest<CRRMR_TahsilSekli> request ) {
return (CRRMMasterResponse<CRRMR_TahsilSekli>)request.wsCall( wsComm, new CRRMCallArgs( "stokListe" ) );
}
[WebMethod()]
public CRRMTest01Response test01( CRRMTest01Request request ) {
return (CRRMTest01Response)request.wsCall( wsComm );
}
/*[WebMethod()]
public DataTable nakliyeSekliListe( CRRMRequest request, Filtre[] filtreler ) {
return wsComm.sendWebRequestAndGetDataTable( islem: "nakliyeSekliListe", request: request, filtreler: filtreler );
}
[WebMethod()]
public DataTable tahsilSekliListe( CRRMRequest request, Filtre[] filtreler ) {
return wsComm.sendWebRequestAndGetDataTable( islem: "tahsilSekliListe", request: request, filtreler: filtreler );
}
[WebMethod()]
public DataTable barkodReferansListe( CRRMRequest request, Filtre[] filtreler ) {
return wsComm.sendWebRequestAndGetDataTable( islem: "barkodReferansListe", request: request, filtreler: filtreler );
}
[WebMethod()]
public DataTable tartiFormatListe( CRRMRequest request, Filtre[] filtreler ) {
return wsComm.sendWebRequestAndGetDataTable( islem: "tartiFormatListe", request: request, filtreler: filtreler );
}
[WebMethod()]
public DataTable modelListe( CRRMRequest request, Filtre[] filtreler ) {
return wsComm.sendWebRequestAndGetDataTable( islem: "modelListe", request: request, filtreler: filtreler );
}
[WebMethod()]
public DataTable renkListe( CRRMRequest request, Filtre[] filtreler ) {
return wsComm.sendWebRequestAndGetDataTable( islem: "renkListe", request: request, filtreler: filtreler );
}
[WebMethod()]
public DataTable desenListe( CRRMRequest request, Filtre[] filtreler ) {
return wsComm.sendWebRequestAndGetDataTable( islem: "desenListe", request: request, filtreler: filtreler );
}
[WebMethod()]
public DataSet masterBilgiler( CRRMRequest request, Filtre[] filtreler ) {
return wsComm.sendWebRequestAndGetDataSet( islem: "masterBilgiler", request: request, filtreler: filtreler );
}
[WebMethod()]
public DataSet modelRenkDesenListe( CRRMRequest request, Filtre[] filtreler ) {
return wsComm.sendWebRequestAndGetDataSet( islem: "modelRenkDesenListe", request: request, filtreler: filtreler );
}
[WebMethod()]
public int ticariBelgeGonder( CRRMRequest request, GonderimFisTipi fisTipi, params Kaydet_BelgeOrtak[] belgeler ) {
int fisSayac = 0;
wsComm.sendWebRequest(
islem: "fisKaydet"
, request: request
, outputType: CIOType.tab
, ekArgs: new string[][] {
new string[] { "fisTipi", fisTipi.ToString() }
}.asEkArgs()
, requestBlock: ( req, aStream ) => {
wsComm.sendWebRequestWithXMLReader_requestProc(
req: req
, aStream: aStream
, postRequestBlock: ( _req, xw, _aStream ) => {
#region #function block#
xw.WriteStartDocument();
if (belgeler != null) {
xw.WriteStartElement( "Fisler" );
foreach (var belge in belgeler)
belge.xmlWriteTo( xw );
xw.WriteEndElement();
}
xw.WriteEndDocument();
#endregion
}
);
}
, responseBlock: ( resp, aStream, req ) => {
#region #function block#
StreamReader sr;
( sr = new StreamReader( aStream ) ).ReadLine();
fisSayac = Convert.ToInt32( sr.ReadLine().Split( '\t' )[1].Trim( '"' ) );
#endregion
} );
return fisSayac;
}
[WebMethod()]
public string cariKaydet( CRRMRequest request, params Cari[] kayitlar ) {
return masterKaydet( request: request, islem: "cariKaydet", kayitlar: kayitlar );
}
[WebMethod()]
public string stokKaydet( CRRMRequest request, params Stok[] kayitlar ) {
return masterKaydet( request: request, islem: "stokKaydet", kayitlar: kayitlar );
}
[WebMethod()]
public DataSet belgeler( CRRMRequest request, TicariBelgePIFTipi pifTipi, TicariBelgeAlmSat almSat, bool iademi, Filtre[] filtreler ) {
return wsComm.sendWebRequestAndGetDataSet( islem: "belgeler"
, request: request
, filtreler: filtreler
, ekArgs: new string[][] {
new string[] { "pifTipi", pifTipi.ToString() }
, new string[] { "almSat", almSat.ToString() }
, new string[] { "iademi", iademi.ToString() }
}.asEkArgs()
);
}
[WebMethod()]
public Cevap_TicariBelge[] belgeler2( CRRMRequest request, TicariBelgePIFTipi pifTipi, TicariBelgeAlmSat almSat, bool iademi, Filtre[] filtreler ) {
List<Cevap_TicariBelge> aCollection = null;
wsComm.sendWebRequestWithXMLDocument( islem: "belgeler2"
, request: request
, filtreler: filtreler
, ekArgs: new string[][] {
new string[] { "pifTipi", pifTipi.ToString() }
, new string[] { "almSat", almSat.ToString() }
, new string[] { "iademi", iademi.ToString() }
}.asEkArgs()
, postResponseBlock: ( resp, xdoc, aStream, req ) => {
XmlElement xroot;
xroot = (XmlElement)xdoc.DocumentElement.SelectSingleNode( "//Result" ).ChildNodes[0];
aCollection = CParserBase.XmlReadFromElementList<Cevap_TicariBelge>( null, xroot );
} );
return ( aCollection == null
? null
: aCollection.ToArray() );
}*/
#endregion
#region Yardimci
/*public string masterKaydet( CRRMRequest request, string islem, params CMasterBase[] kayitlar ) {
string kod = null;
wsComm.sendWebRequest(
islem: islem
, request: request
, outputType: CIOType.tab
, requestBlock: ( req, aStream ) => {
wsComm.sendWebRequestWithXMLReader_requestProc(
req: req
, aStream: aStream
, postRequestBlock: ( _req, xw, _aStream ) => {
#region #function block#
xw.WriteStartDocument();
if (kayitlar != null) {
xw.WriteStartElement( "Kayitlar" );
foreach (var kayit in kayitlar)
kayit.xmlWriteTo( xw );
xw.WriteEndElement();
}
xw.WriteEndDocument();
#endregion
}
);
}
, responseBlock: ( resp, aStream, req ) => {
#region #function block#
StreamReader sr;
( sr = new StreamReader( aStream ) ).ReadLine();
kod = sr.ReadLine().Split( '\t' )[1].Trim( '"' );
#endregion
} );
return kod;
}*/
#endregion
#region Not Categorized
public VioWS() : base() {
wsComm = new CWSComm();
}
#endregion
}
}