示例#1
0
        public BaseUC(TipoControllo tipoControllo, string modello, string fase, string data, decimal quantita, decimal qtadater, decimal qtaok, decimal qtadif, decimal qtaNL, decimal qtaann, string cq)
        {
            InitializeComponent();
            switch (tipoControllo)
            {
            case TipoControllo.Fase:
                lblTipoControllo.Text = "Fase";
                pnlODL.BackColor      = this.pnlContent.BackColor = this.BackColor = Color.LightGreen;
                break;

            case TipoControllo.Infragruppo:
                lblTipoControllo.Text = "Infragruppo";
                pnlODL.BackColor      = this.pnlContent.BackColor = this.BackColor = Color.Orange;
                break;

            case TipoControllo.Qualita:
                lblTipoControllo.Text = "CQ";
                pnlODL.BackColor      = this.pnlContent.BackColor = this.BackColor = Color.LightBlue;
                break;
            }
            txtModello.Text     = modello;
            txtFase.Text        = fase;
            txtData.Text        = data;
            txtQuantita.Text    = quantita.ToString();
            txtQtaDaTer.Text    = qtadater.ToString();
            txtQtaOK.Text       = qtaok.ToString();
            txtQtaDif.Text      = qtadif.ToString();
            txtQtaNL.Text       = qtaNL.ToString();
            txtQtaAnn.Text      = qtaann.ToString();
            txtControlloQT.Text = cq;
        }
示例#2
0
 public ODL(TipoControllo TipoControllo, string NumeroDocumento, string DataConsegna, decimal Quantita, decimal QuantitaDaTerminare, decimal QuantitaOK, decimal QuantitaDifettosa, decimal QuantitaNonLavorata, decimal QuantitaAnnullata, string Testata)
 {
     this.NumeroDocumento     = NumeroDocumento;
     this.DataConsegna        = DataConsegna;
     this.Quantita            = Quantita;
     this.QuantitaDaTerminare = QuantitaDaTerminare;
     this.QuantitaOK          = QuantitaOK;
     this.QuantitaDifettosa   = QuantitaDifettosa;
     this.QuantitaNonLavorata = QuantitaNonLavorata;
     this.QuantitaAnnullata   = QuantitaAnnullata;
     this.Testata             = Testata;
     this.TipoControllo       = TipoControllo;
 }
示例#3
0
        public void AggiungiODL(TipoControllo tipoControllo, string NumeroDocumento, string DataConsegna, decimal Quantita, decimal QuantitaDaTerminare, decimal QuantitaOK, decimal QuantitaDifettosa, decimal QuantitaNonLavorata, decimal QuanatitaAnnullata, string Testata)
        {
            int locationY = pnlODL.Location.Y;

            odl.Add(new ODL(tipoControllo, NumeroDocumento, DataConsegna, Quantita, QuantitaDaTerminare, QuantitaOK, QuantitaDifettosa, QuantitaNonLavorata, QuanatitaAnnullata, Testata));
            this.Height     = this.Height + 22;
            pnlODL.Height   = pnlODL.Height + 22;
            pnlODL.Location = new Point(pnlODL.Location.X, locationY);

            int x = txtModello.Location.X;
            int y = odls * (22);

            odls++;

            Label lbl = new Label();

            lbl.Location = new Point(x, y);
            lbl.Size     = txtModello.Size;

            switch (tipoControllo)
            {
            case TipoControllo.Infragruppo:
                lbl.Text      = "Infragruppo";
                lbl.BackColor = Color.Orange;
                break;

            case TipoControllo.Qualita:
                lbl.Text      = "CQ";
                lbl.BackColor = Color.LightBlue;
                break;

            default:
            case TipoControllo.Fase:
                lbl.Text = "ODL";
                break;
            }
            pnlODL.Controls.Add(lbl);

            TextBox txt = new TextBox();

            x            = txtFase.Location.X;
            txt          = new TextBox();
            txt.ReadOnly = true;
            txt.Location = new Point(x, y);
            txt.Size     = txtFase.Size;
            txt.Text     = NumeroDocumento;

            pnlODL.Controls.Add(txt);



            x            = txtData.Location.X;
            txt          = new TextBox();
            txt.ReadOnly = true;
            txt.Location = new Point(x, y);
            txt.Size     = txtData.Size;
            txt.Text     = DataConsegna;
            pnlODL.Controls.Add(txt);

            x            = txtQuantita.Location.X;
            txt          = new TextBox();
            txt.ReadOnly = true;
            txt.Location = new Point(x, y);
            txt.Size     = txtQtaDaTer.Size;
            txt.Text     = Quantita.ToString();
            pnlODL.Controls.Add(txt);

            x            = txtQtaDaTer.Location.X;
            txt          = new TextBox();
            txt.ReadOnly = true;
            txt.Location = new Point(x, y);
            txt.Size     = txtQtaDaTer.Size;
            txt.Text     = QuantitaDaTerminare.ToString();
            pnlODL.Controls.Add(txt);

            x            = txtQtaOK.Location.X;
            txt          = new TextBox();
            txt.ReadOnly = true;
            txt.Location = new Point(x, y);
            txt.Size     = txtQtaOK.Size;
            txt.Text     = QuantitaOK.ToString();
            pnlODL.Controls.Add(txt);

            x            = txtQtaDif.Location.X;
            txt          = new TextBox();
            txt.ReadOnly = true;
            txt.Location = new Point(x, y);
            txt.Size     = txtQtaDif.Size;
            txt.Text     = QuantitaDifettosa.ToString();
            if (QuantitaDifettosa > 0)
            {
                txt.BackColor = Color.Yellow;
            }
            pnlODL.Controls.Add(txt);

            x            = txtQtaNL.Location.X;
            txt          = new TextBox();
            txt.ReadOnly = true;
            txt.Location = new Point(x, y);
            txt.Size     = txtQtaNL.Size;
            txt.Text     = QuantitaNonLavorata.ToString();
            if (QuantitaNonLavorata > 0)
            {
                txt.BackColor = Color.Yellow;
            }
            pnlODL.Controls.Add(txt);

            x            = txtQtaAnn.Location.X;
            txt          = new TextBox();
            txt.ReadOnly = true;
            txt.Location = new Point(x, y);
            txt.Size     = txtQtaAnn.Size;
            txt.Text     = QuanatitaAnnullata.ToString();
            if (QuanatitaAnnullata > 0)
            {
                txt.BackColor = Color.Yellow;
            }
            pnlODL.Controls.Add(txt);

            x            = txtControlloQT.Location.X;
            txt          = new TextBox();
            txt.ReadOnly = true;
            txt.Location = new Point(x, y);
            txt.Size     = txtControlloQT.Size;
            txt.Text     = Testata;
            pnlODL.Controls.Add(txt);
        }