public bool ChangeCustomerPassword(string deviceId, string password, string email) { try { using (var dataContract = new CustomerContract()) { string encryptedPassword = CryptorEngine.Encrypt(password, true); if (!string.IsNullOrEmpty(deviceId) && string.IsNullOrEmpty(email)) { return(dataContract.ChangeCustomerPassword(deviceId.Trim(), encryptedPassword, "")); } else if (string.IsNullOrEmpty(deviceId) && !string.IsNullOrEmpty(email)) { return(dataContract.ChangeCustomerPassword("", encryptedPassword, email)); } return(false); } } catch { throw; } }