Exemplo n.º 1
0
        private void SaveData()
        {
            try
            {
                Articles art = new Articles();

                art.Id           = idArticle;
                art.Code         = codeTxt.Text;
                art.Designation  = designationTxt.Text;
                art.PVu          = Convert.ToDouble(pvuTxt.Text);
                art.Unite        = uniteTxt.Text;
                art.RefCategorie = dn.retourId("Id", "Categorie", "Designation", categCombo.Text);

                art.Enregistrer(art);

                MessageBox.Show("Article enregistrer");

                Initialise();
            }
            catch (Exception ex)
            {
                MessageBox.Show("L'erreur suivant est survenue : " + ex.Message);
            }
        }