private void button2_Click(object sender, EventArgs e)
 {
     buscarproducto FRM = new buscarproducto();
     FRM.ShowDialog();
     aux = FRM.devolver();
     if (aux != null)
     {
         textBox3.Text = aux.Id.ToString();
     }
 }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            buscarproducto frm = new buscarproducto();
            frm.ShowDialog();
            oprod = frm.devolver();

            label3.Text = oprod.Id.ToString();
            textBox5.Text = oprod.Id.ToString();
            textBox2.Text = oprod.Descripcion;
        }
Ejemplo n.º 3
0
 private void button5_Click(object sender, EventArgs e)
 {
     buscarproducto frm = new buscarproducto();
     frm.ShowDialog();
     aux = frm.devolver();
     if (aux != null)
     {
         textBox1.Text = aux.Id.ToString();
         textBox2.Text = aux.Descripcion;
         textBox3.Text = aux.Precio.ToString();
         textBox4.Text = aux.Stock.ToString();
         textBox5.Text = aux.Codigobarra;
         textBox6.Text = aux.Preciocalle;
     }
 }
Ejemplo n.º 4
0
        private void button2_Click(object sender, EventArgs e)
        {
            buscarproducto frm = new buscarproducto();
            frm.ShowDialog();
            oprod = frm.devolver();
            if (oprod != null && nombre12 != "CALLE 1")
            {
                label3.Text = oprod.Id.ToString();
                textBox5.Text = oprod.Id.ToString();
                textBox2.Text = oprod.Descripcion;
                textBox4.Text = oprod.Precio.ToString();
            }
            else if(oprod != null && nombre12 == "CALLE 1")
            {
                label3.Text = oprod.Id.ToString();
                textBox5.Text = oprod.Id.ToString();

                textBox2.Text = oprod.Descripcion;
                decimal preciocalle = Convert.ToDecimal(oprod.Preciocalle.Replace(",","."));
                if (preciocalle == 0)
                {
                    MessageBox.Show("El producto elegido no posee Precio Mostrador, se vendera al Precio Confiteria");
                    textBox4.Text = oprod.Precio.ToString();

                }
                else
                {
                    textBox4.Text = oprod.Preciocalle.ToString();
                }
            }
            textBox3.Focus();
        }