public static Matieres Get_client_ID(int id) { string requete = String.Format("select * from matiere where id={0};", id); OleDbDataReader rd = utils.lire(requete); Matieres c = new Matieres(); while (rd.Read()) { c.id = rd.GetInt32(0); c.Nom = rd.GetString(1); c.num_niv = rd.GetInt32(2); } utils.Disconnect(); return(c); }
private void button3_Click(object sender, EventArgs e) { try { Matieres clt = MatiereDAO.Get_client_ID(int.Parse(tbID.Text)); tbnom.Text = clt.Nom; tbnniv.Text = clt.num_niv.ToString(); List <Matieres> L = new List <Matieres>(); L.Add(clt); grid_clients.DataSource = L; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public static List <Matieres> Get_clients(int num_niv) { string requete = String.Format("select * from matiere where num_niv={0};", num_niv); OleDbDataReader rd = utils.lire(requete); List <Matieres> L = new List <Matieres>(); Matieres c; while (rd.Read()) { c = new Matieres { id = rd.GetInt32(0), Nom = rd.GetString(1), num_niv = rd.GetInt32(2) }; L.Add(c); } utils.Disconnect(); return(L); }
public void SupprimerMatiere(MatiereModel matiere) => Matieres.Remove(matiere);
public void EditerMatiere(MatiereModel matiere) => Matieres.Update(matiere).State = EntityState.Modified;
public void AjouterMatiere(MatiereModel matiere) => Matieres.Add(matiere);
public Boite(double longu, double haut, double larg, Matieres mat) : this(longu, haut, larg) { Matiere = mat; }
public Boite(Matieres Mat, double Long, double Larg, double Haut) : this(Long, Larg, Haut) { Matiere = Mat; }
public Boite(double h, double la, double lo, Matieres m) : this(h, la, lo) { MaMatiere = m; }