Beispiel #1
0
        public List <BESysReporte> ListSysReportes()
        {
            List <BESysReporte> miLista = new List <BESysReporte>();

            try
            {
                using (_CROMTimeDataContext SQLDC = new _CROMTimeDataContext(conexion))
                {
                    var resul = SQLDC.omgc_pro_GetAllFrom_Reportes();
                    foreach (var item in resul)
                    {
                        miLista.Add(new BESysReporte()
                        {
                            CodigoReporte = item.CodigoReporte,
                            Estado        = item.Estado,
                            Orden         = item.Orden,
                            ReporteName   = item.ReporteName,
                            OrdenTexto    = item.Orden.ToString().Trim().PadLeft(5, '0')
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(miLista);
        }