Exemplo n.º 1
0
        public override void EjecutarComandoNuevo()
        {
            var nuevoRegistro = new MotivoBajaDto();

            nuevoRegistro.Descripcion = txtDescripcion.Text;
            nuevoRegistro.Eliminado   = false;

            _motivoBajaServicio.Insertar(nuevoRegistro);
        }
 public override void EjecutarComandoNuevo()
 {
     _motivoBajaServicio.Insertar(new MotivoBajaDto
     {
         Descripcion  = txtObservacion.Text,
         Eliminado    = false,
         ArticuloId   = (long)cmbArticulo.SelectedValue,
         MotivoBajaId = (long)cmbMotivoBaja.SelectedValue,
     });
 }
Exemplo n.º 3
0
        /*public override void CargarDatos(long? entidadId)
         * {
         *  if (!entidadId.HasValue)
         *  {
         *      MessageBox.Show(@"Ocurrio un Error Grave", @"Error Grave", MessageBoxButtons.OK, MessageBoxIcon.Stop);
         *
         *      this.Close();
         *  }
         *
         *  if (TipoOperacion == TipoOperacion.Eliminar)
         *  {
         *      btnLimpiar.Enabled = false;
         *  }
         *
         *  var provincia = _motivoBajaServicio.ObtenerPorId(entidadId.Value);
         *
         * }*/

        public override bool EjecutarComandoNuevo()
        {
            if (!VerificarDatosObligatorios())
            {
                MessageBox.Show(@"Por favor ingrese los campos Obligatorios.", @"Atención", MessageBoxButtons.OK,
                                MessageBoxIcon.Error);
                return(false);
            }

            var motivoBajaNuevo = new MotivoBajaDTO
            {
                Descripcion = txtMotivoBaja.Text,
            };

            _motivoBajaServicio.Insertar(motivoBajaNuevo);
            return(true);
        }