Esempio n. 1
0
        private void validerFamille_Click(object sender, EventArgs e)
        {
            if (familleRef.Text == "" || familleDesign.Text == "")
            {
                MessageBox.Show("Tous les champs sont obligatoires", "champ invalide", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (lite.familleExists(familleRef.Text.ToUpper()))
            {
                MessageBox.Show("Cette reference existe deja", "reference invalide", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            lite.createFamille(lite.stripString(familleRef.Text.ToUpper()), lite.stripString(familleDesign.Text.ToUpper()));
            familleRef.Text    = "";
            familleDesign.Text = "";
            ActiveControl      = familleRef;
        }