Example #1
0
        private void textBox4_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (textBox4.Text.Length > 0)
                {
                    Auto auto = AutoManager.BuscarPorId(Convert.ToInt32(textBox4.Text));
                    txtMarca.Text       = auto.sMarca;
                    txtModelo.Text      = auto.sModelo;
                    txtAnio.Text        = auto.iAnio.ToString();
                    txtNoSerie.Text     = auto.sNumeroSerie;
                    txtDescripcion.Text = auto.sDescripcion;
                    picAuto.Image       = ToolImagen.Base64StringToBitmap(auto.sFotoPrincipal);

                    txtSubTotal.Text = String.Format("{0:00.00}", auto.PrecioVenta);
                    txtIva.Text      = String.Format("{0:0.00}", auto.PrecioVenta * 0.16);
                    txtTotal.Text    = String.Format("{0:0.00}", auto.PrecioVenta * 1.16);
                }
            }
        }
Example #2
0
 private void textBox4_KeyDown(object sender, KeyEventArgs e)
 {
     if (textBox4.Text == "")
     {
     }
     else
     {
         if (e.KeyCode == Keys.Enter)
         {
             this.nAuto          = AutoManager.BuscarPorId(Convert.ToInt32(textBox4.Text));
             txtMarca.Text       = nAuto.sMarca;
             txtModelo.Text      = nAuto.sModelo;
             txtAnio.Text        = nAuto.iAnio.ToString();
             txtNoSerie.Text     = nAuto.sNumeroSerie;
             txtDescripcion.Text = nAuto.sDescripcion;
             textBox1.Text       = nAuto.PrecioVenta.ToString("c");
             textBox2.Text       = (nAuto.PrecioVenta * 0.16).ToString("c");
         }
     }
 }