private void button1_Click(object sender, EventArgs e) { ReportManager rm = new ReportManager(); PDFManager pm = new PDFManager(); LisReport lr = new LisReport(); Hashtable equalFields = new Hashtable(); string sql = "select receivedate,sectionno,testtypeno,sampleno from ReportForm where SectionNo=" + textBox1.Text.Trim() + " and checkdate='"+dateTimePicker1.Value.ToString("yyyy-MM-dd")+"'"; DataTable dt = DbHelperSQL.Query(sql).Tables["dt"]; DataSet ds = pm.GetPrintDataSet("ReportTables.frd"); foreach (DataRow dr in dt.Rows) { equalFields.Clear(); equalFields.Add("receivedate", (DateTime)dr["receivedate"]); equalFields.Add("sectionno", (int)dr["sectionno"]); equalFields.Add("testtypeno", (int)dr["testtypeno"]); equalFields.Add("sampleno", dr["sampleno"].ToString()); rm.InitLisReport(lr, equalFields); pm.GenderPDFReport(lr, "E:\\lis", ds); } }
private void button3_Click(object sender, EventArgs e) { ReportManager rm = new ReportManager(); PDFManager pm = new PDFManager(); LisReport lr = new LisReport(); Hashtable equalFields = new Hashtable(); string sql = "select receivedate,sectionno,testtypeno,sampleno from ReportForm where receivedate='" + dateTimePicker1.Value.ToString("yyyy-MM-dd") + "' and Sectionno in(3,4,11,14,17,23,29,34,5,19,20,21,25,30,33,35,63,18,2,27,28,62)"; DataTable dt = DbHelperSQL.Query(sql).Tables["dt"]; DataSet ds = pm.GetPrintDataSet("ReportTables.frd"); foreach (DataRow dr in dt.Rows) { equalFields.Clear(); equalFields.Add("receivedate", (DateTime)dr["receivedate"]); equalFields.Add("sectionno", (int)dr["sectionno"]); equalFields.Add("testtypeno", (int)dr["testtypeno"]); equalFields.Add("sampleno", dr["sampleno"].ToString()); rm.InitLisReport(lr, equalFields); pm.GenderPDFReport(lr, LisConfig.GetPdfRootPath(), ds); } //GenderRemoteFile(dateTimePicker1.Value); }