private void Toshow_particulars() { SetTable(); string sql = ""; if (Temperture != null && Nurse != null) { sql = "select qua.pid as 病案号,pat.sick_doctor_id as 责任人编号,pat.sick_doctor_name as 责任人,qua.note as 扣分点,qua.doctype as 扣分文书,to_char(qua.noteztime,'yyyy-MM-dd hh:mi:ss') as 记录时间," + @"qua.take_grade as 扣分值 from t_quality_record qua inner join t_in_patient pat on pat.pid=qua.pid where pat.sick_doctor_name='" + Person + "' and qua.pid='" + Pid + "' and qua.doctype='体温单'or qua.pid='" + Pid + "' and qua.doctype like '%危重%' order by to_char(qua.noteztime,'yyyy-MM-dd hh:mi:ss') desc"; } if (Temperture != null && Nurse == null) { sql = "select qua.pid as 病案号,pat.sick_doctor_id as 责任人编号,pat.sick_doctor_name as 责任人,qua.note as 扣分点,qua.doctype as 扣分文书,to_char(qua.noteztime,'yyyy-MM-dd hh:mi:ss') as 记录时间," + @"qua.take_grade as 扣分值 from t_quality_record qua inner join t_in_patient pat on pat.pid=qua.pid where qua.pid='" + Pid + "' and pat.sick_doctor_name='" + Person + "' and qua.doctype='体温单' order by to_char(qua.noteztime,'yyyy-MM-dd hh:mi:ss') desc"; } if (Temperture == null && Nurse != null) { sql = "select qua.pid as 病案号,pat.sick_doctor_id as 责任人编号,pat.sick_doctor_name as 责任人,qua.note as 扣分点,qua.doctype as 扣分文书,to_char(qua.noteztime,'yyyy-MM-dd hh:mi:ss') as 记录时间," + @"qua.take_grade as 扣分值 from t_quality_record qua inner join t_in_patient pat on pat.pid=qua.pid where qua.pid='" + Pid + "' and pat.sick_doctor_name='" + Person + "' and qua.doctype like '%危重%' order by to_char(qua.noteztime,'yyyy-MM-dd hh:mi:ss') desc"; } DataSet ds = App.GetDataSet(sql); if (ds != null) { DataTable dt = ds.Tables[0]; if (dt != null) { for (int i = 0; i < dt.Rows.Count; i++) { c1flgview.Rows.Add(); Class_Toshow_particulars pat = new Class_Toshow_particulars(); pat.Pids = dt.Rows[i]["病案号"].ToString(); pat.Person_in_change_id = dt.Rows[i]["责任人编号"].ToString(); pat.Person_in_change = dt.Rows[i]["责任人"].ToString(); pat.Deduct_mark = dt.Rows[i]["扣分点"].ToString(); pat.Deduct_mark_book = dt.Rows[i]["扣分文书"].ToString(); pat.Record_time = dt.Rows[i]["记录时间"].ToString(); pat.Deduct_mark_value = dt.Rows[i]["扣分值"].ToString(); c1flgview[1 + i, 0] = pat.Pids; c1flgview[1 + i, 1] = pat.Person_in_change_id; c1flgview[1 + i, 2] = pat.Person_in_change; c1flgview[1 + i, 3] = pat.Deduct_mark; c1flgview[1 + i, 4] = pat.Deduct_mark_book; c1flgview[1 + i, 5] = pat.Record_time; c1flgview[1 + i, 6] = pat.Deduct_mark_value; } } CellUnit(); } }
private void Toshow_particulars() { SetTable(); SQl_tper = @"select tua.pid as 病案号,tua.GRADE_DOC_ID as 责任人编号,tua.GRADE_DOC_NAME as 责任人, " + @"tua.down_reason_1 as 扣分点,tua.doc_type as 扣分文书,to_char(tua.grade_time,'yyyy-MM-dd hh:mi:ss') as 记录时间, " + @"tua.down_point_1 as 扣分值 from T_NURSE_GRADE tua "; string sql = ""; if (Temperture != null && Nurse != null) { sql = SQl_tper + " where tua.pid='" + Pid + "' and tua.GRADE_DOC_NAME='" + Person + "' and tua.doc_type like '%体温单%' or tua.pid='" + Pid + "' and tua.GRADE_DOC_NAME='" + Person + "' and tua.doc_type like '%危重%' order by to_char(tua.grade_time,'yyyy-MM-dd hh:mi:ss') desc"; } if (Temperture != null && Nurse == null) { sql = SQl_tper + " where tua.pid='" + Pid + "' and tua.GRADE_DOC_NAME='" + Person + "' and tua.doc_type like '%体温单%' order by to_char(tua.grade_time,'yyyy-MM-dd hh:mi:ss') desc"; } if (Temperture == null && Nurse != null) { sql = SQl_tper + " where tua.pid='" + Pid + "' and tua.GRADE_DOC_NAME='" + Person + "' and tua.doc_type like '%危重%' order by to_char(tua.grade_time,'yyyy-MM-dd hh:mi:ss') desc"; } DataSet ds = App.GetDataSet(sql); if (ds != null) { DataTable dt = ds.Tables[0]; if (dt != null) { for (int i = 0; i < dt.Rows.Count; i++) { c1flgview.Rows.Add(); Class_Toshow_particulars pat = new Class_Toshow_particulars(); pat.Pids = dt.Rows[i]["病案号"].ToString(); pat.Person_in_change_id = dt.Rows[i]["责任人编号"].ToString(); pat.Person_in_change = dt.Rows[i]["责任人"].ToString(); pat.Deduct_mark = dt.Rows[i]["扣分点"].ToString(); pat.Deduct_mark_book = dt.Rows[i]["扣分文书"].ToString(); pat.Record_time = dt.Rows[i]["记录时间"].ToString(); pat.Deduct_mark_value = dt.Rows[i]["扣分值"].ToString(); c1flgview[1 + i, 0] = pat.Pids; c1flgview[1 + i, 1] = pat.Person_in_change_id; c1flgview[1 + i, 2] = pat.Person_in_change; c1flgview[1 + i, 3] = pat.Deduct_mark; c1flgview[1 + i, 4] = pat.Deduct_mark_book; c1flgview[1 + i, 5] = pat.Record_time; c1flgview[1 + i, 6] = pat.Deduct_mark_value; } } CellUnit(); } }