-
Notifications
You must be signed in to change notification settings - Fork 0
/
MeService.asmx.cs
148 lines (136 loc) · 4.23 KB
/
MeService.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
using Reocar.WS.Code;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using Reocar.Libraries;
using Reocar.WS.Code.ME;
using System.Web.Services.Description;
namespace test
{
[WebService(Description = "http://schemas.xmlsoap.org/wsdl/", Namespace = "http://WebXml.com.cn/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class MeService : System.Web.Services.WebService
{
public static Sender sender = new Sender();
/// <summary>
/// 根据会员ID获取会员资料
/// </summary>
/// <param name="MemberID"></param>
/// <returns>MemberProfile</returns>
[WebMethod]
public MemberProfile GetMemberProfileByMemberID(string MemberID)
{
try
{
using (ProxyME me = new ProxyME())
{
Guid MID = new Guid(MemberID);
MemberProfile m = me.Client.GetMemberProfileByMemberID(sender, MID);
return m;
}
}
catch (System.Exception ex)
{
PLogger.LogError(ex);
throw ex;
}
}
/// <summary>
/// 根据身份证获取会员信息
/// </summary>
/// <param name="IDNumber"></param>
/// <returns>MemberProfile</returns>
[WebMethod]
public MemberProfile GetMemberByIDNumber(string IDNumber)
{
try
{
using (ProxyME me = new ProxyME())
{
MemberProfile m = me.Client.GetMemberProfileByIDNumber(sender, IDNumber);
return m;
}
}
catch (System.Exception ex)
{
PLogger.LogError(ex);
throw ex;
}
}
/// <summary>
/// 根据email地址获取会员资料
/// </summary>
/// <param name="Email"></param>
/// <returns>MemberProfile</returns>
[WebMethod]
public MemberProfile GetMemberProfileByEmail(string Email)
{
try
{
using (ProxyME me = new ProxyME())
{
MemberProfile m = me.Client.GetMemberProfileByEmail(sender, Email);
return m;
}
}
catch (System.Exception ex)
{
PLogger.LogError(ex);
throw ex;
}
}
/// <summary>
/// 根据手机号码获取会员信息
/// </summary>
/// <param name="Mobile"></param>
/// <returns>MemberProfile</returns>
[WebMethod]
public MemberProfile GetMemberProfileByMobile(string Mobile)
{
try
{
using (ProxyME me = new ProxyME())
{
MemberProfile m = me.Client.GetMemberProfileByMobile(sender, Mobile);
return m;
}
}
catch (System.Exception ex)
{
PLogger.LogError(ex);
throw ex;
}
}
/// <summary>
/// 根据会员ID获取会员储值与积分帐户
/// </summary>
/// <param name="MemberID"></param>
/// <returns>MemberAmount</returns>
[WebMethod]
public MemberAmount GetMemberAmount(string MemberID)
{
try
{
using (ProxyME me = new ProxyME())
{
Guid MID = new Guid(MemberID);
MemberAmount ma = me.Client.GetMemberAmount(sender, MID);
return ma;
}
}
catch (System.Exception ex)
{
PLogger.LogError(ex);
throw ex;
}
}
[WebMethod]
public string TestInfo(string IDNumber)
{
return IDNumber;
}
}
}