示例#1
0
 private void btnModificaComponente_Click(object sender, EventArgs e)
 {
     txtMessaggio.Text = string.Empty;
     try
     {
         if (string.IsNullOrEmpty(txtDistintaNo.Text))
         {
             txtMessaggio.Text = "Inserire un codice distinta";
             return;
         }
         BCServices bc = new BCServices();
         bc.CreaConnessione();
         bc.CambiaStatoDB(txtDistintaNo.Text, Stato.InSviluppo);
         bc.ModificaComponente(txtDistintaNo.Text, txtCodiceVersioneDistinta.Text, (int)nNRRigaComponente.Value, txtNRComponente.Text, txtDescrizioneComponente.Text,
                               nQuantitaPerCompoente.Value, txtCodiceCollegamentoCicliDiBa.Text, nScartoComponente.Value, nArrotondamentoComponente.Value);
         bc.CambiaStatoDB(txtDistintaNo.Text, Stato.Certificato);
         txtMessaggio.Text = "Componente modificato";
     }
     catch (Exception ex)
     {
         txtMessaggio.Text = estraiErrore(ex);
     }
 }