protected override EmployeeInfo Parse() { return(new EmployeeInfo { ID = ToInt(ID), EmployeeNumber = EmployeeNumber.ToString(), FirstName = FirstName.ToString(), LastName = LastName.ToString(), MI = MI.ToString(), Email = Email.ToString(), Password = Password.ToString(), Contact = Contact.ToString(), Address = Address.ToString(), Birthday = Birthday.ToString(), Gender = Gender.ToString(), Religion = Religion.ToString(), Nationality = Nationality.ToString(), Birthplace = Birthplace.ToString(), CivilStatus = CivilStatus.ToString(), EmployeeStatusID = ToInt(EmployeeStatusID), DateHired = DateHired.ToString(), DateCreated = DateCreated.ToString(), DatedUpdated = DatedUpdated.ToString(), DatedDeleted = DatedDeleted.ToString(), RoleID = ToInt(RoleID), EmployeeStatus = EmployeeStatus.ToString(), RoleStatus = RoleStatus.ToString() }); }
public override string ToString() { return("Id: " + Id + "\r\nEmployeeName: " + EmployeeName + "\r\nBirthdate: " + Birthdate.ToString("MM/dd/yyyy") + "\r\nSalary: " + Salary + "\r\nDateHired: " + DateHired.ToString("MM/dd/yyyy") + "\r\nInvalid: " + (Invalid ? "invalid" : "valid") + "\r\n\r\n"); }
public override int GetHashCode() { int hash = 1; if (entityId_ != null) { hash ^= EntityId.GetHashCode(); } if (UserId.Length != 0) { hash ^= UserId.GetHashCode(); } if (Password.Length != 0) { hash ^= Password.GetHashCode(); } if (DisplayName.Length != 0) { hash ^= DisplayName.GetHashCode(); } if (EmergencyContactPhoneNumber.Length != 0) { hash ^= EmergencyContactPhoneNumber.GetHashCode(); } if (IsPhoneDataDisplayable != false) { hash ^= IsPhoneDataDisplayable.GetHashCode(); } if (dateHired_ != null) { hash ^= DateHired.GetHashCode(); } if (IsActive != false) { hash ^= IsActive.GetHashCode(); } if (department_ != null) { hash ^= Department.GetHashCode(); } if (DepartmentName.Length != 0) { hash ^= DepartmentName.GetHashCode(); } if (contactInfo_ != null) { hash ^= ContactInfo.GetHashCode(); } if (IsIncluded != false) { hash ^= IsIncluded.GetHashCode(); } return(hash); }
public bool Equals(Employee other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Id.Equals(other.Id) && Name.Equals(other.Name) && Surname.Equals(other.Surname) && Patronymic.Equals(other.Patronymic) && DepartmentId.Equals(other.DepartmentId) && IsFired.Equals(other.IsFired) && Salary.Equals(other.Salary) && DateHired.Equals(other.DateHired) && DateFired.Equals(other.DateFired)); }
public void MergeFrom(StaffMember other) { if (other == null) { return; } if (other.entityId_ != null) { if (entityId_ == null) { entityId_ = new global::HOLMS.Types.IAM.StaffMemberIndicator(); } EntityId.MergeFrom(other.EntityId); } if (other.UserId.Length != 0) { UserId = other.UserId; } if (other.Password.Length != 0) { Password = other.Password; } if (other.DisplayName.Length != 0) { DisplayName = other.DisplayName; } if (other.EmergencyContactPhoneNumber.Length != 0) { EmergencyContactPhoneNumber = other.EmergencyContactPhoneNumber; } if (other.IsPhoneDataDisplayable != false) { IsPhoneDataDisplayable = other.IsPhoneDataDisplayable; } if (other.dateHired_ != null) { if (dateHired_ == null) { dateHired_ = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } DateHired.MergeFrom(other.DateHired); } if (other.IsActive != false) { IsActive = other.IsActive; } if (other.department_ != null) { if (department_ == null) { department_ = new global::HOLMS.Types.IAM.DepartmentIndicator(); } Department.MergeFrom(other.Department); } if (other.DepartmentName.Length != 0) { DepartmentName = other.DepartmentName; } if (other.contactInfo_ != null) { if (contactInfo_ == null) { contactInfo_ = new global::HOLMS.Types.Primitive.ContactInformation(); } ContactInfo.MergeFrom(other.ContactInfo); } if (other.IsIncluded != false) { IsIncluded = other.IsIncluded; } }