Ejemplo n.º 1
0
        public void StockerResume()
        {
            StockerObj stk = stockerList.FirstOrDefault();

            if (stk != null)
            {
                detailPalet.Text = string.Concat(
                    stk.api.info.smt.op,
                    Environment.NewLine,
                    "Modelo: ",
                    stk.api.info.smt.modelo,
                    Environment.NewLine,
                    "Lote: ",
                    stk.api.info.smt.lote,
                    Environment.NewLine,
                    "Panel: ",
                    stk.api.info.smt.panel,
                    Environment.NewLine,
                    "Unidades: ",
                    SumarUnidades());
            }
            else
            {
                detailPalet.Text = "";
            }
        }
Ejemplo n.º 2
0
        private void StartVerify(StockerObj stk)
        {
            DataGridViewCell      cell  = dataPalet.Rows[stk.row].Cells["_declarado"];
            DataGridViewCellStyle style = dataPalet.Rows[stk.row].DefaultCellStyle;

            cell.Value     = "Verificando...";
            stk.isDeclared = false;

            try
            {
                stk.api.VerifyStockerApi(stk.api.info.stocker.barcode);
                if (stk.api.hasResponse)
                {
                    if (stk.api.verify.error == null)
                    {
                        if (stk.api.verify.cuarentena.Count() == 0)
                        {
                            if (stk.api.verify.contenido.declaracion.declarado)
                            {
                                style.BackColor = ColorTranslator.FromHtml("#6de9ff");
                                cell.Value      = "Declarado";
                                stk.isDeclared  = true;
                            }
                            else
                            {
                                style.BackColor = ColorTranslator.FromHtml("#ff6730");
                                cell.Value      = "Error en declaraciones";
                                stk.isDeclared  = false;
                            }
                        }
                        else
                        {
                            style.BackColor = ColorTranslator.FromHtml("#ff6730");
                            cell.Value      = string.Format("Atencion! hay {0} placa(s) en cuarentena", stk.api.verify.cuarentena.Count());
                        }
                    }
                    else
                    {
                        style.BackColor = ColorTranslator.FromHtml("#ff6730");
                        cell.Value      = stk.api.verify.error;
                    }
                }
                else
                {
                    style.BackColor = ColorTranslator.FromHtml("#ff6730");
                    cell.Value      = stk.api.exception;
                }
            }
            catch (Exception ex)
            {
                style.BackColor = ColorTranslator.FromHtml("#ff6730");
                cell.Value      = ex.Message;
            }

            dataPalet.ClearSelection();
        }
Ejemplo n.º 3
0
 public void RemoveFromList(string stockerBarcode)
 {
     if (stockerList.Count() > 0)
     {
         StockerObj result = stockerList.Where(s => s.api.info.stocker.barcode == stockerBarcode).FirstOrDefault();
         if (result != null)
         {
             dataPalet.Rows[result.row].Visible = false;
             stockerList.Remove(result);
             StockerResume();
         }
     }
 }
Ejemplo n.º 4
0
        private void stockerSuccess(StockerObj stk)
        {
            if (stk.isDeclared)
            {
                stk.confirm = true;

                dataPalet.Rows[stk.row].DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#8ff470");
                dataPalet.ClearSelection();

                if (palet.CountAll() == palet.CountConfirm())
                {
                    btnFinish.Enabled  = true;
                    txtBarcode.Enabled = false;
                }
            }
        }
Ejemplo n.º 5
0
        public async void AddToPalet(ControlDePlacasService api)
        {
            if (!OnList(api.info.stocker.barcode))
            {
                int index = dataPalet.Rows.Add(
                    api.info.stocker.barcode,
                    api.info.stocker.unidades
                    );

                StockerObj stk = new StockerObj();
                stk.api = api;

                // Agrego indice de fila a stocker.
                stk.row = index;

                stockerList.Add(stk);

                StockerResume();

                await Task.Run(() => StartVerify(stk));
            }
        }