Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Shopping alto_palermo = 5;

            Comerciante a  = new Comerciante("Alberto", "Samudio");
            Comerciante b  = new Comerciante("Juan", "Leirado");
            Exportador  e1 = new Exportador("Electrónica 80", 15200f, "Domingo", "Caballo", Exportador.ETipoProducto.Tecnologia);
            Importador  i1 = new Importador("Granola S.A.", 23900f, a, Importador.EPaises.UnionEuropea);
            Exportador  e2 = new Exportador("Matarife", 29095f, "Joe", "Molleja", Exportador.ETipoProducto.Rural);
            Importador  i2 = new Importador("Matarife", 203000f, a, Importador.EPaises.Taiwan);
            Importador  i3 = new Importador("Matarife", 98000f, a, Importador.EPaises.China);
            Importador  i4 = new Importador("Matarife", 10350f, b, Importador.EPaises.UnionEuropea);

            alto_palermo += e1;
            alto_palermo += e1;
            alto_palermo += i1;
            alto_palermo += e2;
            alto_palermo += i2;
            alto_palermo += i3;
            alto_palermo += i4;

            Console.WriteLine(Shopping.Mostrar(alto_palermo));

            Console.ReadKey();
        }
Exemplo n.º 2
0
        public DUEItem(int dueId, string nf)
        {
            DueId = dueId;
            NF    = nf;

            Exportador = new Exportador();
            Importador = new Importador();
        }
Exemplo n.º 3
0
        public DUEItem(int dueId, int motivoDispensaNF, string condicaoVenda)
        {
            DueId            = dueId;
            MotivoDispensaNF = motivoDispensaNF;
            CondicaoVenda    = condicaoVenda;

            Exportador = new Exportador();
            Importador = new Importador();
        }
Exemplo n.º 4
0
 public async static Task <bool> Guardar(Importador importador)
 {
     if (!await Existe(importador.ImportadorId))
     {
         return(await Insertar(importador));
     }
     else
     {
         return(await Modificar(importador));
     }
 }
        private async void InicializarImportador(int importadorId)
        {
            var _importador = await ImportadorBLL.Buscar(importadorId);

            if (_importador != null)
            {
                importador = _importador;
            }
            else
            {
                MessageBox.Show("Este importador fue eliminado");
            }
        }
Exemplo n.º 6
0
        public void SincronizarRegistros()
        {
            Importador imp = new Importador();

            try
            {
                imp.ImportarBase(DBF_ConnectionString, false);
            }
            catch (Exception exc)
            {
                EventLog.WriteEntry("TyG-SynchService", "Error al ejecutar sincronización " + exc.StackTrace, EventLogEntryType.Error);
            }
            OnCallBack();
        }
        public RegistroImportador(int importadorId = 0)
        {
            InitializeComponent();

            if (importadorId > 0)
            {
                InicializarImportador(importadorId);
            }
            else
            {
                importador = new Importador();
            }

            this.DataContext = importador;
            MyPropertyChanged("importador");
        }
        private void VerButton_Click(object sender, RoutedEventArgs e)
        {
            Importador importador = (sender as Button).DataContext as Importador;

            if (SeleccionarImportador)
            {
                ((RegistroImportador)Owner).RecibirImportadorSeleccionado(importador);
                Close();
            }
            else
            {
                RegistroImportador registroImportador = new RegistroImportador(importador.ImportadorId);
                registroImportador.Owner = this;
                registroImportador.Show();
            }
        }
        public Ventana()
        {
            InitializeComponent();

            miImportador = Importador.crear();

            CboxTipo.Items.AddRange(Tipos);
            CboxTipo.SelectedIndex = 0;

            CambiarBotonRefrescar(false);
            ActualizarDatos();

            miFileSystemWatcher.Path   = miDirectorio;
            miFileSystemWatcher.Filter = "*" + miFormatoArchivo;

            BtnCrearEjemplo.Visible = false;
        }
Exemplo n.º 10
0
        public async static Task <bool> Modificar(Importador importador)
        {
            bool     paso     = false;
            Contexto contexto = new Contexto();

            try
            {
                contexto.Entry(importador).State = EntityState.Modified;

                paso = await contexto.SaveChangesAsync() > 0;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                await contexto.DisposeAsync();
            }
            return(paso);
        }
Exemplo n.º 11
0
        private async static Task <bool> Insertar(Importador importador)
        {
            bool     paso     = false;
            Contexto contexto = new Contexto();

            try
            {
                contexto.Importadores.Add(importador);
                paso = await contexto.SaveChangesAsync() > 0;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                await contexto.DisposeAsync();
            }

            return(paso);
        }
 public void RecibirImportadorSeleccionado(Importador importador)
 {
     ImportadorIdTextBox.Text = importador.ImportadorId.ToString();
 }
 private void Limpiar()
 {
     importador       = new Importador();
     this.DataContext = importador;
     MyPropertyChanged("importador");
 }