protected void show_grid() { DBMysql db = new DBMysql(); string sql = string.Format(SQL_SELECT_BY_PATIENT, _PAT_ID); DataTable dt = db.Query(sql); Store istore = Grid_clinical1_nurse.GetStore(); istore.DataSource = db.GetDataArray(dt); istore.DataBind(); }
protected void show_grid() { string sql = "SELECT a.cln1_diadate, a.cln1_col1, a.cln1_col34, a.cln1_col5, a.cln1_col6, "; sql += "a.cln1_col7, a.cln1_col8, a.cln1_col13, a.cln1_col14, a.cln1_col15 "; sql += "FROM clinical1_nurse a "; sql += " WHERE a.cln1_patic = '" + _PAT_IC + "' "; sql += "ORDER BY a.cln1_diadate DESC"; DataTable dt = db.Query(sql); Store istore = Grid_clinical1_nurse.GetStore(); istore.DataSource = db.GetDataArray(dt); istore.DataBind(); }
protected void show_grid() { DBMysql db = new DBMysql(); string sql = "SELECT a.cln1_diadate,a.cln1_col1,a.cln1_col34,a.cln1_col5, a.cln1_col6,"; sql += " a.cln1_col7,a.cln1_col8,a.cln1_col13,a.cln1_col14,a.cln1_col15 "; sql += " FROM clinical1_nurse a,pat_info b "; sql += " WHERE b.pif_id = '" + _PAT_ID + "' "; sql += " AND a.cln1_patic = b.pif_ic "; sql += "ORDER BY a.cln1_diadate DESC"; DataTable dt = db.Query(sql); //sql = "SELECT pck_code AS CODE, pck_name AS NAME FROM package_setup "; //DataTable dt4 = db.Query(sql); //System.Data.DataView dv4 = dt4.DefaultView; //for (int i = 0; i < dt.Rows.Count; i++) //{ // dv4.RowFilter = "CODE='" + dt.Rows[i]["cln1_col4"].ToString() + "' "; // if (dv4.Count > 0) // dt.Rows[i]["cln1_col4"] = dv4[0]["NAME"].ToString(); //} //20160321 Alex 沒作用刪除 //sql = "SELECT hp_code AS CODE, hp_subgrp AS NAME FROM h_type "; //sql = "SELECT pck_code AS CODE, pck_name AS NAME FROM package_setup"; //修正與FLEX抓取相同資料表 //DataTable dt34 = db.Query(sql); //System.Data.DataView dv34 = dt34.DefaultView; //for (int i = 0; i < dt.Rows.Count; i++) //{ // dv34.RowFilter = "CODE='" + dt.Rows[i]["cln1_col34"].ToString() + "' "; // if (dv34.Count > 0) // dt.Rows[i]["cln1_col34"] = dv34[0]["NAME"].ToString(); //} Store istore = Grid_clinical1_nurse.GetStore(); istore.DataSource = db.GetDataArray(dt); istore.DataBind(); }