protected void Show_Shortdrug()
        {
            string sql = "SELECT a.shord_id,a.shord_dateord,a.shord_timeord,a.shord_usr1,b.drg_name,a.shord_intake,a.shord_freq,a.shord_medway,a.shord_comment,a.shord_dtactst ";

            sql += ", CASE a.shord_actst WHEN '00001' THEN '' WHEN '00002' THEN '停用' END As Status ";
            sql += "FROM shortterm_ordermgt a ";
            sql += "LEFT JOIN drug_list b ON a.shord_drug = b.drg_code ";
            sql += "WHERE a.shord_patic='" + Patient_ID.Text + "' ";
            sql += "AND a.shord_dateord='" + toDay + "' ";
            sql += "ORDER BY a.shord_dateord DESC, Status";
            DataTable dt      = db.Query(sql);
            Store     istore1 = Grid_Short_Term.GetStore();

            istore1.DataSource = db.GetDataArray(dt);
            istore1.DataBind();
            dt.Dispose();
        }
예제 #2
0
        protected void Show_shortdrug()
        {
            DBMysql db = new DBMysql();
            string  sql;

            sql  = "SELECT a.shord_dateord, a.shord_timeord,a.shord_usr1,b.drg_name,a.shord_intake,a.shord_freq,a.shord_medway,c.genst_desc,a.shord_dtactst, a.shord_usr2,a.shord_comment ";
            sql += "from shortterm_ordermgt a, drug_list b, general_setup c";
            sql += " where a.shord_patic = '" + _PAT_IC + "'";
            sql += " and a.shord_drug = b.drg_code ";
            sql += " and c.genst_ctg = 'ActiveStatus' ";
            sql += " and a.shord_actst = c.genst_code order by a.shord_id ASC";
            DataTable dt = db.Query(sql);

            Store istore = Grid_Short_Term.GetStore();

            istore.DataSource = db.GetDataArray_AddRowNum(db.Query(sql));
            istore.DataBind();
        }