示例#1
0
        public void Chercher_ListService_Departement(String iddep, out String erreur, out List <Services_Class> list, out Boolean exist)
        {
            erreur = null;
            list   = new List <Services_Class>();
            Services_Class serv = new Services_Class();

            exist = false;
            rsql  = "select * from  SERVICE where ID_DEPARTEMENT='" + iddep + "' ";

            cnx.select(rsql, out erreur, out dr);
            if (erreur == null)
            {
                if (dr.HasRows == true)
                {
                    exist = true;
                    while (dr.Read())
                    {
                        serv           = new Services_Class();
                        serv.ID_SErv   = dr.GetString(0);
                        serv.DESG_Serv = dr.GetString(1);
                        serv.Depar     = dr.GetString(2);
                        serv.Seuille   = dr.GetInt32(4);

                        list.Add(serv);
                    }
                    dr.Close();
                }
            }
        }
示例#2
0
        public void chercher_Service3(String id, out string erreur, out string nom, out int seuil, out Boolean exist)
        {
            erreur = null;
            Services_Class fn = new Services_Class();

            nom   = null;
            seuil = 0;
            exist = false;
            rsql  = "select * from  SERVICE where  SERVICE.ID_SERVICE='" + id + "'  ";
            cnx.select(rsql, out erreur, out dr);


            if (erreur == null)
            {
                if (dr.HasRows == true)
                {
                    exist = true;
                    while (dr.Read())
                    {
                        fn    = new Services_Class();
                        nom   = fn.DESG_Serv = dr.GetString(1);
                        seuil = dr.GetInt32(4);
                    }
                    dr.Close();
                }
            }
        }
示例#3
0
        //chercher une liste de fonction selon un critére
        public void chercher_ListeService(String critere, out String erreur, out List <Services_Class> list, out Boolean exist)
        {
            erreur = null;
            list   = new List <Services_Class>();
            Services_Class serv = new Services_Class();

            exist = false;
            rsql  = "select * from  SERVICE " + critere;

            cnx.select(rsql, out erreur, out dr);
            if (erreur == null)
            {
                if (dr.HasRows == true)
                {
                    exist = true;
                    while (dr.Read())
                    {
                        serv              = new Services_Class();
                        serv.ID_SErv      = dr.GetString(0);
                        serv.DESG_Serv    = dr.GetString(1);
                        serv.Depar        = dr.GetString(2);
                        serv.Resp_service = dr.GetString(3);
                        serv.Seuille      = dr.GetInt32(4);

                        list.Add(serv);
                    }
                    dr.Close();
                }
            }
        }
示例#4
0
        //chercher fonction

        public void Chercher_Service(string id, out string erreur, out Services_Class serv, out Boolean exist)
        {
            erreur = null;
            serv   = new Services_Class();
            exist  = false;
            rsql   = "select * from  SERVICE where  SERVICE.ID_SERVICE=" + id + " ";
            cnx.select(rsql, out erreur, out dr);
            if (erreur == null)
            {
                if (dr.HasRows == true)
                {
                    exist = true;
                    dr.Read();
                    serv.ID_SErv      = dr.GetString(0);
                    serv.DESG_Serv    = dr.GetString(1);
                    serv.Depar        = dr.GetString(2);
                    serv.Resp_service = dr.GetString(3);
                    serv.Seuille      = dr.GetInt32(4);
                }
                dr.Close();
            }
        }
示例#5
0
 public void modifier_Service(Services_Class servi, out String erreur)
 {
     erreur = null;
     rsql   = "update SERVICE set DESIGNATION_SERVICE ='" + servi.DESG_Serv + "',ID_DEPARTEMENT='" + servi.Depar + "',RESPONSABLE_SERVICE='" + servi.Resp_service + "',SEUILE_SERVICE=" + servi.Seuille + " where ID_SERVICE='" + servi.ID_SErv + "' ";
     cnx.maj(rsql, out erreur);
 }
示例#6
0
 public void supprimer_Service(Services_Class servi, out String erreur)
 {
     erreur = null;
     rsql   = "delete from SERVICE  where ID_SERVICE='" + servi.ID_SErv + "' ";
     cnx.maj(rsql, out erreur);
 }
示例#7
0
 public void ajouter_Service(Services_Class servi, out String erreur)
 {
     erreur = null;
     rsql   = "insert into SERVICE values('" + servi.ID_SErv + "','" + servi.DESG_Serv + "','" + servi.Depar + "','" + servi.Resp_service + "'," + servi.Seuille + ")";
     cnx.maj(rsql, out erreur);
 }