Exemplo n.º 1
0
        private void ddlAreaProduzione_SelectedIndexChanged(object sender, EventArgs e)
        {
            ddlTask.Items.Clear();
            AreaProduzione  a     = (AreaProduzione)ddlAreaProduzione.SelectedItem;
            List <TaskArea> tasks = TaskArea.EstraiListaTaskArea(true);

            tasks = tasks.Where(x => x.AreaProduzione == a.Codice).ToList();
            ddlTask.Items.AddRange(tasks.ToArray());
        }
Exemplo n.º 2
0
        private void btnAggiuntiFase_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;
                }
                BCServices bc = new BCServices();
                bc.CreaConnessione();
                bc.CambiaStatoCiclo(txtNoCiclo.Text, Stato.InSviluppo);
                int operazione = (int)nOperazioneFase.Value;

                AreaProduzione area = (AreaProduzione)ddlAreaProduzione.SelectedItem;
                TaskArea       task = (TaskArea)ddlTask.SelectedItem;

                bc.AggiungiFase(txtNoCiclo.Text, txtVersioneCiclo.Text, operazione.ToString(), txtTipoFase.Text, area.Codice, task.Task, nSetupFase.Value, txtUMSetupFase.Text, txtCodiceScheda.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 aggiunta";
            }
            catch (Exception ex)
            {
                txtMessaggio.Text = estraiErrore(ex);
            }
        }