public void loadItems()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteArticulo> ic = new FixupCollection <DeleteArticulo>();

            if (element != null)
            {
                if (((List <ARTICULO>)element).Count > 0)
                {
                    foreach (ARTICULO item in (List <ARTICULO>)element)
                    {
                        DeleteArticulo aux = new DeleteArticulo(item);
                        //item.IsChecked = false;
                        ic.Add(aux);
                    }
                }
            }
            this.Articulos = ic;
            //FixupCollection<DeleteArticulo> ic = new FixupCollection<DeleteArticulo>();

            //foreach (ARTICULO elemento in (List<ARTICULO>)element)
            //{
            //    ic.Add((ARTICULO)elemento);
            //}
            //if (ic != null)
            //{
            //    this.Articulos = ic;
            //}
        }
Beispiel #2
0
        public void AddRol(long unidUser)
        {
            AppRolDataMapper dataMapper = new AppRolDataMapper();

            object element = dataMapper.getElementRoles(unidUser);

            FixupCollection <DeleteRol> ic = new FixupCollection <DeleteRol>();

            if (element != null)
            {
                if (((List <ROL>)element).Count > 0)
                {
                    foreach (ROL item in (List <ROL>)element)
                    {
                        if (item.UNID_ROL != 1)
                        {
                            DeleteRol aux = new DeleteRol(item);
                            ic.Add(aux);
                        }
                    }
                }
            }

            if (ic.Count != 0)
            {
                foreach (var item in ic.Reverse())
                {
                    this._addUsuarioViewModel.ModiUsuarioModel.Rol.Add(item);
                    break;
                }
            }
        }
Beispiel #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="categoria"></param>
        /// <param name="equipo"></param>
        /// <returns>Regresa un string JSON y si no hay datos </returns>
        public FixupCollection <ARTICULO> getElement(CATEGORIA categoria, EQUIPO equipo)
        {
            FixupCollection <ARTICULO> articulos = new FixupCollection <ARTICULO>();


            if (categoria != null && equipo != null)
            {
                using (var entity = new TAE2Entities())
                {
                    try
                    {
                        (from cust in entity.ARTICULOes
                         where cust.UNID_CATEGORIA == categoria.UNID_CATEGORIA &&
                         cust.UNID_EQUIPO == equipo.UNID_EQUIPO
                         select cust).ToList <ARTICULO>().ForEach(o => articulos.Add(o));
                    }
                    catch (Exception ex)
                    {
                        ;
                    }
                }
            }//endif

            return(articulos);
        }
        public FixupCollection <EQUIPO> GetArticuloEquipoByCategoria(CATEGORIA categoria)
        {
            FixupCollection <EQUIPO> equipos = new FixupCollection <EQUIPO>();

            if (categoria != null)
            {
                using (var entity = new TAE2Entities())
                {
                    try
                    {
                        (from art in entity.ARTICULOes
                         join catt in entity.CATEGORIAs
                         on art.UNID_CATEGORIA equals catt.UNID_CATEGORIA
                         join equ in entity.EQUIPOes
                         on art.UNID_EQUIPO equals equ.UNID_EQUIPO
                         where catt.UNID_CATEGORIA == categoria.UNID_CATEGORIA
                         select equ
                        ).Distinct().ToList <EQUIPO>().ForEach(o => equipos.Add(new EQUIPO()
                        {
                            UNID_EQUIPO = o.UNID_EQUIPO, EQUIPO_NAME = o.EQUIPO_NAME
                        }));
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }

            return(equipos);
        }
Beispiel #5
0
        public void loadRoles()
        {
            object element = this._dataMapper.getElementRoles(this.UNID_USUARIO);

            FixupCollection <DeleteRol> ic = new FixupCollection <DeleteRol>();
            string ru = null;

            if (element != null)
            {
                if (((List <ROL>)element).Count > 0)
                {
                    foreach (ROL item in (List <ROL>)element)
                    {
                        if (item.UNID_ROL != 1)
                        {
                            DeleteRol aux = new DeleteRol(item);
                            ic.Add(aux);
                            ru += item.ROL_NAME + " ; ";
                        }
                    }
                }
            }
            this.Roles         = ic;
            this.UsuariosRoles = ru;
        }
Beispiel #6
0
        public JobViewModel()
        {
            ProccesBatch = new FixupCollection <PROCESS_BATCH>();
            List <PROCESS_BATCH> l = new List <PROCESS_BATCH>();

            l = CallServiceGetProcessMatch();
            if (l != null)
            {
                foreach (PROCESS_BATCH p in l)
                {
                    ProccesBatch.Add(p);
                }
            }
        }
Beispiel #7
0
        public void AttempActualizar()
        {
            ProccesBatch = new FixupCollection <PROCESS_BATCH>();
            List <PROCESS_BATCH> l = new List <PROCESS_BATCH>();

            l = CallServiceGetProcessMatch();
            if (l != null)
            {
                foreach (PROCESS_BATCH p in l)
                {
                    ProccesBatch.Add(p);
                }
            }
        }
Beispiel #8
0
        public void loadItems(CategoriaModel categoria)
        {
            FixupCollection <EQUIPO> equipos = (this._dataMapper as EquipoDataMapper).GetArticuloEquipoByCategoria(new CATEGORIA()
            {
                UNID_CATEGORIA = categoria.UnidCategoria
            });
            FixupCollection <DeleteEquipo> ic = new FixupCollection <DeleteEquipo>();

            if (equipos != null)
            {
                if (equipos.Count > 0)
                {
                    equipos.ToList <EQUIPO>().ForEach(o => ic.Add(new DeleteEquipo(o)));
                }
            }
            this.Equipos = ic;
        }
Beispiel #9
0
        public void loadMaxMin()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteMaxMin> ic = new FixupCollection <DeleteMaxMin>();

            if (element != null)
            {
                if (((List <MAX_MIN>)element).Count > 0)
                {
                    foreach (MAX_MIN item in (List <MAX_MIN>)element)
                    {
                        DeleteMaxMin aux = new DeleteMaxMin(item);
                        ic.Add(aux);
                    }
                }
            }
            this.MaxMin = ic;
        }
Beispiel #10
0
        public void loadItems()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteEquipo> ic = new FixupCollection <DeleteEquipo>();

            if (element != null)
            {
                if (((List <EQUIPO>)element).Count > 0)
                {
                    foreach (EQUIPO item in (List <EQUIPO>)element)
                    {
                        DeleteEquipo aux = new DeleteEquipo(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Equipos = ic;
        }
Beispiel #11
0
        public void loadItems()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeletePais> ic = new FixupCollection <DeletePais>();

            if (element != null)
            {
                if (((List <PAI>)element).Count > 0)
                {
                    foreach (PAI item in (List <PAI>)element)
                    {
                        DeletePais aux = new DeletePais(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Pais = ic;
        }
        public void loadItems()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteMarca> ic = new FixupCollection <DeleteMarca>();

            if (element != null)
            {
                if (((List <MARCA>)element).Count > 0)
                {
                    foreach (MARCA item in (List <MARCA>)element)
                    {
                        DeleteMarca aux = new DeleteMarca(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Marcas = ic;
        }
        public void loadAlmacenTecnico()
        {
            object element = this._dataMapper.getElement(this._selectedAlmacen);

            FixupCollection <DeleteTecnico> ic = new FixupCollection <DeleteTecnico>();

            if (element != null)
            {
                if (((List <TECNICO>)element).Count > 0)
                {
                    foreach (TECNICO item in (List <TECNICO>)element)
                    {
                        DeleteTecnico aux = new DeleteTecnico(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Tecnico = ic;
        }
Beispiel #14
0
        public void loadItems()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteProveedor> ic = new FixupCollection <DeleteProveedor>();

            if (element != null)
            {
                if (((List <PROVEEDOR>)element).Count > 0)
                {
                    foreach (PROVEEDOR item in (List <PROVEEDOR>)element)
                    {
                        DeleteProveedor aux = new DeleteProveedor(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Proveedor = ic;
        }
        public void loadProgramado()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteProgramado> ic = new FixupCollection <DeleteProgramado>();

            if (element != null)
            {
                if (((List <PROGRAMADO>)element).Count > 0)
                {
                    foreach (PROGRAMADO item in (List <PROGRAMADO>)element)
                    {
                        DeleteProgramado aux = new DeleteProgramado(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Programado = ic;
        }
        public void loadItems()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteItemStatus> ic = new FixupCollection <DeleteItemStatus>();

            if (element != null)
            {
                if (((List <ITEM_STATUS>)element).Count > 0)
                {
                    foreach (ITEM_STATUS item in (List <ITEM_STATUS>)element)
                    {
                        DeleteItemStatus aux = new DeleteItemStatus(item);
                        ic.Add(aux);
                    }
                }
            }
            this.ItemStatus = ic;
        }
Beispiel #17
0
        public void loadItems()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteTipoCotizacion> ic = new FixupCollection <DeleteTipoCotizacion>();

            if (element != null)
            {
                if (((List <TIPO_COTIZACION>)element).Count > 0)
                {
                    foreach (TIPO_COTIZACION item in (List <TIPO_COTIZACION>)element)
                    {
                        DeleteTipoCotizacion aux = new DeleteTipoCotizacion(item);
                        ic.Add(aux);
                    }
                }
            }
            this.TipoCotizacion = ic;
        }
        public void loadMonedas()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteMoneda> ic = new FixupCollection <DeleteMoneda>();

            if (element != null)
            {
                if (((List <MONEDA>)element).Count > 0)
                {
                    foreach (MONEDA item in (List <MONEDA>)element)
                    {
                        DeleteMoneda aux = new DeleteMoneda(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Moneda = ic;
        }
Beispiel #19
0
        public void loadItems()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteInfraestructura> ic = new FixupCollection <DeleteInfraestructura>();

            if (element != null)
            {
                if (((List <INFRAESTRUCTURA>)element).Count > 0)
                {
                    foreach (INFRAESTRUCTURA item in (List <INFRAESTRUCTURA>)element)
                    {
                        DeleteInfraestructura aux = new DeleteInfraestructura(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Infraestructuras = ic;
        }
Beispiel #20
0
        public void loadBancos()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteBanco> ic = new FixupCollection <DeleteBanco>();

            if (element != null)
            {
                if (((List <BANCO>)element).Count > 0)
                {
                    foreach (BANCO item in (List <BANCO>)element)
                    {
                        DeleteBanco aux = new DeleteBanco(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Banco = ic;
        }
        public void loadItems()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeletePropiedad> ic = new FixupCollection <DeletePropiedad>();

            if (element != null)
            {
                if (((List <PROPIEDAD>)element).Count > 0)
                {
                    foreach (PROPIEDAD item in (List <PROPIEDAD>)element)
                    {
                        DeletePropiedad aux = new DeletePropiedad(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Propiedad = ic;
        }
        public void loadItems()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteTerminoEnvio> ic = new FixupCollection <DeleteTerminoEnvio>();

            if (element != null)
            {
                if (((List <TERMINO_ENVIO>)element).Count > 0)
                {
                    foreach (TERMINO_ENVIO item in (List <TERMINO_ENVIO>)element)
                    {
                        DeleteTerminoEnvio aux = new DeleteTerminoEnvio(item);
                        ic.Add(aux);
                    }
                }
            }
            this.TerminoEnvio = ic;
        }
Beispiel #23
0
        public void loadItems()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteServicio> ic = new FixupCollection <DeleteServicio>();

            if (element != null)
            {
                if (((List <SERVICIO>)element).Count > 0)
                {
                    foreach (SERVICIO item in (List <SERVICIO>)element)
                    {
                        DeleteServicio aux = new DeleteServicio(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Servicio = ic;
        }
Beispiel #24
0
        public void loadItems()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteTipoPedimento> ic = new FixupCollection <DeleteTipoPedimento>();

            if (element != null)
            {
                if (((List <TIPO_PEDIMENTO>)element).Count > 0)
                {
                    foreach (TIPO_PEDIMENTO item in (List <TIPO_PEDIMENTO>)element)
                    {
                        DeleteTipoPedimento aux = new DeleteTipoPedimento(item);
                        ic.Add(aux);
                    }
                }
            }
            this.TipoPedimento = ic;
        }
Beispiel #25
0
        public void loadProveedorCategoria()
        {
            object element = this._dataMapper.getElement(this._selectedProveedor);

            FixupCollection <DeleteCategoria> ic = new FixupCollection <DeleteCategoria>();

            if (element != null)
            {
                if (((List <CATEGORIA>)element).Count > 0)
                {
                    foreach (CATEGORIA item in (List <CATEGORIA>)element)
                    {
                        DeleteCategoria aux = new DeleteCategoria(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Categoria = ic;
        }
        public void loadDepartamentos()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteDepartamento> ic = new FixupCollection <DeleteDepartamento>();

            if (element != null)
            {
                if (((List <DEPARTAMENTO>)element).Count > 0)
                {
                    foreach (DEPARTAMENTO item in (List <DEPARTAMENTO>)element)
                    {
                        DeleteDepartamento aux = new DeleteDepartamento(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Departamento = ic;
        }
        public void loadCliente()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteCliente> ic = new FixupCollection <DeleteCliente>();

            if (element != null)
            {
                if (((List <CLIENTE>)element).Count > 0)
                {
                    foreach (CLIENTE item in (List <CLIENTE>)element)
                    {
                        DeleteCliente aux = new DeleteCliente(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Cliente = ic;
        }
        public void loadItemsTraspaso()
        {
            object element = this._dataMapper.getTraspasos();

            FixupCollection <CatalogMovimiento> ic = new FixupCollection <CatalogMovimiento>();

            if (element != null)
            {
                if (((List <MOVIMENTO>)element).Count > 0)
                {
                    foreach (MOVIMENTO item in (List <MOVIMENTO>)element)
                    {
                        CatalogMovimiento aux = new CatalogMovimiento(item);
                        ic.Add(aux);
                    }
                }
            }
            this.CatalogMovimiento = ic;
        }
        public void loadItems()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteTipoEmpresa> ic = new FixupCollection <DeleteTipoEmpresa>();

            if (element != null)
            {
                if (((List <TIPO_EMPRESA>)element).Count > 0)
                {
                    foreach (TIPO_EMPRESA item in (List <TIPO_EMPRESA>)element)
                    {
                        DeleteTipoEmpresa aux = new DeleteTipoEmpresa(item);
                        ic.Add(aux);
                    }
                }
            }
            this.TipoEmpresas = ic;
        }
        public void loadItems()
        {
            object element = this._dataMapper.getElements();

            FixupCollection <DeleteAlmacen> ic = new FixupCollection <DeleteAlmacen>();

            if (element != null)
            {
                if (((List <ALMACEN>)element).Count > 0)
                {
                    foreach (ALMACEN item in (List <ALMACEN>)element)
                    {
                        DeleteAlmacen aux = new DeleteAlmacen(item);
                        ic.Add(aux);
                    }
                }
            }
            this.Almacen = ic;
        }