Пример #1
0
        /// <summary>
        /// Retorna un LISTA de registros de la Entidad GestionComercial.TiposdeCambio
        /// En la BASE de DATO la Tabla : [GestionComercial.TiposdeCambio]
        /// <summary>
        /// <returns>List</returns>
        public List <BEFormaDePago> ListPaginado(BaseFiltro pFiltro)
        {
            List <BEFormaDePago> lstFormaDePago = new List <BEFormaDePago>();

            try
            {
                using (_CajaBancosDataContext SQLDC = new _CajaBancosDataContext(conexion))
                {
                    var resul = SQLDC.omgc_S_FormaDePago_Paged(pFiltro.grcurrentPage,
                                                               pFiltro.grpageSize,
                                                               pFiltro.grsortColumn,
                                                               pFiltro.grsortOrder,
                                                               pFiltro.codFormaPago,
                                                               pFiltro.desNombre,
                                                               pFiltro.indEstado);
                    foreach (var item in resul)
                    {
                        lstFormaDePago.Add(new BEFormaDePago()
                        {
                            codFormaDePago  = item.codFormaDePago,
                            desNombre       = item.desNombre,
                            indCobranza     = item.indCobranza,
                            indEgreso       = item.indEgreso,
                            indIngreso      = item.indIngreso,
                            indNotacredito  = item.indNotacredito,
                            indVenta        = item.indVenta,
                            indActivo       = item.indActivo,
                            segUsuarioCrea  = item.segUsuarioCrea,
                            segUsuarioEdita = item.segUsuarioEdita,
                            segFechaCrea    = item.segFechaCrea,
                            segFechaEdita   = item.segFechaEdita,
                            segMaquinaEdita = item.segMaquina,

                            ROW       = item.ROWNUM.HasValue ? item.ROWNUM.Value : 0,
                            TOTALROWS = item.TOTALROWS.HasValue ? item.TOTALROWS.Value : 0
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(lstFormaDePago);
        }