private void btnShowReport_Click(object sender, EventArgs e) { string sFinalPath = ""; if (GlobalVariables.bImageCheck == false) { if (cmbReportName.Text.Length == 0) { MessageBox.Show("You have to select report to show report"); return; } rtfReportDetails.SaveFile(reportsPath + "\\ActReport\\" + cmbReportName.Text + ".rtf"); if (!File.Exists(reportsPath + "\\ActReport\\" + cmbReportName.Text + ".rtf")) { MessageBox.Show("Check your file name"); return; } } else { if (GlobalVariables.bReported == true) { if (File.Exists(reportsResultPath + "\\P" + GlobalVariables.PIDD + "\\P" + GlobalVariables.PIDD + ".Doc")) { sFinalPath = reportsResultPath + "\\P" + GlobalVariables.PIDD + "\\P" + GlobalVariables.PIDD + ".Doc"; } else { MessageBox.Show("You have not saved Report for this patient"); return; } } else { sFinalPath = reportsPath + "\\" + cmbReportName.Text + ".rtf"; } } MedicalMDIParent p = new MedicalMDIParent(); p.displayWordsListToolStripMenuItem.Enabled = true; frmShowReport showreport = new frmShowReport(sFinalPath, false); showreport.Dock = DockStyle.Fill; showreport.MdiParent = this.MdiParent; showreport.ClientSize = new System.Drawing.Size(2000, 800); showreport.WindowState = FormWindowState.Maximized; showreport.FormBorderStyle = FormBorderStyle.None; showreport.ControlBox = false; showreport.MaximizeBox = false; showreport.MinimizeBox = false; showreport.ShowIcon = false; showreport.Show(); }
private void displayWordsListToolStripMenuItem_Click(object sender, EventArgs e) { frmShowReport showreport = new frmShowReport(GlobalVariables.sFinalPath, true); showreport.Dock = DockStyle.Fill; showreport.MdiParent = this.MdiParent; showreport.ClientSize = new System.Drawing.Size(2000, 800); showreport.WindowState = FormWindowState.Maximized; showreport.FormBorderStyle = FormBorderStyle.None; showreport.ControlBox = false; showreport.MaximizeBox = false; showreport.MinimizeBox = false; showreport.ShowIcon = false; showreport.Show(); }