/// <summary> /// 检索申请信息 /// </summary> public void m_mthGetappinfo(int flag) { int ischrg = this.m_intIsshowchrgops(); DataTable dtRecord = new DataTable(); long ret = objSvc.m_lngGetOPSApply(out dtRecord, "", "", flag, ischrg); if (flag == 1) { this.m_objViewer.lvApply.BeginUpdate(); this.m_objViewer.lvApply.Items.Clear(); } else if (flag == 2) { this.m_objViewer.lvReport.BeginUpdate(); this.m_objViewer.lvReport.Items.Clear(); } if (ret > 0 && dtRecord.Rows.Count > 0) { DateTime dteBirth; string age = ""; for (int i = 0; i < dtRecord.Rows.Count; i++) { if (dtRecord.Rows[i]["pstauts_int"].ToString().Trim() == "-2") { if (this.m_objViewer.m_chkTui.Checked == false) { continue; } } //申请单号 ListViewItem lv = new ListViewItem(dtRecord.Rows[i]["applyid_vchr"].ToString()); //申请科室 lv.SubItems.Add(dtRecord.Rows[i]["deptname_vchr"].ToString()); //姓名 lv.SubItems.Add(dtRecord.Rows[i]["name_vchr"].ToString()); //性别 lv.SubItems.Add(dtRecord.Rows[i]["sex_chr"].ToString()); //年龄 dteBirth = Convert.ToDateTime(dtRecord.Rows[i]["birth_dat"].ToString()); age = com.digitalwave.controls.clsArithmetic.CalcAge(dteBirth); lv.SubItems.Add(age); if (flag == 1) { //申请时间 lv.SubItems.Add(((DateTime)dtRecord.Rows[i]["opsbookingdate_dat"]).ToString("yyyy/MM/dd HH:mm")); } else if (flag == 2) { //确认时间 lv.SubItems.Add(((DateTime)dtRecord.Rows[i]["confirmdate_dat"]).ToString("yyyy/MM/dd HH:mm")); if (dtRecord.Rows[i]["repflag"] != null && dtRecord.Rows[i]["repflag"].ToString().Trim() != "") { lv.BackColor = Color.FromArgb(222, 239, 165); } } lv.Tag = dtRecord.Rows[i]; if (flag == 1) { if (ischrg != 1) { if (dtRecord.Rows[i]["pstauts_int"].ToString().Trim() == "2" || dtRecord.Rows[i]["pstauts_int"].ToString().Trim() == "-2") { this.m_objViewer.lvApply.Items.Add(lv); } } else { this.m_objViewer.lvApply.Items.Add(lv); } if (dtRecord.Rows[i]["pstauts_int"].ToString().Trim() == "-2") { lv.ForeColor = Color.Red; } } else if (flag == 2) { this.m_objViewer.lvReport.Items.Add(lv); } } } if (flag == 1) { this.m_objViewer.lvApply.EndUpdate(); } else if (flag == 2) { this.m_objViewer.lvReport.EndUpdate(); } }