using Common; using Newtonsoft.Json; using System; using System.Collections.Generic; namespace Model { public class GwClient : ISessionObject { private List _PermissionList = new List(); 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;//上级ID 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>(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]; } } }