Beispiel #1
0
        public ICollection <Buse> ListerTotaleBuseAccueil(string date, string poste, string type)
        {
            IGestionEtatDAO IGEDAO = new GestionEtatDAO();

            Etat e_Energie = IGEDAO.GetEtat("ENERGIE", date, poste, type);
            Etat e_STB1    = IGEDAO.GetEtat("STB1", date, poste, type);
            Etat e_STB2    = IGEDAO.GetEtat("STB2", date, poste, type);
            Etat e_ATR     = IGEDAO.GetEtat("ATR", date, poste, type);
            Etat e_Indus   = IGEDAO.GetEtat("Indus", date, poste, type);

            int[] T1 = new int[33];
            int[] T2 = new int[33];
            int[] T3 = new int[33];
            int[] T4 = new int[33];
            int[] T5 = new int[33];

            int i = 0;

            if (e_Energie.Buses != null)
            {
                foreach (var item in e_Energie.Buses)
                {
                    T1[i] = item.Quantite;
                    i++;
                }
            }
            i = 0;
            if (e_STB1.Buses != null)
            {
                foreach (var item in e_STB1.Buses)
                {
                    T2[i] = item.Quantite;
                    i++;
                }
            }
            i = 0;
            if (e_STB2.Buses != null)
            {
                foreach (var item in e_STB2.Buses)
                {
                    T3[i] = item.Quantite;
                    i++;
                }
            }
            i = 0;
            if (e_ATR.Buses != null)
            {
                foreach (var item in e_ATR.Buses)
                {
                    T4[i] = item.Quantite;
                    i++;
                }
            }
            i = 0;
            if (e_Indus.Buses != null)
            {
                foreach (var item in e_Indus.Buses)
                {
                    T5[i] = item.Quantite;
                    i++;
                }
            }
            ICollection <Buse> Buses = new List <Buse>();

            for (int j = 0; j < 33; j++)
            {
                Buses.Add(new Buse {
                    Quantite = T1[j] + T2[j] + T3[j] + T4[j] + T5[j], BuseID = "TF" + (j + 1)
                });
            }



            return(Buses);
        }
Beispiel #2
0
        public ICollection <Feeder> ListerTotaleFeederAccueil(String date, string poste, string type)
        {
            IGestionEtatDAO IGEDAO = new GestionEtatDAO();

            Etat e_Energie = IGEDAO.GetEtat("ENERGIE", date, poste, type);
            Etat e_STB1    = IGEDAO.GetEtat("STB1", date, poste, type);
            Etat e_STB2    = IGEDAO.GetEtat("STB2", date, poste, type);
            Etat e_ATR     = IGEDAO.GetEtat("ATR", date, poste, type);
            Etat e_Indus   = IGEDAO.GetEtat("Indus", date, poste, type);

            int[] T1 = new int[6];
            int[] T2 = new int[6];
            int[] T3 = new int[6];
            int[] T4 = new int[6];
            int[] T5 = new int[6];

            int i = 0;

            foreach (var item in e_Energie.Feeders)
            {
                T1[i] = item.Quantite;
                i++;
            }
            i = 0;

            foreach (var item in e_STB1.Feeders)
            {
                T2[i] = item.Quantite;
                i++;
            }
            i = 0;

            foreach (var item in e_STB2.Feeders)
            {
                T3[i] = item.Quantite;
                i++;
            }
            i = 0;
            foreach (var item in e_ATR.Feeders)
            {
                T4[i] = item.Quantite;
                i++;
            }
            i = 0;
            foreach (var item in e_Indus.Feeders)
            {
                T5[i] = item.Quantite;
                i++;
            }

            ICollection <Feeder> Fedders = new List <Feeder>();

            for (int j = 0; j < 6; j++)
            {
                Fedders.Add(new Feeder {
                    Quantite = T1[j] + T2[j] + T3[j] + T4[j] + T5[j], FedderID = "TF" + (j + 1)
                });
            }



            return(Fedders);
        }