Ejemplo n.º 1
0
        private void txtboxscan_KeyUp(object sender, KeyEventArgs e)
        {
            try
            {
                if (e.Key == Key.Enter)
                {
                    limpiarTodo();

                    var box = txtboxscan.Text.Trim().ToLower();

                    var resp = CodigosNeg.BuscarCaja(box);

                    if (resp == null)
                    {
                        MessageBox.Show("El codigo no existe", "Advertencia");
                    }
                    else
                    {
                        cont = (int)resp.totalencaja;

                        lblUnidadesCaja.Content = cont;
                        lblbox.Content          = resp.codigoBox.TrimEnd();

                        lblCorte.Content  = resp.corteCompleto.TrimEnd();
                        lblCorteT.Content = resp.corteCompleto.TrimEnd();

                        lblEstilo.Content  = resp.estilo.TrimEnd();
                        lblEstiloT.Content = resp.estilo.TrimEnd();

                        lblunidades.Content  = resp.Quantity;
                        lblestadobox.Content = resp.clasificacion;//.Trim()==string.Empty?"Pendiente":resp.clasificacion.TrimEnd();
                        idbox = resp.id;

                        txtboxscan.Clear();
                        txtcodigo.Clear();
                        txtcodigo.IsEnabled = true;
                        txtcodigo.Focus();
                        txtcorte.Clear();

                        // idporder = resp.Id_Order;

                        var total = PorderNeg.TotalesLeft(resp.corteCompleto);

                        lblTotalcajas.Content      = (total.Count() - 1).ToString();
                        lblTotalEmpaquadas.Content = total.Sum(x => x.unidades);

                        lblsugestion.Visibility = Visibility.Collapsed;
                        lblCondicional.Content  = "Select";
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 2
0
        private void BtnBuscarBox_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                limpiarTodo();

                var box = txtboxscan.Text.Trim().ToLower();

                var resp = CodigosNeg.BuscarCaja2(box);

                if (resp == null)
                {
                    MessageBox.Show("El codigo no existe", "Advertencia");
                }
                else
                {
                    var resp2 = CodigosNeg.GetcodigoBarraXcodBox(box);

                    if (resp2.Equals("error"))
                    {
                        MessageBox.Show("El codigo no contiene datos", "Advertencia");
                    }
                    else
                    {
                        codigoEscaneo = resp2;

                        cont = (int)resp.totalencaja;

                        lblUnidadesCaja.Content = cont;
                        lblbox.Content          = resp.codigoBox.TrimEnd();

                        lblCorte.Content  = resp.corteCompleto.TrimEnd();
                        lblCorteT.Content = resp.corteCompleto.TrimEnd();

                        lblEstilo.Content  = resp.estilo.TrimEnd();
                        lblEstiloT.Content = resp.estilo.TrimEnd();

                        lblunidades.Content = resp.Quantity;
                        // lblestadobox.Content = resp.clasificacion;
                        lblestadobox.Content = resp.clasificacion;// == string.Empty ? "Pendiente" : resp.clasificacion.TrimEnd();
                        idbox = resp.id;

                        txtboxscan.Clear();
                        txtcodigo.Clear();
                        txtcodigo.IsEnabled = true;
                        txtcodigo.Focus();
                        txtcorte.Clear();

                        InicioEscaneo = true;

                        //idporder = resp.Id_Order;

                        var total = PorderNeg.TotalesLeft(resp.corteCompleto);

                        lblTotalcajas.Content      = (total.Count() - 1).ToString();
                        lblTotalEmpaquadas.Content = total.Sum(x => x.unidades);

                        lblsugestion.Visibility = Visibility.Collapsed;
                        lblCondicional.Content  = "Select";

                        lblstatus.Content = "Esperando Lectura de Escanner";
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }