public void AddNewVenta() { Venta = new VentaModel(); Venta.Cliente = new ClienteModel(); DeudaCliente = null; Venta.Attach("Cliente", s => SetClientByDocument(s)); InitPedidoToAddObjects(); }
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(); }