// fetch all contact of flat basis on flatId public ContactLoginResults ValidateContactLogin(string email, string password, string ipAddress) { ACS.Core.Domain.Master.ExecutiveMaster Executive = null; Executive = GetContactDetailByEmailID(email); if (Executive == null) { return(ContactLoginResults.CustomerNotExist); } string pwd = ""; //pwd = _encryptionService.CreatePasswordHash(password, contact.PasswordKey, _contactSettings.HashedPasswordFormat); pwd = _encryptionService.EncryptText(password, ""); bool isValid = pwd == Executive.Password; //save last login date if (isValid) { // Login history// // end return(ContactLoginResults.Successful); } else { return(ContactLoginResults.WrongPassword); } }
public static bool IsRegistered(this ACS.Core.Domain.Master.ExecutiveMaster user) { if (user == null) { throw new ArgumentNullException("user"); } return(!string.IsNullOrEmpty(user.Password)); }
// delete contact details public void deleteContact(ACS.Core.Domain.Master.ExecutiveMaster Executive) { if (Executive == null) { throw new ArgumentNullException("Executive"); } _contactRepository.Delete(Executive); }
// udate contact details......... public void updateContact(ACS.Core.Domain.Master.ExecutiveMaster Executive) { if (Executive == null) { throw new ArgumentNullException("Executive"); } Executive.ModifiedDate = DateTime.Now; _contactRepository.Update(Executive); }
/// <summary> /// Get full name with salutation /// </summary> /// <param name="contact">Contact</param> /// <returns>Resident full name with salutation</returns> public static string FullNameWithSalutation(this ACS.Core.Domain.Master.ExecutiveMaster Executive) { if (Executive == null) { throw new ArgumentNullException("Executive"); } var firstName = Executive.executiveName; string fullName = ""; if (!String.IsNullOrWhiteSpace(firstName)) { fullName = string.Format("{0}", firstName); } else { if (!String.IsNullOrWhiteSpace(firstName)) { fullName = firstName; } } return(fullName); }