示例#1
0
        private void addEstoque_Load(object sender, EventArgs e)
        {
            txtProdutoCod.Text = estoqueEnt.ProdutoID;
            txtProdutoNome.Text = estoqueEnt.ProdutoDescricao;

            //Caso o usuário não realize mudança de opções a padrão é Adicionar Em Estoque.
            manipularEstoqueStrategy = new ManipularEstoqueStrategy(new AdicionarEmEstoque(listSession));
        }
示例#2
0
        private void RadioButton_CheckedChanged(object sender, EventArgs e)
        {
            RadioButton radioButton = (RadioButton)sender;

            if(radioButton.Checked)
            {
                if(radioButton == rbAdicionarEmEstoque)
                {
                    manipularEstoqueInterface = new AdicionarEmEstoque(listSession);
                }
                else
                {
                    manipularEstoqueInterface = new RemoverDeEstoque(listSession);
                }

                manipularEstoqueStrategy = new ManipularEstoqueStrategy(manipularEstoqueInterface);
            }
        }