Exemplo n.º 1
0
 public ABMusuario(
     IBitacoraBLL bitacoraBLL,
     IFormControl formControl,
     IFamiliaBLL familiasBLL,
     IPatenteBLL patenteBLL,
     IDigitoVerificador digitoVerificador,
     IBloqueoUsuario bloqueoUsuario,
     IIdiomaBLL idiomaBLL,
     IAdminPat adminPat,
     IAdminFam adminFam,
     INegarPat negarPat,
     ITraductor traductor)
 {
     this.bitacoraBLL       = bitacoraBLL;
     this.formControl       = formControl;
     this.familiasBLL       = familiasBLL;
     this.patenteBLL        = patenteBLL;
     this.digitoVerificador = digitoVerificador;
     this.bloqueoUsuario    = bloqueoUsuario;
     this.idiomaBLL         = idiomaBLL;
     this.negarPat          = negarPat;
     this.adminFam          = adminFam;
     this.adminPat          = adminPat;
     this.traductor         = traductor;
     InitializeComponent();
     dgusuario.AutoGenerateColumns = false;
 }
Exemplo n.º 2
0
 public Login(IIdiomaBLL idiomaBLL, IDigitoVerificador digitoVerificador, ITraductor traductor)
 {
     this.digitoVerificador = digitoVerificador;
     this.idiomaBLL         = idiomaBLL;
     this.traductor         = traductor;
     InitializeComponent();
     txt_contraseña.PasswordChar = '*';
 }
Exemplo n.º 3
0
 public VentaUI(ITraductor traductor, IVentaBLL ventaBLL, IClienteBLL clienteBLL, IUsuarioBLL usuarioBLL, IDetalleRefForm detalleRefForm)
 {
     this.traductor      = traductor;
     this.ventaBLL       = ventaBLL;
     this.clienteBLL     = clienteBLL;
     this.usuarioBLL     = usuarioBLL;
     this.detalleRefForm = detalleRefForm;
     InitializeComponent();
     dgVenta.AutoGenerateColumns = false;
 }
Exemplo n.º 4
0
        public IEnumerable <Bitacora> ObtenerTodasLasEntradasEnBitacora(ITraductor traductor, DateTime desde, DateTime hasta, Evento evento)
        {
            if (evento != null && evento.Id < 0)
            {
                evento = null;
            }

            return(this.ObtenerTodasLasEntradasEnBitacora(traductor)
                   .Where(l => l.CreatedOn >= desde && l.CreatedOn <= hasta)
                   .Where(l => evento == null || evento.Id.Equals(l.Evento.Id)));
        }
Exemplo n.º 5
0
        public Evento[] ObtenerEventosDisponibles(ITraductor traductor)
        {
            var eventos = _unitOfWork.BitacoraRepository.EventosDisponibles;

            foreach (var evento in eventos)
            {
                evento.Descripcion = this.TraducirEvento(traductor, evento.Descripcion);
            }

            return(eventos);
        }
Exemplo n.º 6
0
        public TipoRechazo[] GetTipoRechazo(ITraductor _traductor)
        {
            var tiposRechazos = _unitOfWork.ComprobanteRepository.GetTiposRechazo();

            foreach (var item in tiposRechazos)
            {
                item.Descripcion = _traductor.Traducir(item.Descripcion);
            }

            return(tiposRechazos);
        }
Exemplo n.º 7
0
        public IEnumerable <Bitacora> ObtenerTodasLasEntradasEnBitacora(ITraductor traductor)
        {
            var entradas = _unitOfWork.BitacoraRepository.ObtenerTodasLasEntradasEnBitacora()
                           .OrderByDescending(b => b.CreatedOn)
                           .ToList();

            //Realizo la traducción del evento segun el idioma de preferencia
            foreach (var entradaEnBitacora in entradas)
            {
                //var eventoId = entradaEnBitacora.Evento.Id;
                var eventoId = entradaEnBitacora.Evento_ID;
                var field    = typeof(Evento).GetFields(BindingFlags.Public | BindingFlags.Static)
                               .Single(f => (int)f.GetValue(null) == eventoId);

                entradaEnBitacora.Evento.Descripcion = this.TraducirEvento(traductor, field.Name);
            }
            return(entradas);
        }
Exemplo n.º 8
0
 public DetalleVentaUI(
     IVentaBLL ventaBLL,
     IDetalleVentaBLL detalleVentaBLL,
     IProductoBLL productoBLL,
     IProductos productos,
     IClienteBLL clienteBLL,
     IClientes cliente,
     IFormControl formControl,
     ITraductor traductor)
 {
     this.ventaBLL        = ventaBLL;
     this.detalleVentaBLL = detalleVentaBLL;
     this.productoBLL     = productoBLL;
     this.productos       = productos;
     this.cliente         = cliente;
     this.clienteBLL      = clienteBLL;
     this.formControl     = formControl;
     this.traductor       = traductor;
     InitializeComponent();
     dgDetalleVta.AutoGenerateColumns = false;
 }
Exemplo n.º 9
0
 private string TraducirEvento(ITraductor traductor, string nombreEvento)
 {
     return(traductor.Traducir("Evento" + nombreEvento));
 }
Exemplo n.º 10
0
 private static DialogResult MostrarDialogo(Form thisForm, ITraductor traductor, string constanteDeTexto, MessageBoxIcon icono)
 {
     return(MostrarDialogo(thisForm, traductor.Traducir(constanteDeTexto), icono));
 }
Exemplo n.º 11
0
 public static DialogResult MostrarDialogoError(this Form thisForm, ITraductor traductor, string constanteDeTexto)
 {
     return(MostrarDialogo(thisForm, traductor, constanteDeTexto, MessageBoxIcon.Error));
 }
Exemplo n.º 12
0
 public static DialogResult MostrarDialogoAdvertencia(this Form thisForm, ITraductor traductor, string constanteDeTexto)
 {
     return(MostrarDialogo(thisForm, traductor, constanteDeTexto, MessageBoxIcon.Warning));
 }
Exemplo n.º 13
0
 public static DialogResult MostrarDialogoInformacionFormateado(this Form thisForm, ITraductor traductor, string constanteDeTextoFormat, params object[] args)
 {
     return(MostrarDialogo(thisForm, traductor.TraducirConFormato(constanteDeTextoFormat, args), MessageBoxIcon.Information));
 }
Exemplo n.º 14
0
 public static DialogResult MostrarDialogoInformacion(this Form thisForm, ITraductor traductor, string constanteDeTexto)
 {
     return(MostrarDialogo(thisForm, traductor, constanteDeTexto, MessageBoxIcon.Information));
 }