Пример #1
0
        public void AddNewVenta()
        {
            Venta         = new VentaModel();
            Venta.Cliente = new ClienteModel();
            DeudaCliente  = null;
            Venta.Attach("Cliente", s => SetClientByDocument(s));

            InitPedidoToAddObjects();
        }
Пример #2
0
        private async void SaveVenta()
        {
            var venta = FacadeProvider.VentaProvider().Add(Venta);

            InitPedidoToAddObjects();

            Venta         = new VentaModel();
            Venta.Cliente = new ClienteModel();
            DeudaCliente  = null;
            Venta.Attach("Cliente", s => SetClientByDocument(s));

            var ventaPrintPage = await Task.Factory.StartNew(() =>
            {
                return(new VentaPrintPage());
            }, CancellationToken.None
                                                             , TaskCreationOptions.None
                                                             , TaskScheduler.FromCurrentSynchronizationContext());

            ventaPrintPage.VentaModels = venta;
            ventaPrintPage.ShowDialog();
        }