public override void Inicializador(long?entidadId)
        {
            if (entidadId.HasValue)
            {
                return;
            }

            CargarComboBox(cmbProvincia, _provinciaServicio.ObtenerProvincia(string.Empty), "Descripcion", "Id");

            if (cmbProvincia.Items.Count > 0)
            {
                var provincia = (ProvinciaDTO)cmbProvincia.Items[0];

                CargarComboBox(cmbLocalidad, _localidadServicio.ObtenerLocalidadPorProvincia(provincia.Id, string.Empty), "Descripcion", "Id");
            }


            nudLegajo.Minimum = 1;
            nudLegajo.Maximum = 99999999;
            nudLegajo.Value   = _empleadoServicio.ObtenerSiguienteLegajo();

            txtApellido.KeyPress += Validacion.NoSimbolos;
            txtApellido.KeyPress += Validacion.NoNumeros;

            txtNombre.KeyPress += Validacion.NoSimbolos;
            txtNombre.KeyPress += Validacion.NoNumeros;

            txtDni.KeyPress += Validacion.NoSimbolos;
            txtDni.KeyPress += Validacion.NoLetras;

            txtCuil.KeyPress += Validacion.NoSimbolos;
            txtCuil.KeyPress += Validacion.NoLetras;

            txtTelefono.KeyPress += Validacion.NoSimbolos;
            txtTelefono.KeyPress += Validacion.NoLetras;

            txtCelular.KeyPress += Validacion.NoSimbolos;
            txtCelular.KeyPress += Validacion.NoLetras;

            Validacion.ValidarEmail(txtEmail.Text, error, txtEmail);
            imgFotoEmpleado.Image = Constantes.Imagenes.ImagenUsuario;

            txtApellido.Focus();
        }
Exemple #2
0
        public override void Inicializador(long?entidadId)
        {
            if (entidadId.HasValue)
            {
                return;
            }

            CargarComboBox(cmbProvincia, _provinciaServicio.ObtenerProvincia(string.Empty), "Descripcion", "Id");

            if (cmbProvincia.Items.Count > 0)
            {
                var provincia = (ProvinciaDTO)cmbProvincia.Items[0];

                CargarComboBox(cmbLocalidad, _localidadServicio.ObtenerLocalidadPorProvincia(provincia.Id, string.Empty), "Descripcion", "Id");
            }

            // txtMontoMaximoCtaCte.KeyPress += Validacion.NoSimbolos;
            txtMontoMaximoCtaCte.KeyPress += Validacion.NoLetras;

            txtApellido.KeyPress += Validacion.NoSimbolos;
            txtApellido.KeyPress += Validacion.NoNumeros;

            txtNombre.KeyPress += Validacion.NoSimbolos;
            txtNombre.KeyPress += Validacion.NoNumeros;

            txtDni.KeyPress += Validacion.NoSimbolos;
            txtDni.KeyPress += Validacion.NoLetras;

            txtCuil.KeyPress += Validacion.NoSimbolos;
            txtCuil.KeyPress += Validacion.NoLetras;

            txtTelefono.KeyPress += Validacion.NoSimbolos;
            txtTelefono.KeyPress += Validacion.NoLetras;

            txtCelular.KeyPress += Validacion.NoSimbolos;
            txtCelular.KeyPress += Validacion.NoLetras;

            imgFotoCliente.Image = Constantes.Imagenes.ImagenUsuario;

            txtApellido.Focus();
        }