예제 #1
0
        // retornar la lista de Area/RAMO.
        public static List <RAMO> GetArea()
        {
            using (SPISAPEntities db = new SPISAPEntities())
            {
                List <RAMO> Lista = new List <RAMO>();

                Lista.Add(new RAMO {
                    COD_RAMO = "", DES_RAMO = "Seleccione un valor"
                });

                foreach (var record in db.RAMOS.OrderBy(p => p.DES_RAMO))
                {
                    RAMO item = new RAMO();
                    item.COD_RAMO = record.COD_RAMO;
                    item.DES_RAMO = record.DES_RAMO;
                    Lista.Add(item);
                }

                return(Lista);
            }
        }
예제 #2
0
        // retornar la lista de Area/RAMO.
        public static List<RAMO> GetArea()
        {
            using (SPISAPEntities db = new SPISAPEntities())
            {
                List<RAMO> Lista = new List<RAMO>();

                Lista.Add(new RAMO { COD_RAMO = "", DES_RAMO = "Seleccione un valor" });

                foreach (var record in db.RAMOS.OrderBy(p => p.DES_RAMO))
                {
                    RAMO item = new RAMO();
                    item.COD_RAMO = record.COD_RAMO;
                    item.DES_RAMO = record.DES_RAMO;
                    Lista.Add(item);
                }

                return Lista;
            }
        }