private void btnEseguiRegMag_Click(object sender, EventArgs e) { txtMessaggio.Text = string.Empty; try { string azienda = (string)ddlAziende.SelectedItem; BCServices bc = new BCServices(); bc.CreaConnessione(azienda); bc.PostingRegMag(); txtMessaggio.Text = string.Format("Registrazione terminata con successo"); } catch (Exception ex) { txtMessaggio.Text = estraiErrore(ex); } }