Exemplo n.º 1
0
        public static List <Estacion> GetAllInfo(int idedo)
        {
            List <Estacion>       ListaEstn  = new List <Estacion>();
            List <EstacionEntity> Estaciones = new List <EstacionEntity>();

            Estaciones = Provider.Provider.Estacion.GetAll(idedo);
            foreach (EstacionEntity get in Estaciones)
            {
                Estacion esTrucEstacion = new Estacion(get.Fecha, get.FechaParseo, get.PM1_1M, get.PM1_5M, get.PM1_15M, get.PM1_1H, get.PM2P5_1M, get.PM2P5_5M, get.PM2P5_15M, get.PM2P5_1H, get.PM10_1M, get.PM10_5M, get.PM10_15M, get.PM10_1H, get.Temp, get.Supply);
                ListaEstn.Add(esTrucEstacion);
            }
            return(ListaEstn);
        }
Exemplo n.º 2
0
        public static List <Estacion> GetEstacionesDay(int idedo, string fecha)
        {
            List <Estacion>       ListaEstn  = new List <Estacion>();
            List <EstacionEntity> Estaciones = new List <EstacionEntity>();

            Estaciones = Provider.Provider.Estacion.GetEstacion(idedo, fecha);
            foreach (EstacionEntity get in Estaciones)
            {
                Estacion esTrucEstacion = new Estacion(get.Fecha, get.FechaParseo, get.PM1_1M, get.PM1_5M, get.PM1_15M, Math.Round(get.PM1_1H, MidpointRounding.AwayFromZero), get.PM2P5_1M, get.PM2P5_5M, get.PM2P5_15M, Math.Round(get.PM2P5_1H, MidpointRounding.AwayFromZero), get.PM10_1M, get.PM10_5M, get.PM10_15M, Math.Round(get.PM10_1H, MidpointRounding.AwayFromZero), get.Temp, get.Supply);
                ListaEstn.Add(esTrucEstacion);
            }
            return(ListaEstn);
        }
Exemplo n.º 3
0
        public static List <Estacion> GetEstacionesTRI(int idedo, string fchx)
        {
            List <Estacion>       ListaEstn  = new List <Estacion>();
            List <EstacionEntity> Estaciones = new List <EstacionEntity>();
            List <Estacion>       ListClean  = new List <Estacion>();

            Estaciones = Provider.Provider.Estacion.GetEstacionTri(idedo, fchx);

            foreach (EstacionEntity get in Estaciones)
            {
                Math.Round(get.PM1_1H, 1, MidpointRounding.AwayFromZero); Math.Round(get.PM2P5_1H, 1, MidpointRounding.AwayFromZero); Math.Round(get.PM10_1H, 1, MidpointRounding.AwayFromZero);
                Estacion esTrucEstacion = new Estacion(get.Fecha, get.FechaParseo, get.PM1_1M, get.PM1_5M, get.PM1_15M, get.PM1_1H, get.PM2P5_1M, get.PM2P5_5M, get.PM2P5_15M, get.PM2P5_1H, get.PM10_1M, get.PM10_5M, get.PM10_15M, get.PM10_1H, get.Supply, get.Temp);
                ListaEstn.Add(esTrucEstacion);
            }
            int x = 1;

            ListClean = Caborca.Business.fecha.fechas(fchx, ListaEstn);
            return(ListClean);
        }
Exemplo n.º 4
0
        public static void GetEstacionesAnual(int idedo, string fchx, out List <Estacion> ListaEstn1, out List <Estacion> ListaEstn2, out List <Estacion> ListaEstn3, out List <Estacion> ListaEstn4)
        {
            ListaEstn1 = new List <Estacion>();
            ListaEstn2 = new List <Estacion>();
            ListaEstn3 = new List <Estacion>();
            ListaEstn4 = new List <Estacion>();
            List <EstacionEntity> Estaciones = new List <EstacionEntity>();

            Estaciones = Provider.Provider.Estacion.GetEstacionAnual(idedo, fchx);
            foreach (EstacionEntity get in Estaciones)
            {
                Estacion esTrucEstacion = new Estacion(get.Fecha, get.FechaParseo, get.PM1_1M, get.PM1_5M, get.PM1_15M, get.PM1_1H, get.PM2P5_1M, get.PM2P5_5M, get.PM2P5_15M, get.PM2P5_1H, get.PM10_1M, get.PM10_5M, get.PM10_15M, get.PM10_1H, get.Temp, get.Supply);
                switch (get.Fecha.Month)
                {
                case 1:
                case 2:
                case 3:
                    ListaEstn1.Add(esTrucEstacion);
                    break;

                case 4:
                case 5:
                case 6:
                    ListaEstn2.Add(esTrucEstacion);
                    break;

                case 7:
                case 8:
                case 9:
                    ListaEstn3.Add(esTrucEstacion);
                    break;

                case 10:
                case 11:
                case 12:
                    ListaEstn4.Add(esTrucEstacion);
                    break;
                }
            }
        }