コード例 #1
0
        public void EditEmployee(Client client, bool validateUsername, bool validatePassword)
        {
            IValidator validator = ClientValidator.CreateValidator(client, validateUsername, validatePassword,
                                                                   profileId, singleProfileName);

            validator.Validate();
            repository.EditClient(client);
        }
コード例 #2
0
        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);
        }