- correção novo usuario associar empresa

- correção tamnho cve usuario
- correção campo doc empresa

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@24144 d1611594-4594-4d17-8e1d-87c2c4800839
master
gleimar 2013-02-07 21:34:24 +00:00
parent f841b0f402
commit e1239d3003
4 changed files with 18 additions and 14 deletions

View File

@ -9,6 +9,8 @@ import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.List; import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.Predicate;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.Scope;
@ -517,10 +519,19 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
public void onClick$btnAdicionarEmpresa(Event ev) throws InterruptedException { public void onClick$btnAdicionarEmpresa(Event ev) throws InterruptedException {
Empresa empresa = (Empresa) cmbEmpresa.getSelectedItem().getValue(); final Empresa empresa = (Empresa) cmbEmpresa.getSelectedItem().getValue();
if (empresa != null) { if (empresa != null) {
List<UsuarioEmpresa> listUe = usuarioEmpresaService.obtenerPorEmpresaUsuario(empresa, usuario);
if(!listUe.isEmpty()){ boolean existeEmpresa = CollectionUtils.exists(lsUsuarioEmpresa,new Predicate() {
@Override
public boolean evaluate(Object object) {
return ((UsuarioEmpresa)object).getEmpresa().equals(empresa);
}
});
if(existeEmpresa){
Messagebox.show( Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"), Labels.getLabel("MSG.Registro.Existe"),
Labels.getLabel("editarUsuarioController.window.title"), Labels.getLabel("editarUsuarioController.window.title"),

View File

@ -7,7 +7,7 @@
# <controler>. <id>. <propiedade> = XXX # <controler>. <id>. <propiedade> = XXX
#Versao do VentaBoleto: #Versao do VentaBoleto:
versao = ADM_20130205_1RC105 versao = ADM_20130207_1RC106
# MSG Defaut: # MSG Defaut:
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100 MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
@ -1955,7 +1955,7 @@ busquedaUsuarioController.btnRefresh.tooltiptext = Atualizar
busquedaUsuarioController.btnNovo.tooltiptext = Incluir busquedaUsuarioController.btnNovo.tooltiptext = Incluir
busquedaUsuarioController.btnCerrar.tooltiptext = Fechar busquedaUsuarioController.btnCerrar.tooltiptext = Fechar
busquedaUsuarioController.lhId.label = ID busquedaUsuarioController.lhId.label = ID
busquedaUsuarioController.cveEmpleado.label = Código de Empregado busquedaUsuarioController.cveEmpleado.label = Código Empregado
busquedaUsuarioController.nombusuario.label = Nome Usuário busquedaUsuarioController.nombusuario.label = Nome Usuário
busquedaUsuarioController.nombpaterno.label = Sobrenome Paterno busquedaUsuarioController.nombpaterno.label = Sobrenome Paterno
busquedaUsuarioController.nombmaterno.label = Sobrenome Materno busquedaUsuarioController.nombmaterno.label = Sobrenome Materno
@ -1982,7 +1982,7 @@ editarUsuarioController.lhPuntoVenta.label = Ponto de Venda ( Agência )
editarUsuarioController.lhCNPJ.label = CNPJ editarUsuarioController.lhCNPJ.label = CNPJ
editarUsuarioController.lhTipo.label = Tipo editarUsuarioController.lhTipo.label = Tipo
editarUsuarioController.lhDescricao.label = Descrição editarUsuarioController.lhDescricao.label = Descrição
busquedaUsuarioController.CveUsuario.label = Código de Usuário busquedaUsuarioController.CveUsuario.label = Login
busquedaUsuarioController.CveEmpleado.label = Código de Empregado busquedaUsuarioController.CveEmpleado.label = Código de Empregado
editarUsuarioController.lhEmpresa.label = Empresa editarUsuarioController.lhEmpresa.label = Empresa
editarUsuarioController.chkCorteTurnoAutomatico.label = Corte Automático editarUsuarioController.chkCorteTurnoAutomatico.label = Corte Automático

View File

@ -64,13 +64,6 @@
label="${c:l('editarEmpresaController.IndTipo.3')}" /> label="${c:l('editarEmpresaController.IndTipo.3')}" />
</combobox> </combobox>
</row> </row>
<row>
<label
value="${c:l('editarEmpresaController.rfc.label')}" />
<textbox id="txtRFC" width="100px"
maxlength="13" value="@{winEditarEmpresa$composer.empresa.rfc}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row>
<row> <row>
<label <label
value="${c:l('editarEmpresaController.cnpj.label')}" /> value="${c:l('editarEmpresaController.cnpj.label')}" />

View File

@ -41,7 +41,7 @@
<rows> <rows>
<row> <row>
<label value="${c:l('busquedaUsuarioController.cveEmpleado.label')}"/> <label value="${c:l('busquedaUsuarioController.cveEmpleado.label')}"/>
<textbox id="txtCveEmpleado" width="80%" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/> <textbox id="txtCveEmpleado" width="80%" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" maxlength="10"/>
</row> </row>
<row spans="2"> <row spans="2">
<button id="btnPesquisa" image="/gui/img/find.png" <button id="btnPesquisa" image="/gui/img/find.png"