Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var operador = new Operador().GetById(1);
            var abertura = new Abertura(operador);
            abertura.Fundo = 100M;
            abertura.Vendas.Add(new Venda
            {
                Itens = new List<Item>
                {
                    new Item { Descricao = "COCA COLA LATA 350 ML", Quantidade = 1, ValorUnitario = 4.5M} ,
                    new Item { Descricao = "FANTA LARANJA 350 ML", Quantidade = 1, ValorUnitario = 4.5M} ,
                    new Item { Descricao = "FANTA UVA LATA 350 ML", Quantidade = 1, ValorUnitario = 4.5M },
                    new Item { Descricao = "FANTA GOLD LATA 350 ML", Quantidade = 1, ValorUnitario = 4.5M },
                },
                Pagamentos = new List<Pagamento> { new Pagamento { MeioPagamento = new MeioPagamento().GetById(1), ValorPago = 18.0M } }
            });

            abertura.Save();
        }
Ejemplo n.º 2
0
 public Abertura(Operador operador)
 {
     DataAbertura = DateTime.Now;
     Operador = operador;
     Vendas = new List<Venda>();
 }