private void EnableControls(bool state){btnFornecedor.Enabled = state;}private MicroFour.StrataFrame.Business.BusinessEditingState currEditingState;private void sysPedidoCompraItemBO1_EditingStateChanged(MicroFour.StrataFrame.Business.EditingStateChangedEventArgs e){currEditingState = e.EditingState;if ((e.EditingState == MicroFour.StrataFrame.Business.BusinessEditingState.Adding) || (e.EditingState == MicroFour.StrataFrame.Business.BusinessEditingState.Editing)){EnableControls(true);}else{EnableControls(false);}}private void btnFornecedor_Click(object sender, EventArgs e){if ( this.bdFornecedor.ShowDialog() == DialogResult.OK ){for_cod.Text = Convert.ToString(sysFornecedorBO1.for_cod);}}
{
btnFornecedor.Enabled = state;
}
currEditingState = e.EditingState;
EnableControls(
for_cod.Text =
private void EnableControls(bool state){btnFornecedor.Enabled = state;}private MicroFour.StrataFrame.Business.BusinessEditingState currEditingState;private void sysPedidoCompraItemBO1_EditingStateChanged(MicroFour.StrataFrame.Business.EditingStateChangedEventArgs e){currEditingState = e.EditingState;if ((e.EditingState == MicroFour.StrataFrame.Business.BusinessEditingState.Adding) || (e.EditingState == MicroFour.StrataFrame.Business.BusinessEditingState.Editing)){EnableControls(true);}else{EnableControls(false);}}private void btnFornecedor_Click(object sender, EventArgs e){MessageBox.Show("OK");if ( this.bdFornecedor.ShowDialog() == DialogResult.OK ){for_cod.Text = Convert.ToString(sysFornecedorBO1.for_cod);}}}}
Me desculpe eu colouqei o evento EditingStateChanged no BO errado !
Fico contente que tenha resolvido.