示例#1
0
文件: PhoneNumTO.cs 项目: OSEHRA/mdws
 public PhoneNumTO(PhoneNum mdo)
 {
     this.areaCode = mdo.AreaCode;
     this.exchange = mdo.Exchange;
     this.number = mdo.Number;
     this.description = mdo.Description;
 }
示例#2
0
        /// <summary>
        /// Asserts all parts of phone number are equal
        /// </summary>
        /// <param name="obj">PhoneNum</param>
        /// <returns>True if all phone number pieces are equal</returns>
        public override bool Equals(object obj)
        {
            if (!(obj is PhoneNum))
            {
                return(false);
            }
            PhoneNum temp = obj as PhoneNum;

            if (temp.AreaCode == this.areaCode && temp.Exchange == this.exchange && temp.Number == this.number)
            {
                return(true);
            }
            return(false);
        }