private void Btn_Guardar_Click_1(object sender, RoutedEventArgs e)
        {
            //Mostrar ventana de Cargando...
            ProcessWindow pw = new ProcessWindow("Procesando registros...por favor espere...");

            SaveDetails(sender, e);

            GetSerial1.Focus();
            pw.Visibility = Visibility.Collapsed;
            pw.Close();
        }
 private void tb_Cantidad_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         if (GetSerial1.IsEnabled)
         {
             GetSerial1.Focus();
         }
         else
         {
             AddLine(sender, e);
         }
     }
 }
Пример #3
0
        //Recibo
        //public TextBox BuscarEstibaRecibo
        //{
        //    get { return this.tb_BuscarEstibaRecibo; }
        //    set { this.tb_BuscarEstibaRecibo = value; }
        //}

        //public ComboBox BuscarPosicionRecibo
        //{
        //    get { return this.cb_BuscarPosicionRecibo; }
        //    set { this.cb_BuscarPosicionRecibo = value; }
        //}

        //public ListView ListadoBusquedaRecibo
        //{
        //    get { return this.lv_ListadoBusquedaRecibo; }
        //    set { this.lv_ListadoBusquedaRecibo = value; }
        //}

        #endregion

        #region Metodos

        private void tb_Serial1_KeyDown_1(object sender, KeyEventArgs e)
        {
            //Evaluo si la tecla es un Tab
            if (e.Key == Key.Tab)
            {
                GetSerial1.Focus();
            }

            //Evaluo si la tecla es un Enter
            if (e.Key == Key.Enter)
            {
                GetSerial1.Text = GetSerial1.Text.ToString().ToUpper();
                //Paso el focus al siguiente campo de serial
                GetSerial2.Focus();
            }
        }
Пример #4
0
        private void tb_Serial2_KeyDown_1(object sender, KeyEventArgs e)
        {
            //Evaluo si la tecla es un Enter
            if (e.Key == Key.Enter)
            {
                if (tb_Serial2.Text.StartsWith("00") == false)
                {
                    Util.ShowError("La estructura del ID Receiver es incorrecta!");
                    tb_Serial1.Text = "";
                    tb_Serial2.Text = "";
                    GetSerial1.Focus();
                    return;
                }

                if (tb_Serial2.Text.Length < 12 || tb_Serial2.Text.Length > 12)
                {
                    Util.ShowError("El serial debe contener 12 digitos!");
                    tb_Serial1.Text = "";
                    tb_Serial2.Text = "";
                    GetSerial1.Focus();
                    return;
                }

                if (tb_Serial2.Text.ToString().Contains("o") || tb_Serial2.Text.ToString().Contains("O"))
                {
                    Util.ShowError("No puede digitar el caracter 'o' 'O' debe reemplazarlo por el numero cero(0)");
                    tb_Serial1.Text = "";
                    tb_Serial2.Text = "";
                    GetSerial1.Focus();
                    return;
                }
                else
                {
                    if (tb_Serial3.IsEnabled)
                    {
                        //Paso el focus al siguiente campo de serial
                        GetSerial3.Focus();
                    }
                    else
                    {
                        AddLine(sender, e);
                    }
                }
            }
        }
Пример #5
0
        private void tb_Serial3_KeyDown_1(object sender, KeyEventArgs e)
        {
            //Evaluo si la tecla es un Enter
            if (e.Key == Key.Enter)
            {
                if (!tb_Serial3.Text.StartsWith("000") || tb_Serial3.Text.StartsWith("0000") == true)
                {
                    Util.ShowError("La Smart Card no cuenta con la estructura correcta!");
                    tb_Serial1.Text = "";
                    tb_Serial2.Text = "";
                    tb_Serial3.Text = "";
                    GetSerial1.Focus();
                    return;
                }

                if (tb_Serial3.Text != "" && tb_Serial3.Text != null)
                {
                    if (tb_Serial3.Text.Length < 12 || tb_Serial3.Text.Length > 12)
                    {
                        Util.ShowError("La Smart Card debe contener 12 digitos!");
                        tb_Serial1.Text = "";
                        tb_Serial2.Text = "";
                        tb_Serial3.Text = "";
                        GetSerial1.Focus();
                        return;
                    }
                    else
                    {
                        AddLine(sender, e);
                    }
                }
                else
                {
                    //Adiciono el registro al listado
                    AddLine(sender, e);
                }
            }
        }