private void CaixaFechamentoViewModel_OnDispose(object sender, EventArgs e) { objCaixaFechamentoViewModel = null; objCaixaFechamentoViewModel = new CaixaFechamentoViewModel(); base.enStatusTelaAtual = enStatusTela.Navegacao; base.intSelectedIndexTabPrincipal = 0; Pesquisar(0); }
public CaixaViewModel() { NavegarCommand = new DelegateCommand(Navegar, CanNavegar); AbrirCaixaCommand = new DelegateCommand(AbrirCaixa, CanAbrirCaixa); LancarMovimentoCommand = new DelegateCommand(LancarMovimento, CanLancarMovimento); FecharCaixaCommand = new DelegateCommand(FecharCaixa, CanFecharCaixa); PesquisarCommand = new DelegateCommand(Pesquisar, CanPesquisar); objCaixaAberturaViewModel = new CaixaAberturaViewModel(); objCaixaMovimentoViewModel = new CaixaMovimentoViewModel(null); objCaixaFechamentoViewModel = new CaixaFechamentoViewModel(); strCaiStatusPesquisa = "T"; }
private void FecharCaixa(object objParam) { if (objParam != null) { Retorno objRetorno; using (var objBLL = new Caixa()) { objRetorno = objBLL.RetornaCaixaFechamento((int)objParam); } if (objRetorno.intCodigoErro == 0) { objCaixaFechamentoViewModel = new CaixaFechamentoViewModel(); objCaixaFechamentoViewModel.OnDispose += CaixaFechamentoViewModel_OnDispose; objCaixaFechamentoViewModel.objFechamentoCaixa = (FechamentoCaixa)objRetorno.objRetorno; base.enStatusTelaAtual = enStatusTela.EmInclusaoOuAlteracao; base.intSelectedIndexTabPrincipal = 3; } else { MessageBox.Show(objRetorno.strMsgErro, "Atenção", MessageBoxButton.OK, Util.GetMessageImage(objRetorno.intCodigoErro)); } } }