public allobjet()
 {
     agence           = new Agence();
     dre              = new DRE();
     categorie        = new Categorie();
     ticket           = new Ticket();
     probleme         = new Probleme();
     user             = new Utilisateur();
     techhelp         = new TechnicienHelpDesk();
     techdre          = new TechnicienDre();
     direction        = new Direction();
     employer         = new EmployeAgence();
     stat             = new Statistic();
     ticket_his       = new Ticket_Historique();
     solution         = new Solution();
     super            = new Superviseur();
     StatByTicket     = new StatByTicket();
     StatByTechnicien = new StatByTechnicien();
     StatByProbleme   = new StatByProbleme();
     day              = null;
     month            = null;
     year             = null;
 }
Beispiel #2
0
        public Categorie find_by_id(Dictionary <string, string> data)
        {
            Categorie _categorie;
            Dictionary <string, string> id  = new Dictionary <string, string>();
            Dictionary <string, string> id2 = new Dictionary <string, string>();


            this.connect();
            SqlDataReader result = this.select(data);

            while (result.Read())
            {
                this.ParentCategorie = new Categorie();
                this.direction       = new Direction();


                if (result.GetInt32(2) != 0)
                {
                    id["IdCategorie"]    = "" + result.GetInt32(2);
                    this.ParentCategorie = this.ParentCategorie.find_by_id(id);
                }

                id2["IdDirection"] = "" + result.GetInt32(4);
                this.direction     = this.direction.find_by_id(id2);

                _categorie = new Categorie(
                    result.GetInt32(0),
                    result.GetString(1),
                    this.ParentCategorie,
                    result.GetString(3),
                    this.direction
                    );
                this.disconnect();
                return(_categorie);
            }
            return(null);
        }
        public List <Ticket> find_ticket(SqlDataReader sql)
        {
            Utilisateur utilisateur = new Utilisateur();
            Categorie   c           = new Categorie();

            Dictionary <string, string> id2 = new Dictionary <string, string>();
            Dictionary <string, string> id3 = new Dictionary <string, string>();

            List <Ticket> tickets = new List <Ticket>();

            this.connect();
            SqlDataReader result = sql;

            while (result.Read())
            {
                id2["IdUser"] = "" + result.GetInt32(7);
                utilisateur   = utilisateur.find_by_id(id2);

                id3["[IdCategorie]"] = "" + result.GetInt32(6);
                c = c.find_by_id(id3);

                tickets.Add(new Ticket(
                                result.GetInt32(0),
                                result.GetDateTime(1),
                                result.GetDateTime(2),
                                result.GetString(3),
                                result.GetString(4),
                                result.GetString(5),
                                utilisateur,
                                c,
                                result.GetString(8)
                                ));
            }
            this.disconnect();
            return(tickets);
        }
Beispiel #4
0
        // Constructeur 3:
        public Probleme(int idProblme, string objetProbleme, string descriptionProbleme, Categorie categorie)
        {
            this.table = "Probleme";

            this.IdProbleme          = idProblme;
            this.ObjetProbleme       = objetProbleme;
            this.DescreptionProbleme = descriptionProbleme;
            this.categorie           = categorie;
        }
Beispiel #5
0
        public Ticket(int idTicket, DateTime dateOuverture, DateTime dateFermeture, String objet, String description, String priorite, Utilisateur expediteur, Categorie categorie, string etatTicket)

        {
            this.table = "[dbo].[Ticket]";

            this.IdTicket      = idTicket;
            this.DateOuverture = dateOuverture;
            this.DateFermeture = dateFermeture;
            this.Objet         = objet;
            this.Description   = description;
            this.Priorite      = priorite;
            this.Expediteur    = expediteur;
            this.Categorie     = categorie;
            this.EtatTicket    = etatTicket;
        }