private void Btn_VistaPrevia_Click(object sender, EventArgs e) { try { FrmVistaPrevia VP = new FrmVistaPrevia(); VP.VistaPrevia.Document = ImprimirDocumento; VP.VistaPrevia.Columns = 2; VP.ShowDialog(); } catch (Exception Error) { MessageBox.Show(Error.Message); } }
private void Btn_VistaPrevia_Click(object sender, EventArgs e) { try { if (!ControlValores()) { throw new Exception("Falta elegir el remito valorizado."); } Datos.Factura_detalle temp = Datos.Factura_detalle.GetFactura_detalleRelacional("", id_FacturaTextBox.Text); foreach (Datos.Factura_detalle itemFactura_detalle in temp.ListaFactura_detalle) { FD_Global = itemFactura_detalle; FrmVistaPrevia VP = new FrmVistaPrevia(); VP.VistaPrevia.Document = ImprimirDocumento; VP.ShowDialog(); } } catch (Exception Error) { MessageBox.Show(Error.Message); } }