コード例 #1
0
        /// <summary>
        /// Retorna un LISTA de registros de la Entidad Produccion.ProductoPartes
        /// En la BASE de DATO la Tabla : [Produccion.ProductoPartes]
        /// <summary>
        /// <returns>List</returns>
        public List <ProductoPartes> List(string prm_codPersonaEmpre, string prm_CodigoProducto, string prm_CodigoArguParteProdu, bool prm_Estado)
        {
            List <ProductoPartes> miLista = new List <ProductoPartes>();

            try
            {
                using (_ProduccionDataContext SQLDC = new _ProduccionDataContext(conexion))
                {
                    var resul = SQLDC.omgc_mnt_GetAll_ProductoParte(prm_codPersonaEmpre, prm_CodigoProducto, prm_CodigoArguParteProdu, prm_Estado);
                    foreach (var item in resul)
                    {
                        miLista.Add(new ProductoPartes()
                        {
                            CodigoProducto       = item.CodigoProducto,
                            CodigoArguParteProdu = item.CodigoArguParteProdu,
                            Estado          = item.Estado,
                            SegUsuarioCrea  = item.SegUsuarioCrea,
                            SegUsuarioEdita = item.SegUsuarioEdita,
                            SegFechaCrea    = item.SegFechaCrea,
                            SegFechaEdita   = item.SegFechaEdita,
                            SegMaquina      = item.SegMaquina,
                            codPersonaEmpre = item.codPersonaEmpre,
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(miLista);
        }