Пример #1
0
        protected void getList()
        {
            string sql = "select a.cln1_patic, e.pif_name, ";

            sql += "(SELECT COUNT(*) FROM clinical1_nurse f WHERE f.cln1_diadate>='" + _Get_YMD2(txtBegin_DATE.Text) + "' AND f.cln1_diadate<='" + _Get_YMD2(txtEnd_DATE.Text) + "' AND (f.cln1_col16 like 'EPO%' OR f.cln1_col16 like '%左%') AND f.cln1_patic=a.cln1_patic) as Column16, ";
            sql += "(SELECT COUNT(*) FROM clinical1_nurse b WHERE b.cln1_diadate>='" + _Get_YMD2(txtBegin_DATE.Text) + "' AND b.cln1_diadate<='" + _Get_YMD2(txtEnd_DATE.Text) + "' AND b.cln1_col16 like 'EPO%' AND b.cln1_col28 like '%怡宝%' AND b.cln1_patic=a.cln1_patic) as epo3000, ";
            sql += "(SELECT COUNT(*) FROM clinical1_nurse c WHERE c.cln1_diadate>='" + _Get_YMD2(txtBegin_DATE.Text) + "' AND c.cln1_diadate<='" + _Get_YMD2(txtEnd_DATE.Text) + "' AND c.cln1_col16 like 'EPO%' AND c.cln1_col28 like '%益比奧%' AND c.cln1_patic=a.cln1_patic) as epo10000, ";
            sql += "(SELECT COUNT(*) FROM clinical1_nurse d WHERE d.cln1_diadate>='" + _Get_YMD2(txtBegin_DATE.Text) + "' AND d.cln1_diadate<='" + _Get_YMD2(txtEnd_DATE.Text) + "' AND d.cln1_col16 like '%左%' AND d.cln1_patic=a.cln1_patic) as lcard ";
            sql += "FROM clinical1_nurse a ";
            sql += "LEFT JOIN pat_info e ON e.pif_ic=a.cln1_patic ";
            sql += "WHERE a.cln1_diadate>='" + _Get_YMD2(txtBegin_DATE.Text) + "' AND a.cln1_diadate<='" + _Get_YMD2(txtEnd_DATE.Text) + "' ";
            if (txtName.Text != "")
            {
                sql += "AND e.pif_name LIKE '%" + txtName.Text + "%' ";
            }
            sql += "GROUP BY a.cln1_patic ";
            sql += "ORDER BY a.cln1_patic";

            DataTable dt = db.Query(sql);

            db.myConnection.Close();
            Store istore = GridPanelList.GetStore();

            istore.DataSource = db.GetDataArray(dt);
            istore.DataBind();
        }
Пример #2
0
        protected void getList()
        {
            string sql = "select e.pif_mrn AS id, e.pif_name AS Name, ";

            sql += "a.cln1_col35 AS Column1, a.cln1_col13 AS Column2, a.cln1_col14 AS Column3, a.cln1_col28 AS Column4,";
            sql += "a.cln1_col29 AS Column5, a.cln1_col30 AS Column6, a.cln1_col31 AS Column7, a.cln1_col38 AS Column8 ";
            sql += "FROM clinical1_nurse a ";
            sql += "LEFT JOIN pat_info e ON e.pif_ic=a.cln1_patic ";
            sql += "WHERE a.cln1_diadate='" + _Get_YMD2(txtDATE.Text) + "' ";
            if (txtName.Text != "")
            {
                sql += "AND e.pif_name LIKE '%" + txtName.Text + "%' ";
            }
            sql += "ORDER BY a.cln1_patic";

            DataTable dt = db.Query(sql);

            db.myConnection.Close();
            Store istore = GridPanelList.GetStore();

            istore.DataSource = db.GetDataArray(dt);
            istore.DataBind();
        }