Beispiel #1
0
        private void Button_Click_7(object sender, RoutedEventArgs e)
        {
            ReportPreview report  = new ReportPreview();
            string        factura = numeroFactura.Text;

            if (numeroFactura.Text != "")
            {
                bool okConsulta = report.GetCrearFactura(factura);
                if (okConsulta)
                {
                    report.Show();
                }
                else
                {
                    System.Windows.MessageBox.Show("no se ha encontrado el registro por factura");
                }
            }
            else
            {
                System.Windows.MessageBox.Show("es necesario insertar por una factura");
            }
        }
Beispiel #2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            if (listaProductosF.Count > 0 && txb_nFactura.Text != "" && cliente != null)
            {
                Cliente nuevocliente = new Cliente(txb_cif.Text, txb_nombre.Text, txb_direccion.Text);
                FacturaDBHandler.AddClient(nuevocliente);
                bool okFactura = FacturaDBHandler.AddFactura(nuevocliente, listaProductosF, txb_nFactura.Text);


                if (okFactura)
                {
                    MainWindow.myNavigationFrame.NavigationService.Navigate(new MainPage());
                    ReportPreview report  = new ReportPreview();
                    string        factura = txb_nFactura.Text;
                    if (txb_nFactura.Text != "")
                    {
                        bool okConsulta = report.GetCrearFactura(txb_nFactura.Text);
                        if (okConsulta)
                        {
                            report.Show();
                        }
                        else
                        {
                            System.Windows.MessageBox.Show("no se ha encontrado el registro por factura");
                        }
                    }
                    else
                    {
                        MessageBox.Show("no se ha  podido cargar la factura");
                    }
                }
                else
                {
                    MessageBox.Show("No se ha encontrado el registro pro factura");
                }
            }
        }