wzp
2021-08-09 826bce65ac9b1e5dae43fc06974b8b1284f1d12c
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
 
using Common;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
 
namespace Model
{
    public class GwClient : ISessionObject
    {
        private List<string> _PermissionList = new List<string>();
        private string _clientId;
        private string _clientName;
        private string _telephone;
        private string _address;
        private string _agent;
        private string _company;
        private string _remark;
        private string _password;
 
        private string _parentId;
        private Decimal _totalAmount;
        private Decimal _balance;
        private int _id;
 
        public int Id
        {
            get
            {
                return _id;
            }
            set
            {
                this._id = value;
            }
        }
 
        public string ClientID
        {
            get
            {
                return this._clientId;
            }
            set
            {
                this._clientId = value;
            }
        }
 
        public string ClientName
        {
            get
            {
                return this._clientName;
            }
            set
            {
                this._clientName = value;
            }
        }
 
        public string Telephone
        {
            get
            {
                return this._telephone;
            }
            set
            {
                this._telephone = value;
            }
        }
 
        public string Address
        {
            get
            {
                return this._address;
            }
            set
            {
                this._address = value;
            }
        }
 
        public string Agent
        {
            get
            {
                return this._agent;
            }
            set
            {
                this._agent = value;
            }
        }
 
        public string Company
        {
            get
            {
                return this._company;
            }
            set
            {
                this._company = value;
            }
        }
 
        public string Remark
        {
            get
            {
                return this._remark;
            }
            set
            {
                this._remark = value;
            }
        }
 
        public string Password
        {
            get
            {
                return this._password;
            }
            set
            {
                this._password = value;
            }
        }
 
        public string ParentId
        {
            get { return this._parentId; }
            set { this._parentId = value; }
        }
 
        public Decimal TotalAmount
        {
            get { return this._totalAmount; }
            set { this._totalAmount = value; }
        }
        public Decimal Balance
        {
            get { return this._balance; }
            set { this._balance = value; }
        }
 
        public int BalanceThreshold { get; set; }
 
        public string AlarmMobile { get; set; }
 
        public string PermissionData
        {
            get
            {
                return JsonConvert.SerializeObject((object)this._PermissionList);
            }
            set
            {
                try
                {
                    this._PermissionList = JsonConvert.DeserializeObject<List<string>>(value);
                }
                catch (Exception ex)
                {
                    LogHelper.Error(ex);
                }
            }
        }
 
        public string Account
        {
            get
            {
                return this.ClientID;
            }
        }
 
        public bool HasRight(string functionID)
        {
            return this._PermissionList.Contains(functionID);
        }
 
        public bool ContainsTargetID(string functionID, string targetID)
        {
            return this._PermissionList.Contains(functionID);
        }
 
        public string[] GetSubMenuArray(string functionID)
        {
            return new string[0];
        }
    }
}