Ejemplo n.º 1
0
 // Ajouter, lire, modifier, supprimer
 public void Ajouter(Parcelle p)
 {
     liste.Add(p);
 }
Ejemplo n.º 2
0
        private void ShowListViewTraitements(Parcelle p)
        {
            currentType = TypeTraitement;

            toolStripLabel.Text = "Chargements des traitements";
            // Affichage des traitements dans le listView
            listView.Columns.Add("Description", 100);
            listView.Columns.Add("Quantité appliquée", 100);
            listView.Columns.Add("Pulvérisations", 100);

            toolStripProgressBar.Maximum = p.Traitements.Count;
            foreach (TraitementPhytosanitaire t in p.Traitements)
            {
                int nbPulverisations = 0;
                if (t is TraitementEnChamp)
                    nbPulverisations = (t as TraitementEnChamp).Pulverisations.Count;

                ListViewItem lvi = new ListViewItem(new string[] { t.Description, Convert.ToString(t.QuantiteAppliquee()), nbPulverisations.ToString() }, TypeTraitement);
                lvi.Tag = t;
                lvi.ImageIndex = TypeTraitement;
                listView.Items.Add(lvi);

                toolStripProgressBar.Value++;
            }
        }
Ejemplo n.º 3
0
 public void AjouterParcelle(Parcelle p)
 {
     p.Exploitant = this;
     gestion.Ajouter(p);
 }