private void btnSave_Click(object sender, EventArgs e) { string refDesc = string.Empty; List<string> lstRefDesc = new List<string>(); for (int i = 0; i < this.dataGridView.Rows.Count; i++) { if (this.dataGridView.Rows[i].Cells[0].Value == null) continue; refDesc = this.dataGridView.Rows[i].Cells[0].Value.ToString(); if (!string.IsNullOrEmpty(refDesc) && refDesc.Trim() != string.Empty) { lstRefDesc.Add(refDesc); } } bizCriticalValue svc = (bizCriticalValue)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(bizCriticalValue)); int ret = svc.SaveCriYG(lstRefDesc); svc = null; if (ret > 0) { MessageBox.Show("保存成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { MessageBox.Show("保存失败.", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnSelect_Click(object sender, EventArgs e) { string BeginDate = this.dteRq1.Value.ToString("yyyy-MM-dd"); string EndDate = this.dteRq2.Value.ToString("yyyy-MM-dd"); if (Convert.ToDateTime(BeginDate + " 00:00:01") > Convert.ToDateTime(EndDate + " 00:00:01")) { MessageBox.Show("开始日期不能大于结束日期。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } try { clsPublic.PlayAvi("findFILE.avi", "正在统计危急值信息,请稍候..."); dwRep.Reset(); bizCriticalValue svc = (bizCriticalValue)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(bizCriticalValue)); List <EntityCriReport> lstRpt = svc.GetCriReport(Convert.ToDateTime(BeginDate + " 00:00:00"), Convert.ToDateTime(EndDate + " 23:59:59"), (this.chkDept.Checked ? this.DeptIdArr : ""), this.IsYG); if (lstRpt != null && lstRpt.Count > 0) { int row = 0; dwRep.SetRedrawOff(); foreach (EntityCriReport item in lstRpt) { row = dwRep.InsertRow(0); dwRep.SetItemString(row, "recorddata", item.recorddata); dwRep.SetItemString(row, "patname", item.patname); dwRep.SetItemString(row, "ipno", item.ipno); dwRep.SetItemString(row, "deptname", item.deptname); dwRep.SetItemString(row, "bedno", item.bedno); dwRep.SetItemString(row, "reportname", item.reportname); dwRep.SetItemString(row, "reportdept", item.reportdept); dwRep.SetItemString(row, "reportmin", item.reportmin); dwRep.SetItemString(row, "responser", item.responser); dwRep.SetItemString(row, "responsedate", item.responsedate); dwRep.SetItemString(row, "crivalue", item.crivalue); dwRep.SetItemString(row, "responsemsg", item.responsemsg); dwRep.SetItemString(row, "doctadvicemsg", item.doctadvicemsg); if (item.crivalue.Contains("耐药菌结果") && item.reportmin.Contains("00:00")) { item.upper10Min = 0; } dwRep.SetItemString(row, "moretan10", item.upper10Min.ToString() == "0" ? "" : item.upper10Min.ToString()); } dwRep.SetRedrawOn(); } else { dwRep.InsertRow(0); } dwRep.Modify("t_date.text = '" + BeginDate + " ~ " + EndDate + "'"); } finally { clsPublic.CloseAvi(); } this.dwRep.Refresh(); }
private void frmYgCriValue_Load(object sender, EventArgs e) { bizCriticalValue svc = (bizCriticalValue)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(bizCriticalValue)); DataTable dt = svc.GetCriYG(); if (dt != null && dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { string[] arr = new string[1]; arr[0] = dr["refDesc"].ToString().Trim(); this.dataGridView.Rows.Add(arr); } this.dataGridView.Refresh(); } }
private void btnSave_Click(object sender, EventArgs e) { decimal cvmId = 0; if (this.lblCardNo.Tag != null && Convert.ToDecimal(this.lblCardNo.Tag) > 0) { cvmId = Convert.ToDecimal(this.lblCardNo.Tag); } else { MessageBox.Show("请选择危急值记录。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } string response = this.txtResponse.Text.Trim(); if (string.IsNullOrEmpty(response)) { MessageBox.Show("请输入撤销原因,撤销原因不能为空。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error); this.txtResponse.Focus(); return; } DialogResult dlg = com.digitalwave.iCare.gui.HIS.clsPublic.m_dlgConfimByDefault(this.criMonitorTypeVo.empNo); if (dlg == DialogResult.Yes) { EntityCriCancel cancelVo = new EntityCriCancel(); cancelVo.cvmid = cvmId; cancelVo.cancelempid = this.criMonitorTypeVo.empId; cancelVo.cancelreason = response; cancelVo.canceldate = DateTime.Now; bizCriticalValue svc = (bizCriticalValue)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(bizCriticalValue)); int ret = svc.CancelCriticalValue(cancelVo); svc = null; if (ret > 0) { MessageBox.Show("危急值报告撤销成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); DialogResult = DialogResult.Yes; } else { MessageBox.Show("危急值报告撤销失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
/// <summary> /// Save /// </summary> /// <param name="isValid"></param> bool Save(bool isValid) { int ret = 0; bizCriticalValue svc = (bizCriticalValue)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(bizCriticalValue)); ret = svc.DelCriticalValue(mainVo.applyid); if (ret < 0) { return(false); } else { ret = svc.SaveCriticalValue(mainVo.applyid, mainVo.recorderid, mainVo.recorddate, lstItems, (mainVo.patsubno == "YG" ? true : false), isValid); if (ret > 0) { return(true); } } return(false); }
private void lvItem_SelectedIndexChanged(object sender, EventArgs e) { if (lvItem.SelectedItems.Count > 0) { this.Cursor = Cursors.WaitCursor; EntityCriticalMain vo = lvItem.SelectedItems[0].Tag as EntityCriticalMain; this.lblCardNo.Text = vo.cardno; this.lblCardNo.Tag = vo.cvmid.ToString(); this.lblIpNo.Text = vo.ipno; this.lblItemName.Text = vo.applyitem; this.lblPatName.Text = vo.patname; this.lblSex.Text = vo.patsex; this.lblAge.Text = vo.patage; this.lblApplyDate.Text = vo.applydate.ToString("yyyy-MM-dd HH:mm:ss"); bizCriticalValue svc = (bizCriticalValue)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(bizCriticalValue)); List <EntityCriticalLis> lstDet = svc.GetCriDetail(vo.cvmid); svc = null; this.dvItem.Rows.Clear(); if (lstDet != null && lstDet.Count > 0) { int index = 0; foreach (EntityCriticalLis item in lstDet) { index = this.dvItem.Rows.Add(); this.dvItem.Rows[index].Cells[0].Value = ((!string.IsNullOrEmpty(item.checkitemengname) && item.checkitemname.IndexOf(item.checkitemengname) >= 0) ? item.checkitemname : item.checkitemname + "(" + item.checkitemengname + ")"); this.dvItem.Rows[index].Cells[1].Value = item.unit; this.dvItem.Rows[index].Cells[2].Value = item.alarmlowval + "~" + item.alarmupval; this.dvItem.Rows[index].Cells[3].Value = item.resultvalue; this.dvItem.Rows[index].Cells[4].Value = item.alertflag; } } this.Cursor = Cursors.Default; } else { this.lblCardNo.Tag = string.Empty; } }