Exemplo n.º 1
0
        public _60002_ABM_Provedores(string tipoOperacion, long?entidadId)
            : base(tipoOperacion, entidadId)
        {
            InitializeComponent();

            _proveedorServicio    = new ProvedoresServicio();
            _condicionIvaServicio = new CondicionIvaServicio();
            _rubroServicio        = new RubroServicio();

            Init(tipoOperacion, entidadId);

            PoblarComboBox(cmbRubro, _rubroServicio.ObtenerTodo(), "Descripcion", "Id");
            PoblarComboBox(cmbCondicionIva, _condicionIvaServicio.ObtenerTodo(), "Descripcion", "Id");


            if (tipoOperacion == Constante.TipoOperacion.Modificar)
            {
                _proveedorId = entidadId;
                cmbCondicionIva.DropDownStyle = ComboBoxStyle.DropDown;
            }

            if (tipoOperacion == Constante.TipoOperacion.Nuevo)
            {
                _proveedorId = null;
            }

            if (tipoOperacion == Constante.TipoOperacion.Eliminar)
            {
                _proveedorId = entidadId;
            }

            txtApyNomContacto.Enter += txt_Enter;
            txtApyNomContacto.Leave += txt_Leave;
            txtCuit.Enter           += txt_Enter;
            txtCuit.Leave           += txt_Leave;
            txtDireccion.Enter      += txt_Enter;
            txtDireccion.Leave      += txt_Leave;
            txtNombFantasia.Enter   += txt_Enter;
            txtNombFantasia.Leave   += txt_Leave;
            txtTelefono.Enter       += txt_Enter;
            txtTelefono.Leave       += txt_Leave;
            nudIngresosBrutos.Enter += txt_Enter;
            nudIngresosBrutos.Leave += txt_Leave;

            txtApyNomContacto.KeyPress += Validacion.NoSimbolos;
            txtApyNomContacto.KeyPress += Validacion.NoInyeccion;
            txtApyNomContacto.KeyPress += Validacion.NoNumeros;

            txtCuit.KeyPress += Validacion.NoSimbolos;
            txtCuit.KeyPress += Validacion.NoInyeccion;
            txtCuit.KeyPress += Validacion.NoLetras;

            txtDireccion.KeyPress += Validacion.NoSimbolos;
            txtDireccion.KeyPress += Validacion.NoInyeccion;

            txtNombFantasia.KeyPress += Validacion.NoSimbolos;
            txtNombFantasia.KeyPress += Validacion.NoInyeccion;

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

            nudIngresosBrutos.KeyPress += Validacion.NoInyeccion;
            nudIngresosBrutos.KeyPress += Validacion.NoSimbolos;
            nudIngresosBrutos.KeyPress += Validacion.NoNumeros;

            PoblarComboBox(cmbCondicionIva, _condicionIvaServicio.ObtenerTodo(), "Descripcion", "Id");
            PoblarComboBox(cmbRubro, _rubroServicio.ObtenerTodo(), "Descripcion", "Id");
        }
Exemplo n.º 2
0
 public void ActualizarComboCondicionIva()
 {
     cmbCondicionIva.DataSource   = _condicionIvaServicio.ObtenerTodo();
     cmbCondicionIva.SelectedItem = null;
     cmbCondicionIva.Focus();
 }