コード例 #1
0
        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";
        }
コード例 #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;
        }
コード例 #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";
        }
コード例 #4
0
        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";
        }
コード例 #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            AfterOffice After = ((Form1)this.MdiParent).After;

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