public void ExcluirComanda(Entity.Comanda comanda) { ProcessoInciadoHandler?.Invoke("Aguarde..."); _comandaDominio.ExcluirComanda(); OnDeleted?.Invoke(); ProcessoFinalizadoHandler?.Invoke(); }
public Comanda(IComandaRepositorio comandaRepositorio, IInfraLogger logger, IRepositorioBase repositorio) { ComandaCorrente = new Entity.Comanda(); ComandaCorrente.ComandaProdutoes = new List <ComandaProduto>(); _comandaRepositorio = comandaRepositorio; _logger = logger; _repositorio = repositorio; }
public void ExcluirComanda() { if (!ComandaCorrente.CodigoComanda.IsNullOrEmpty()) { _comandaRepositorio.ExcluirPorCodigoDaComanda(ComandaCorrente.CodigoComanda); ComandaCorrente = null; ComandaCorrente = new Entity.Comanda(); ComandaCorrente.ComandaProdutoes = new List <ComandaProduto>(); } }
public Entity.Comanda RecuperarComanda(string codigoDaComanda) { ComandaCorrente = _comandaRepositorio.RecuperarComanda(codigoDaComanda); if (ComandaCorrente == null) { ComandaCorrente = new Entity.Comanda(); ComandaCorrente.ComandaProdutoes = new List <ComandaProduto>(); } return(ComandaCorrente); }