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

            if (ComandaCorrente == null)
            {
                ComandaCorrente = new Entity.Comanda();
                ComandaCorrente.ComandaProdutoes = new List <ComandaProduto>();
            }

            return(ComandaCorrente);
        }