public void ContruirVistaPrevia(Dictionary <int, Orden> ordenes) { BLPaciente enlace = new BLPaciente(); FormatoImpresion fichero; foreach (Orden orden in ordenes.Values) { fichero = ConstructorFicha.GetInstance().CrearDocumento(orden, enlace.ObtenerPerfilPorId(orden.IdPaciente), BLExamen.RecuperarExamenes(orden)); ficheros.Add(fichero); } this.printPreviewDialog = new PrintPreviewDialog(); this.printPreviewDialog.ClientSize = new System.Drawing.Size(400, 300); this.printPreviewDialog.Location = new System.Drawing.Point(29, 29); this.printPreviewDialog.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.printPreviewDialog.Name = "Vista Previa de Impresión"; hojaSize.Height = 1170; hojaSize.Width = 827; PrintDocument pd = new PrintDocument(); pd.DefaultPageSettings.PaperSize = new PaperSize("A4", 827, 1170); // all sizes are converted from mm to inches & then multiplied by 100. pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage); printPreviewDialog.Document = pd; printPreviewDialog.ShowDialog(); indexFichero = 0; ficheros.Clear(); }
public void AddOrdenesToTB(Dictionary <int, Orden> ordenes) { BLPaciente enlace = new BLPaciente(); this.SuspendLayout(); foreach (Orden orden in ordenes.Values) { //DataRow row = tabla.NewRow(); //row[0] = Convert.ToInt32(!orden.EsEmitido); //row[1] = enlace.ObtenerPerfilPorId(orden.IdPaciente).CodigoHC; //row[2] = orden.Codigo; //row[3] = BLOrden.ObtenerDescripcion(orden); //row[4] = orden.UltimaModificacion ; //row[5] = (orden.EsEmitido? "SI":"NO"); //row[6] = orden.IdData; //tabla.Rows.Add(row); } this.ResumeLayout(false); }