Beispiel #1
0
        private void btnModificaFase_Click(object sender, EventArgs e)
        {
            txtMessaggio.Text = string.Empty;
            try
            {
                if (string.IsNullOrEmpty(txtNoCiclo.Text))
                {
                    txtMessaggio.Text = "Inserire un codice ciclo";
                    return;
                }
                if (ddlAreaProduzione.SelectedIndex == -1)
                {
                    txtMessaggio.Text = "Selezionare un area produzione";
                    return;
                }
                if (ddlTask.SelectedIndex == -1)
                {
                    txtMessaggio.Text = "Selezionare un task";
                    return;
                }
                int            operazione = (int)nOperazioneFase.Value;
                AreaProduzione area       = (AreaProduzione)ddlAreaProduzione.SelectedItem;
                TaskArea       task       = (TaskArea)ddlTask.SelectedItem;

                BCServices bc = new BCServices();
                bc.CreaConnessione();
                bc.CambiaStatoCiclo(txtNoCiclo.Text, Stato.InSviluppo);
                bc.ModificaFase(txtNoCiclo.Text, txtVersioneCiclo.Text, operazione.ToString(), txtTipoFase.Text, area.Codice, task.Task,
                                nSetupFase.Value, txtUMSetupFase.Text,
                                nLavorazioneFase.Value, txtUMLavorazioneFase.Text, nAttesaFase.Value, txtUMAttesaFase.Text, nSpostamentoFase.Value, txtUMSpostamentoFase.Text,
                                nDimensioneLottoFase.Value, txtCollegmentoFase.Text,
                                txtCodiceCondizioneFase.Text, txtCodiceLogicheFase.Text, txtCodiceCaratteristicaFase.Text, string.Empty);
                bc.CambiaStatoCiclo(txtNoCiclo.Text, Stato.Certificato);
                txtMessaggio.Text = "Fase modificata";
            }
            catch (Exception ex)
            {
                txtMessaggio.Text = estraiErrore(ex);
            }
        }