Ejemplo n.º 1
0
        private void R_Chem_CheckedChanged(object sender, EventArgs e)
        {
            Chem_sub1.Load(@"C:\Report\Chem_sub.rpt");
            crystalReportViewer4.ReportSource = Chem_sub1;

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

            a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '4'", txt_ForNo, "Form");
            a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '4'", txt_RevNo, "Revision");
            TextObject FormNo = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["txt_formNo"];
            TextObject RevNo  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["txt_RevNo"];

            FormNo.Text = txt_ForNo.Text;
            RevNo.Text  = txt_RevNo.Text;


            //Chem_sub1.Refresh();
            crystalReportViewer4.RefreshReport();
            RemoveTab(crystalReportViewer4);
            wizard1.SelectedTab = tabPage4;
        }
Ejemplo n.º 2
0
        public void load_Chem()
        {
            Chem_sub1.Load(@"C:\Report\Chem_sub.rpt");
            crystalReportViewer4.ReportSource = Chem_sub1;

            //ClassSql a = new ClassSql();
            //TextBox txt_ForNo = new TextBox(); TextBox txt_RevNo = new TextBox();
            //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '4'", txt_ForNo, "Form");
            //a.PutDataTOTextBox("SELECT * FROM tbl_formno WHERE cn = '4'", txt_RevNo, "Revision");
            IniFile    ini    = new IniFile(ClassSql.MMS_Path);
            TextObject FormNo = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["txt_formNo"];
            TextObject RevNo  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["txt_RevNo"];

            FormNo.Text = ini.IniReadValue("FORM", "Lab_Chemistry");
            RevNo.Text  = ini.IniReadValue("REVISION", "Lab_Chemistry");

            TextObject a  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text9"];
            TextObject b  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text44"];
            TextObject c  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text45"];
            TextObject d  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text51"];
            TextObject ee = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text61"];
            TextObject f  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text62"];
            TextObject g  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text63"];
            TextObject h  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text64"];
            TextObject i  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text65"];
            TextObject j  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text75"];
            TextObject k  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text76"];
            TextObject l  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text77"];
            TextObject m  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text78"];
            TextObject n  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text79"];
            TextObject o  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text80"];
            TextObject p  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text81"];
            TextObject q  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text82"];
            TextObject r  = (TextObject)Chem_sub1.ReportDefinition.ReportObjects["Text83"];


            a.Text  = ini.IniReadValue("NormalValue", "fbs") + " mmol/L";
            b.Text  = ini.IniReadValue("NormalValue", "bun") + " mmol/L";
            c.Text  = ini.IniReadValue("NormalValue", "creatine") + " mmol/L";
            d.Text  = ini.IniReadValue("NormalValue", "choles") + " mmol/L";
            ee.Text = ini.IniReadValue("NormalValue", "trigly") + " mmol/L";
            f.Text  = ini.IniReadValue("NormalValue", "uric") + " mmol/L";
            g.Text  = ini.IniReadValue("NormalValue", "sgot") + " IU/L";
            h.Text  = ini.IniReadValue("NormalValue", "sgpt") + " IU/L";
            i.Text  = ini.IniReadValue("NormalValue", "alk") + " IU/L";
            j.Text  = ini.IniReadValue("NormalValue", "fbs_con") + " mg/dL";
            k.Text  = ini.IniReadValue("NormalValue", "bun_con") + " mg/dL";
            l.Text  = ini.IniReadValue("NormalValue", "creatine_Con") + " mg/dL";
            m.Text  = ini.IniReadValue("NormalValue", "Cholesterol_Con") + " mg/dL";
            n.Text  = ini.IniReadValue("NormalValue", "Trig_Con") + " mg/dL";
            o.Text  = ini.IniReadValue("NormalValue", "Uric_Con") + " mg/dL";
            p.Text  = ini.IniReadValue("NormalValue", "sgpt_con");
            q.Text  = ini.IniReadValue("NormalValue", "sgot_con");
            r.Text  = ini.IniReadValue("NormalValue", "alk_con");



            //Chem_sub1.Refresh();
            crystalReportViewer4.RefreshReport();
            RemoveTab(crystalReportViewer4);
            wizard1.SelectedTab = tabPage4;
        }