private void frmBarriles_Shown(object sender, EventArgs e)
        {
            AfterOffice After = ((Form1)this.MdiParent).After;

            listBox1.Items.Add(After.RubiaNacional);
            listBox1.Items.Add(After.NegraNacional);
            listBox1.Items.Add(After.RubiaInternacional);
            listBox1.DisplayMember = "nombre";
        }
Exemplo n.º 2
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            AfterOffice After = ((Form1)this.MdiParent).After;
            Barril      barril;

            barril = (Barril)comboBox1.SelectedItem;

            label3.Text = "Precio:" + barril.Cerveza.Precio;
        }
Exemplo n.º 3
0
        private void frmVenta_Shown(object sender, EventArgs e)
        {
            AfterOffice After = ((Form1)this.MdiParent).After;

            comboBox1.DataSource    = After.Barriles;
            comboBox1.DisplayMember = "nombre";

            comboBox2.DataSource    = After.Recipientes;
            comboBox2.DisplayMember = "nombre";
        }
        private void button1_Click(object sender, EventArgs e)
        {
            AfterOffice After = ((Form1)this.MdiParent).After;

            After.crearBarril((Cerveza)listBox1.SelectedItem, float.Parse(textBox1.Text), textBox2.Text);


            listBox2.Items.Clear();
            foreach (var item in After.Barriles)
            {
                listBox2.Items.Add(item);
            }
            listBox2.DisplayMember = "nombre";
        }
Exemplo n.º 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            AfterOffice After = ((Form1)this.MdiParent).After;

            After.generarVenta((Barril)comboBox1.SelectedItem, (Recipiente)comboBox2.SelectedItem);
        }