public void EditEmployee(Client client, bool validateUsername, bool validatePassword) { IValidator validator = ClientValidator.CreateValidator(client, validateUsername, validatePassword, profileId, singleProfileName); validator.Validate(); repository.EditClient(client); }
public void NewClient(Client client) { IValidator validator = ClientValidator.CreateValidator(client, false, true, profileId, singleProfileName); validator.Validate(); client.Credentials.EncriptedPassword = client.Credentials.EncryptPassword(); repository.NewClient(client); }