/// <summary>
        /// 未知的客户构建对象
        /// </summary>
        public static ClientInformationModel CreateGuestAddress(string address, string hrmisId, bool isTheClientAddressGood)
        {
            ClientInformationModel aNewClientAddrssModel = new ClientInformationModel(hrmisId, "未定义的公司", false);

            aNewClientAddrssModel.TryAddDiffierentListenAddress(address, isTheClientAddressGood);
            return(aNewClientAddrssModel);
        }
示例#2
0
 public bool WithTheSameHrmisId(ClientInformationModel theModel)
 {
     if (theModel.HrmisId.Equals(_HrmisId))
     {
         return(true);
     }
     return(false);
 }
 public bool Equals(ClientInformationModel obj)
 {
     if (ReferenceEquals(null, obj))
     {
         return(false);
     }
     if (ReferenceEquals(this, obj))
     {
         return(true);
     }
     return(obj._Pkid == _Pkid && Equals(obj._HrmisId, _HrmisId) && Equals(obj._CompanyDescription, _CompanyDescription) && obj._IsPermitted.Equals(_IsPermitted) && CollectionEquals(obj));
 }
示例#4
0
        public bool WithTheSameHrmisIdDiffPkid(ClientInformationModel theModel)
        {
            if (!_EnableDiffPkid)
            {
                throw new ApplicationException("错误的使用方式");
            }

            if (theModel.HrmisId.Equals(_HrmisId) && _Pkid != theModel.Pkid)
            {
                return(true);
            }
            return(false);
        }
        private bool CollectionEquals(ClientInformationModel obj)
        {
            int theCount = obj._TheAddressModelCollcetion.Count;

            if (_TheAddressModelCollcetion.Count != theCount)
            {
                return(false);
            }
            for (int i = 0; i < theCount; i++)
            {
                if (!obj._TheAddressModelCollcetion[i].Equals(_TheAddressModelCollcetion[i]))
                {
                    return(false);
                }
            }
            return(true);
        }