Example #1
0
        public void chercher_ListeBon(String critere, out String erreur, out List <Bon_reprise> list, out String dbb, out Boolean exist)
        {
            erreur = null;
            dbb    = "";
            list   = new List <Bon_reprise>();
            Bon_reprise br = new Bon_reprise();

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

            cnx.select(rsql, out erreur, out dr);
            if (erreur == null)
            {
                if (dr.HasRows == true)
                {
                    exist = true;
                    while (dr.Read())
                    {
                        br = new Bon_reprise();
                        br.NUM_BONREPRISES    = dr.GetString(0);
                        br.DATE_REPRISE_REELS = dr.GetDateTime(1);
                        br.NUM_TITRECONGES    = dr.GetString(2);

                        list.Add(br);
                    }
                    dr.Close();
                }
            }
        }
Example #2
0
        public void ajouter_Bon(Bon_reprise bon, out String erreur)
        {
            erreur = null;
            rsql   = "insert into BON_REPRISE values('" + bon.NUM_BONREPRISES + "','" + bon.DATE_REPRISE_REELS.ToShortDateString() + "','" + bon.NUM_TITRECONGES + "') ";

            cnx.maj(rsql, out erreur);
        }
Example #3
0
 public void Chercher_Reprise(string id, out string erreur, out Bon_reprise br, out Boolean exist)
 {
     erreur = null;
     br     = new Bon_reprise();
     exist  = false;
     rsql   = "select * from  BON_REPRISE where  BON_REPRISE.NUM_BONREPRISE='" + id + "' ";
     cnx.select(rsql, out erreur, out dr);
     if (erreur == null)
     {
         if (dr.HasRows == true)
         {
             exist = true;
             dr.Read();
             br.NUM_BONREPRISES    = dr.GetString(0);
             br.DATE_REPRISE_REELS = dr.GetDateTime(1);
             br.NUM_TITRECONGES    = dr.GetString(2);
         }
         dr.Close();
     }
 }
Example #4
0
 public void supprimer_Bon(Bon_reprise bon, out String erreur)
 {
     erreur = null;
     rsql   = "delete from BON_REPRISE  where NUM_BONREPRISE='" + bon.NUM_BONREPRISES + "' ";
     cnx.maj(rsql, out erreur);
 }