public override int GetHashCode() { int result = 1; result = (result * 397) ^ (Comment != null ? Comment.GetHashCode() : 0); result = (result * 397) ^ (Email != null ? Email.GetHashCode() : 0); result = (result * 397) ^ (FailedPasswordAttemptsCount != null ? FailedPasswordAttemptsCount.GetHashCode() : 0); result = (result * 397) ^ (FailedPasswordAttemptWindowStart != null ? FailedPasswordAttemptWindowStart.GetHashCode() : 0); result = (result * 397) ^ Id.GetHashCode(); result = (result * 397) ^ IsApproved.GetHashCode(); result = (result * 397) ^ IsFirstTimeUser.GetHashCode(); result = (result * 397) ^ IsLockedOut.GetHashCode(); result = (result * 397) ^ (LastActivityDate != null ? LastActivityDate.GetHashCode() : 0); result = (result * 397) ^ (LastLoginDate != null ? LastLoginDate.GetHashCode() : 0); result = (result * 397) ^ (LastPasswordChangeDate != null ? LastPasswordChangeDate.GetHashCode() : 0); result = (result * 397) ^ (Password != null ? Password.GetHashCode() : 0); result = (result * 397) ^ (PasswordKey != null ? PasswordKey.GetHashCode() : 0); result = (result * 397) ^ (Username != null ? Username.GetHashCode() : 0); result = (result * 397) ^ UserType.GetHashCode(); return(result); }
public void Load(AdministratorInfoDatabase dbInfo) { if (UserName != null) { dbInfo.UserName = UserName; } if (Password != null) { dbInfo.Password = Password; } if (PasswordFormat != null) { dbInfo.PasswordFormat = PasswordFormat; } if (CreationDate != null) { dbInfo.CreationDate = (DateTime)CreationDate; } if (LastActivityDate != null) { dbInfo.LastActivityDate = (DateTime)LastActivityDate; } if (CountOfLogin != null) { dbInfo.CountOfLogin = (int)CountOfLogin; } if (CountOfFailedLogin != null) { dbInfo.CountOfFailedLogin = (int)CountOfFailedLogin; } if (CreatorUserName != null) { dbInfo.CreatorUserName = CreatorUserName; } if (IsLockedOut != null) { dbInfo.IsLockedOut = IsLockedOut.ToString(); } if (SiteIdCollection != null) { dbInfo.SiteIdCollection = SiteIdCollection; } if (SiteId != null) { dbInfo.SiteId = (int)SiteId; } if (DepartmentId != null) { dbInfo.DepartmentId = (int)DepartmentId; } if (AreaId != null) { dbInfo.AreaId = (int)AreaId; } if (DisplayName != null) { dbInfo.DisplayName = DisplayName; } if (Email != null) { dbInfo.Email = Email; } if (Mobile != null) { dbInfo.Mobile = Mobile; } }
public void Load(UserInfoDatabase dbUserInfo) { if (UserName != null) { dbUserInfo.UserName = UserName; } if (Password != null) { dbUserInfo.Password = Password; } if (PasswordFormat != null) { dbUserInfo.PasswordFormat = PasswordFormat; } if (CreateDate != null) { dbUserInfo.CreateDate = (DateTime)CreateDate; } if (LastResetPasswordDate != null) { dbUserInfo.LastResetPasswordDate = (DateTime)LastResetPasswordDate; } if (LastActivityDate != null) { dbUserInfo.LastActivityDate = (DateTime)LastActivityDate; } if (CountOfLogin != null) { dbUserInfo.CountOfLogin = (int)CountOfLogin; } if (CountOfFailedLogin != null) { dbUserInfo.CountOfFailedLogin = (int)CountOfFailedLogin; } if (CountOfWriting != null) { dbUserInfo.CountOfWriting = (int)CountOfWriting; } if (IsChecked != null) { dbUserInfo.IsChecked = IsChecked.ToString(); } if (IsLockedOut != null) { dbUserInfo.IsLockedOut = IsLockedOut.ToString(); } if (DisplayName != null) { dbUserInfo.DisplayName = DisplayName; } if (Email != null) { dbUserInfo.Email = Email; } if (Mobile != null) { dbUserInfo.Mobile = Mobile; } if (AvatarUrl != null) { dbUserInfo.AvatarUrl = AvatarUrl; } if (Organization != null) { dbUserInfo.Organization = Organization; } if (Department != null) { dbUserInfo.Department = Department; } if (Position != null) { dbUserInfo.Position = Position; } if (Gender != null) { dbUserInfo.Gender = Gender; } if (Birthday != null) { dbUserInfo.Birthday = Birthday; } if (Education != null) { dbUserInfo.Education = Education; } if (Graduation != null) { dbUserInfo.Graduation = Graduation; } if (Address != null) { dbUserInfo.Address = Address; } if (WeiXin != null) { dbUserInfo.WeiXin = WeiXin; } if (Qq != null) { dbUserInfo.Qq = Qq; } if (WeiBo != null) { dbUserInfo.WeiBo = WeiBo; } if (Interests != null) { dbUserInfo.Interests = Interests; } if (Signature != null) { dbUserInfo.Signature = Signature; } }
/// <summary> /// Determines whether the specified Object is equal to the current Object. /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(object obj) { if (obj == null) { return(false); } if (Object.ReferenceEquals(this, obj)) { return(true); } if (this.GetType() != obj.GetType()) { return(false); } var other = (VLCredential)obj; //reference types if (!Object.Equals(LogOnToken, other.LogOnToken)) { return(false); } if (!Object.Equals(PswdToken, other.PswdToken)) { return(false); } if (!Object.Equals(PswdSalt, other.PswdSalt)) { return(false); } if (!Object.Equals(PswdQuestion, other.PswdQuestion)) { return(false); } if (!Object.Equals(PswdAnswer, other.PswdAnswer)) { return(false); } if (!Object.Equals(Comment, other.Comment)) { return(false); } //value types if (!CredentialId.Equals(other.CredentialId)) { return(false); } if (!Principal.Equals(other.Principal)) { return(false); } if (!PrincipalType.Equals(other.PrincipalType)) { return(false); } if (!PswdFormat.Equals(other.PswdFormat)) { return(false); } if (!IsApproved.Equals(other.IsApproved)) { return(false); } if (!IsLockedOut.Equals(other.IsLockedOut)) { return(false); } if (!LastLoginDate.Equals(other.LastLoginDate)) { return(false); } if (!LastPasswordChangedDate.Equals(other.LastPasswordChangedDate)) { return(false); } if (!LastLockoutDate.Equals(other.LastLockoutDate)) { return(false); } if (!FailedPasswordAttemptCount.Equals(other.FailedPasswordAttemptCount)) { return(false); } if (!FailedPasswordAttemptWindowStart.Equals(other.FailedPasswordAttemptWindowStart)) { return(false); } if (!FailedPasswordAnswerAttemptCount.Equals(other.FailedPasswordAnswerAttemptCount)) { return(false); } if (!FailedPasswordAnswerAttemptWindowStart.Equals(other.FailedPasswordAnswerAttemptWindowStart)) { return(false); } return(true); }