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); } }
public ManipularEstoqueStrategy(ManipularEstoqueInterface manipularEstoqueInterface) { this.manipularEstoqueInterface = manipularEstoqueInterface; }