public SystemUserKey(SystemUserBase entity) { this.Entity = entity; if (entity != null) { this.userCode = entity.UserCode; } }
public virtual bool Equals(SystemUserBase toObject) { if (toObject == null) { return(false); } return(Equals(this, toObject)); }
public static bool Equals(SystemUserBase Object1, SystemUserBase Object2) { if ((Object1 == null) && (Object2 == null)) { return(true); } if ((Object1 == null) ^ (Object2 == null)) { return(false); } bool flag = true; if (Object1.UserCode != Object2.UserCode) { flag = false; } if ((Object1.UserID != null) && (Object2.UserID != null)) { if (Object1.UserID != Object2.UserID) { flag = false; } } else if ((Object1.UserID == null) ^ (Object2.UserID == null)) { flag = false; } if ((Object1.UserName != null) && (Object2.UserName != null)) { if (Object1.UserName != Object2.UserName) { flag = false; } } else if ((Object1.UserName == null) ^ (Object2.UserName == null)) { flag = false; } if ((Object1.OwnName != null) && (Object2.OwnName != null)) { if (Object1.OwnName != Object2.OwnName) { flag = false; } } else if ((Object1.OwnName == null) ^ (Object2.OwnName == null)) { flag = false; } if ((Object1.PassWord != null) && (Object2.PassWord != null)) { if (Object1.PassWord != Object2.PassWord) { flag = false; } } else if ((Object1.PassWord == null) ^ (Object2.PassWord == null)) { flag = false; } if ((Object1.Sex != null) && (Object2.Sex != null)) { if (Object1.Sex != Object2.Sex) { flag = false; } } else if ((Object1.Sex == null) ^ (Object2.Sex == null)) { flag = false; } if ((Object1.Phone != null) && (Object2.Phone != null)) { if (Object1.Phone != Object2.Phone) { flag = false; } } else if ((Object1.Phone == null) ^ (Object2.Phone == null)) { flag = false; } if ((Object1.MailBox != null) && (Object2.MailBox != null)) { if (Object1.MailBox != Object2.MailBox) { flag = false; } } else if ((Object1.MailBox == null) ^ (Object2.MailBox == null)) { flag = false; } if ((Object1.Note != null) && (Object2.Note != null)) { if (Object1.Note != Object2.Note) { flag = false; } } else if ((Object1.Note == null) ^ (Object2.Note == null)) { flag = false; } if (Object1.BirthDay.HasValue && Object2.BirthDay.HasValue) { if (Object1.BirthDay != Object2.BirthDay) { flag = false; } } else if (!Object1.BirthDay.HasValue ^ !Object2.BirthDay.HasValue) { flag = false; } if ((Object1.PhoneHome != null) && (Object2.PhoneHome != null)) { if (Object1.PhoneHome != Object2.PhoneHome) { flag = false; } } else if ((Object1.PhoneHome == null) ^ (Object2.PhoneHome == null)) { flag = false; } if ((Object1.Address != null) && (Object2.Address != null)) { if (Object1.Address != Object2.Address) { flag = false; } } else if ((Object1.Address == null) ^ (Object2.Address == null)) { flag = false; } if ((Object1.Mobile != null) && (Object2.Mobile != null)) { if (Object1.Mobile != Object2.Mobile) { flag = false; } } else if ((Object1.Mobile == null) ^ (Object2.Mobile == null)) { flag = false; } if ((Object1.Fax != null) && (Object2.Fax != null)) { if (Object1.Fax != Object2.Fax) { flag = false; } } else if ((Object1.Fax == null) ^ (Object2.Fax == null)) { flag = false; } if (Object1.Status.HasValue && Object2.Status.HasValue) { if (Object1.Status != Object2.Status) { flag = false; } } else if (!Object1.Status.HasValue ^ !Object2.Status.HasValue) { flag = false; } if ((Object1.LastProjectCode != null) && (Object2.LastProjectCode != null)) { if (Object1.LastProjectCode != Object2.LastProjectCode) { flag = false; } } else if ((Object1.LastProjectCode == null) ^ (Object2.LastProjectCode == null)) { flag = false; } if ((Object1.SortID != null) && (Object2.SortID != null)) { if (Object1.SortID != Object2.SortID) { flag = false; } } else if ((Object1.SortID == null) ^ (Object2.SortID == null)) { flag = false; } if ((Object1.ShortUserName != null) && (Object2.ShortUserName != null)) { if (Object1.ShortUserName != Object2.ShortUserName) { flag = false; } return(flag); } if ((Object1.ShortUserName == null) ^ (Object2.ShortUserName == null)) { flag = false; } return(flag); }