private void Export() { var rp = new ReportsPreview(); var r = new Reports(); /*String fullFilePath; * if (Mode == 's') r.ExportPayslipPDF(); * else */ rp.FormatPDF(Mode); if (Mode == 'g') { Main.GuardsLoadReport(); } else if (Mode == 'c') { Main.ClientsLoadSummary(); } else if (Mode == 'd') { Main.SchedLoadReport(); } else if (Mode == 's') { Main.PayLoadReport(); } this.Close(); //else if (Mode == 'p') /* * if (Mode == 'g' || Mode == 'c') * { * fullFilePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\MSAMIS Reports\\" + Reports.GetFileName(Mode); * * if (!System.IO.File.Exists(fullFilePath)) * { * label69.Text = "Something went wrong!"; * label68.Text = "The file was not created. Please try again."; * } * else * { * label69.Text = "Exporting Success!"; * label68.Text = "Your file has been successfuly exported."; * } * FadeOutTMR.Start(); * } * else * { * FadeOutTMR.Start(); * } */ }
private void ExportClientsSummaryBTN_Click(object sender, EventArgs e) { var rp = new ReportsPreview(); /* * srp.FormatPDF('s');1 * rp.FormatPDF('g'); * rp.FormatPDF('c'); * */ var r = new Reports(); r.PrintPayslipPDF(); rp.FormatPDF('s'); // //r.ExportToPayslipPDF(Payroll.GetApprovedPayrollsList()); }