private void ugBadAction_w_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { if (e.Cell.Text == "取消提醒") { DialogResult dr = MessageBox.Show(this, "确定要取消此提醒?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); if (dr == DialogResult.Yes) { BloodGas bg = new BloodGas(); bg.PID = int.Parse(ugBadAction_w.ActiveRow.Cells["ID"].Text); bg.Period = int.Parse(ugBadAction_w.ActiveRow.Cells["Period"].Text); bg.pH = "-1"; bg.PaO2 = "-1"; bg.SaO2 = "-1"; bg.PaCO2 = "-1"; bg.RealHCO3 = "-1"; bg.StandHCO3 = "-1"; bg.AB = "-1"; bg.BE = "-1"; bg.AG = "-1"; bg.CheckDate = DateTime.MinValue; Maticsoft.BLL.BloodGas bll = new Maticsoft.BLL.BloodGas(); bll.SaveOrUpdate(bg); ugBadAction_w.ActiveRow.Delete(false);//删除所选行 } } if (e.Cell.Text == "填写数据") { int pid = int.Parse(ugBadAction_w.ActiveRow.Cells["ID"].Text); int period = int.Parse(ugBadAction_w.ActiveRow.Cells["Period"].Text); AfterTreatTrace openDialog = new AfterTreatTrace(pid, period); openDialog.ShowDialog(); BindTraceList(); } }
private void BindBloodGasInfo_w() { Maticsoft.BLL.BloodGas bll = new Maticsoft.BLL.BloodGas(); List <BloodGas> bloodList = bll.GetModelList("PID=" + pid.ToString() + " AND Period=" + period.ToString()); if (bloodList != null && bloodList.Count > 0) { BloodGas bg = bloodList[0]; //this.lblBloodID.Tag = bg.ID; this.txtPH_w.Text = bg.pH; this.txtPaO2_w.Text = bg.PaO2; this.txtSaO2_w.Text = bg.SaO2; this.txtPcO2_w.Text = bg.PaCO2; this.txtRealHCO3_w.Text = bg.RealHCO3; this.txtStandHCO3_w.Text = bg.StandHCO3; this.txtAB_w.Text = bg.AB; this.txtBE_w.Text = bg.BE; this.txtAG_w.Text = bg.AG; this.dtpBloodGas_w.Value = bg.CheckDate.Value; } }
private void button10_Click(object sender, EventArgs e) { bool result = false; BloodGas bg = new BloodGas(); bg.PID = pid; bg.Period = period; bg.pH = txtPH_w.Text; bg.PaO2 = txtPaO2_w.Text; bg.SaO2 = txtSaO2_w.Text; bg.PaCO2 = txtPcO2_w.Text; bg.RealHCO3 = txtRealHCO3_w.Text; bg.StandHCO3 = txtStandHCO3_w.Text; bg.AB = txtAB_w.Text; bg.BE = txtBE_w.Text; bg.AG = txtAG_w.Text; bg.CheckDate = dtpBloodGas_w.Value; Maticsoft.BLL.BloodGas bgBll = new Maticsoft.BLL.BloodGas(); result = bgBll.SaveOrUpdate(bg); Lung lung = new Lung(); lung.PID = pid; lung.Period = period; lung.fev1 = txtFev1_w.Text; lung.fev1pre = txtFev1pre_w.Text; lung.fvc = txtFvc_w.Text; lung.fvcpre = txtFvcpre_w.Text; lung.fev1fvc = txtFev1fvc_w.Text; lung.tlc = txtTlc_w.Text; lung.tlvpre = txtTlvpre_w.Text; lung.rv = txtRV_w.Text; lung.rvpre = txtRvpre_w.Text; lung.rvtlc = txtRvtlc_w.Text; lung.CheckTime = dtpLung_w.Value; lung.File = this.uploaddicomLung_w.File; Maticsoft.BLL.Lung lungBLL = new Maticsoft.BLL.Lung(); result = lungBLL.SaveOrUpdate(lung); dicom di = new dicom(); di.PID = pid; di.Period = period; di.TreatLobeVolumn = txtLobeVolumn_w.Text; di.UnTreatLobeVolumn = txtLobeVolumn2_w.Text; di.File = this.uploaddicom_w.File; di.CheckDate = dtpDicom_w.Value; di.Heterogeneity = ""; di.LobeSplit = ""; Maticsoft.BLL.dicom diBLL = new Maticsoft.BLL.dicom(); result = diBLL.SaveOrUpdate(di); SportLife sl = new SportLife(); sl.PID = pid; sl.Period = period; int sixTest = 0; int.TryParse(txtSixTest_w.Text, out sixTest); sl.SixMinuteTest = sixTest; sl.SixMinuteTestDate = dtpSixTest_w.Value; sixTest = 0; int.TryParse(txtGeorgeTest_w.Text, out sixTest); sl.StGeorgeTest = sixTest;// int.Parse(txtGeorgeTest_w.Text); sl.StGeorgeTestDate = dtpGeorgeTest_w.Value; sl.StGeorgeTestFile = this.uploaddicomGeorge_w.File; sixTest = 0; int.TryParse(txtCatTest_w.Text, out sixTest); sl.CATTest = sixTest;// int.Parse(txtCatTest_w.Text); sl.CATTestDate = dtpCatTest_w.Value; sixTest = 0; int.TryParse(txtMmrcTest_w.Text, out sixTest); sl.MMRCTest = sixTest;// int.Parse(this.txtMmrc_w.Text); sl.MMRCTestDate = dtpMmrc_w.Value; Maticsoft.BLL.SportLife slBLL = new Maticsoft.BLL.SportLife(); result = slBLL.SaveOrUpdate(sl); List <BadReaction> treatHistories = new List <BadReaction>(); foreach (UltraGridRow r in this.ugBadAction_w.Rows) { BadReaction th = new BadReaction(); th.PID = pid; if (r.Cells["ID"].Text != "") { th.ID = int.Parse(r.Cells["ID"].Text); } th.Peroid = period; th.ReactionName = r.Cells["ReactionName"].Value.ToString(); th.OccurDate = DateTime.Parse(r.Cells["OccurDate"].Value.ToString()); th.Severity = r.Cells["Severity"].Value.ToString(); th.TreatMethod = r.Cells["TreatMethod"].Value.ToString(); th.TreatResult = r.Cells["TreatResult"].Value.ToString(); treatHistories.Add(th); } Maticsoft.BLL.BadReaction brBLL = new Maticsoft.BLL.BadReaction(); foreach (BadReaction th in treatHistories) { if (th.ID != 0) { result = brBLL.Update(th); } else { result = brBLL.Add(th); } } if (result) { MessageBox.Show(this, periodName + "数据保存成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); FreezeForm.ChangeControlEditable(this, false); } else { MessageBox.Show(this, periodName + "数据保存失败,请重试!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); } }