예제 #1
0
        void MER_LAND()
        {
            this.Text = "Landbase Medical Examination Certificate Print-Out";
            R_Landbade_MER1.Load(@"C:\Report\R_Landbade_MER.rpt");
            crystalReportViewer10.ReportSource     = R_Landbade_MER1;
            crystalReportViewer10.SelectionFormula = "{t_result_main1.resultid} = '" + this.Tag.ToString() + "'";

            ClassSql a = new ClassSql();
            TextBox  txt_ForNo = new TextBox(); TextBox txt_RevNo = new TextBox(); TextBox txt_ISO = new TextBox();

            a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_ForNo, "Form");
            a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_RevNo, "Revision");
            a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_ISO, "ISO");
            TextObject FormNo = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_formNo"];
            TextObject RevNo  = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_RevNo"];
            TextObject Iso    = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_iso"];

            FormNo.Text = txt_ForNo.Text;
            RevNo.Text  = txt_RevNo.Text;
            Iso.Text    = txt_ISO.Text;
            crystalReportViewer10.RefreshReport();
            RemoveTab(crystalReportViewer10);

            //  this.Text = "Landbase Medical Examination Certificate Print-Out";
            LandBase_MER21.Load(@"C:\Report\LandBase_MER2.rpt");
            crystalReportViewer11.ReportSource     = LandBase_MER21;
            crystalReportViewer11.SelectionFormula = "{t_result_main1.resultid} = '" + this.Tag.ToString() + "'";
            crystalReportViewer11.RefreshReport();
            RemoveTab(crystalReportViewer11);
        }
예제 #2
0
        void Load_MER()
        {
            R_Landbade_MER1.Load(@"C:\Report\R_Landbade_MER.rpt");
            crystalReportViewer4.ReportSource     = R_Landbade_MER1;
            crystalReportViewer4.SelectionFormula = "{t_result_main1.resultid} = '" + this.Tag.ToString() + "'";

            ClassSql a = new ClassSql();
            TextBox  txt_ForNo = new TextBox(); TextBox txt_RevNo = new TextBox(); TextBox txt_ISO = new TextBox();

            a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_ForNo, "Form");
            a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_RevNo, "Revision");
            a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_ISO, "ISO");
            TextObject FormNo = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_formNo"];
            TextObject RevNo  = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_RevNo"];
            TextObject Iso    = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_iso"];

            FormNo.Text = txt_ForNo.Text;
            RevNo.Text  = txt_RevNo.Text;
            Iso.Text    = txt_ISO.Text;
            // R_Landbade_MER1.Refresh();
            crystalReportViewer4.RefreshReport();
            RemoveTab(crystalReportViewer4);


            LandBase_MER21.Load(@"C:\Report\LandBase_MER2.rpt");
            crystalReportViewer5.ReportSource     = LandBase_MER21;
            crystalReportViewer5.SelectionFormula = "{t_result_main1.resultid} = '" + this.Tag.ToString() + "'";

            //ClassSql a = new ClassSql();
            //TextBox txt_ForNo = new TextBox(); TextBox txt_RevNo = new TextBox(); TextBox txt_ISO = new TextBox();
            //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_ForNo, "Form");
            //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_RevNo, "Revision");
            //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_ISO, "ISO");
            //TextObject FormNo = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_formNo"];
            //TextObject RevNo = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_RevNo"];
            //TextObject Iso = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_iso"];
            //FormNo.Text = txt_ForNo.Text;
            //RevNo.Text = txt_RevNo.Text;
            //Iso.Text = txt_ISO.Text;

            // R_Landbade_MER1.Refresh();
            crystalReportViewer5.RefreshReport();
            RemoveTab(crystalReportViewer5);
        }
        void MER_LAND()
        {
            this.Text = "Landbase Medical Examination Certificate Print-Out";
            IniFile ini = new IniFile(ClassSql.MMS_Path);

            R_Landbade_MER1.SetDatabaseLogon(ini.IniReadValue("CONNECTIONSTRING", "Uid"), ini.IniReadValue("CONNECTIONSTRING", "Pwd"), ini.IniReadValue("CONNECTIONSTRING", "Server"), ini.IniReadValue("CONNECTIONSTRING", "Database"));

            R_Landbade_MER1.Load(@"C:\Report\R_Landbade_MER.rpt");
            MER_Land1.ReportSource     = R_Landbade_MER1;
            MER_Land1.SelectionFormula = "{t_result_main1.resultid} = '" + this.Tag.ToString() + "'";

            //ClassSql a = new ClassSql();
            //TextBox txt_ForNo = new TextBox(); TextBox txt_RevNo = new TextBox(); TextBox txt_ISO = new TextBox();
            //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_ForNo, "Form");
            //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_RevNo, "Revision");
            //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '17'", txt_ISO, "ISO");

            TextObject FormNo = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_formNo"];
            TextObject RevNo  = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_RevNo"];
            TextObject Iso    = (TextObject)R_Landbade_MER1.ReportDefinition.ReportObjects["txt_iso"];

            FormNo.Text = ini.IniReadValue("FORM", "Landbase_MER");
            RevNo.Text  = ini.IniReadValue("REVISION", "Landbase_MER");
            Iso.Text    = ini.IniReadValue("ISO", "Landbase_MER");
            MER_Land1.RefreshReport();
            RemoveTab(MER_Land1);

            LandBase_MER21.SetDatabaseLogon(ini.IniReadValue("CONNECTIONSTRING", "Uid"), ini.IniReadValue("CONNECTIONSTRING", "Pwd"), ini.IniReadValue("CONNECTIONSTRING", "Server"), ini.IniReadValue("CONNECTIONSTRING", "Database"));

            //  this.Text = "Landbase Medical Examination Certificate Print-Out";
            LandBase_MER21.Load(@"C:\Report\LandBase_MER2.rpt");
            MER_Land2.ReportSource     = LandBase_MER21;
            MER_Land2.SelectionFormula = "{t_result_main1.resultid} = '" + this.Tag.ToString() + "'";
            //crystalReportViewer11.RefreshReport();
            RemoveTab(MER_Land2);
        }