Esempio n. 1
0
        static business()
        {
            reparations = new ObservableCollection <reparationPhone>();
            reparationPhone loise    = new reparationPhone("NANUA", "Loïse", "Samsung", 87202020, "fuhqs,klm@", new DateTime(1955, 07, 12), "xxxxxxxx", "hs", 3000);
            reparationPhone maryse   = new reparationPhone("bb", "Maryse", "Alcatel", 87202020, "sdgcqyutsjfgqsjh", new DateTime(1982, 07, 12), "xxxxxxxx", "hs", 3000);
            reparationPhone blondine = new reparationPhone("cc", "Blondine", "Nokia", 87202020, "sdgcqyutsjfgqsjh", new DateTime(1982, 07, 12), "xxxxxxxx", "hs", 3000);
            reparationPhone marc     = new reparationPhone("dd", "Marc", "Samsung", 87202020, "sdgcqyutsjfgqsjh", new DateTime(1982, 07, 12), "xxxxxxxx", "hs", 3000);
            reparationPhone fred     = new reparationPhone("ee", "Fred", "xpedia", 87202020, "sdgcqyutsjfgqsjh", new DateTime(1982, 07, 12), "xxxxxxxx", "hs", 3000);
            reparationPhone hiva     = new reparationPhone("ff", "Hiva", "banane", 87202020, "sdgcqyutsjfgqsjh", new DateTime(1982, 07, 12), "xxxxxxxx", "hs", 3000);
            reparationPhone martin   = new reparationPhone("gg", "Martin", "kira", 87202020, "sdgcqyutsjfgqsjh", new DateTime(1982, 07, 12), "xxxxxxxx", "hs", 3000);
            reparationPhone nathan   = new reparationPhone("hh", "Nathan", "haoe", 87202020, "sdgcqyutsjfgqsjh", new DateTime(1982, 07, 12), "xxxxxxxx", "hs", 3000);
            reparationPhone meryl    = new reparationPhone("ii", "Meryl", "samsung", 87202020, "sdgcqyutsjfgqsjh", new DateTime(1982, 07, 12), "xxxxxxxx", "hs", 3000);
            reparationPhone cathy    = new reparationPhone("jj", "Cathy", "Nokia", 87202020, "sdgcqyutsjfgqsjh", new DateTime(1982, 07, 12), "xxxxxxxx", "hs", 3000);

            reparations.Add(loise);
            reparations.Add(maryse);
            reparations.Add(blondine);
            reparations.Add(marc);
            reparations.Add(fred);
            reparations.Add(hiva);
            reparations.Add(martin);
            reparations.Add(nathan);
            reparations.Add(meryl);
            reparations.Add(cathy);
            string csv = reparations.ToCsv();
        }
Esempio n. 2
0
        private void recupDonnees()

        {
            string nom    = this.nom.Text;
            string prenom = this.prenom.Text;
            string model  = this.model.Text;
            int    telephone;

            int.TryParse(this.telephone.Text, out telephone);
            string email = this.email.Text;

            var      cultureInfo = new CultureInfo("fr-FR");
            string   dateString  = "12/06/2008";
            DateTime depot       = DateTime.Parse(dateString, cultureInfo);

            string description = this.description.Text;
            int    prix        = int.Parse(this.prix.Text);

            // creer l'objet xxx avec le type qui est la classe reparationPhone
            reparationPhone xxx = new reparationPhone(nom, prenom, model, telephone, email, depot, description, "", prix);

            // il va stocker toutes les réparations de l'applications
            business.reparations.Add(xxx);
        }