/// <summary> /// 保存 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void okButton_Click(object sender, System.EventArgs e) { this.curQCScoreSet = null; curQCScoreSet = new Neusoft.HISFC.Models.EPR.QCScore(); curQCScoreSet.ID = this.txtID.Text; curQCScoreSet.Name = this.txtName.Text; curQCScoreSet.Type = this.cboType.Text; curQCScoreSet.Memo = this.txtMemo.Text; curQCScoreSet.MiniScore = this.txtMiniScore.Text; curQCScoreSet.TotalScore = this.txtTotalScore.Text; curQCScoreSet.User02 = Neusoft.FrameWork.Management.Connection.Operator.ID; curQCScoreSet.User03 = System.DateTime.Now.ToLongDateString(); Neusoft.HISFC.BizProcess.Factory.Function.BeginTransaction(); if (Neusoft.HISFC.BizProcess.Factory.Function.IntegrateEPR.SetQCScoreSet(this.curQCScoreSet) == -1) { Neusoft.HISFC.BizProcess.Factory.Function.RollBack(); MessageBox.Show(Neusoft.HISFC.BizProcess.Factory.Function.IntegrateEPR.Err); return; } Neusoft.HISFC.BizProcess.Factory.Function.Commit(); MessageBox.Show("保存成功!"); this.FindForm().DialogResult = DialogResult.OK; this.FindForm().Close(); }
/// <summary> /// 添加新人员权限 /// </summary> /// <returns></returns> public int Add() { // TODO: 添加 ucQCScoreSetManager.Add 实现 Neusoft.HISFC.Models.EPR.QCScore obj = new Neusoft.HISFC.Models.EPR.QCScore(); ucQCScoreSetInput uc = new ucQCScoreSetInput(obj); Neusoft.FrameWork.WinForms.Classes.Function.PopForm.Text = "添加"; if (Neusoft.FrameWork.WinForms.Classes.Function.PopShowControl(uc) == DialogResult.OK) { this.Retrieve(); } return(0); }
// private ArrayList myGetQCScoreSetTypeList(string sql) // { // if(this.ExecQuery(sql)==-1) return null; // ArrayList al = new ArrayList(); // while(this.Reader.Read()) // { // Neusoft.FrameWork.Models.NeuObject qcScoreSetType = new Neusoft.FrameWork.Models.NeuObject(); // qcScoreSetType.ID = this.Reader[0].ToString(); // qcScoreSetType.User01 = this.Reader[1].ToString(); // al.Add(qcScoreSetType); // } // this.Reader.Close(); // return al; // } /// <summary> /// 保存评价标准变动数据--先执行更新操作,如果没有找到可以更新的数据,则插入一条新记录 /// </summary> /// <param name="qcScoreSet">评价标准</param> /// <returns>0没有更新 1成功 -1失败</returns> public int SetQCScoreSet(Neusoft.HISFC.Models.EPR.QCScore qcScoreSet) { int param; //执行更新操作 param = UpdateQCScoreSet(qcScoreSet); //如果没有找到可以更新的数据,则插入一条新记录 if (param == 0 || param == -1) { param = InsertQCScoreSet(qcScoreSet); } param = this.UpdateQCScoreSetTypeTotalScore(qcScoreSet); return(param); }
/// <summary> /// /// </summary> /// <param name="obj"></param> public void Set(object obj) { curQCScoreSet = obj as Neusoft.HISFC.Models.EPR.QCScore; this.txtID.Text = curQCScoreSet.ID; this.txtName.Text = curQCScoreSet.Name; this.cboType.Text = curQCScoreSet.Type; this.txtMemo.Text = curQCScoreSet.Memo; this.txtMiniScore.Text = curQCScoreSet.MiniScore; this.txtTotalScore.Text = curQCScoreSet.TotalScore; ArrayList al = Neusoft.HISFC.BizProcess.Factory.Function.IntegrateEPR.GetQCName(); if (al == null) { return; } this.cboType.AddItems(al); }
/// <summary> /// 更新评价标准项目总分值 /// </summary> /// <returns></returns> public int UpdateQCScoreSetTypeTotalScore(Neusoft.HISFC.Models.EPR.QCScore obj) { string strSql = ""; if (this.Sql.GetSql("EPR.QCScoreSet.UpdateQCScoreSetTypeTotalScore", ref strSql) == -1) { return(-1); } try { strSql = string.Format(strSql, obj.Type, obj.TotalScore); } catch (Exception ex) { this.Err = "错误的参数!\n" + ex.Message; return(-1); } return(this.ExecNoQuery(strSql)); }
/// <summary> /// 更新一条评价标准 /// </summary> /// <returns></returns> public int UpdateQCScore(Neusoft.HISFC.Models.EPR.QCScore obj) { string strSql = ""; if (this.Sql.GetSql("EPR.QC.QCScore.UpdateScore", ref strSql) == -1) { return(-1); } try { strSql = string.Format(strSql, obj.ID, obj.PatientInfo.ID, obj.PatientInfo.Name, obj.Name, obj.MiniScore, obj.User01, obj.Memo, this.Operator.ID); } catch (Exception ex) { this.Err = "错误的参数!\n" + ex.Message; return(-1); } return(this.ExecNoQuery(strSql)); }
/// <summary> /// 插入一条评价标准 /// </summary> /// <returns></returns> public int InsertQCScoreSet(Neusoft.HISFC.Models.EPR.QCScore obj) { string strSql = ""; if (this.Sql.GetSql("EPR.QCScoreSet.InsertQCScoreSet", ref strSql) == -1) { return(-1); } try { strSql = string.Format(strSql, obj.ID, obj.Name, obj.Type, obj.Memo, obj.MiniScore, obj.TotalScore, obj.User02); } catch (Exception ex) { this.Err = "错误的参数!\n" + ex.Message; return(-1); } return(this.ExecNoQuery(strSql)); }
/// <summary> /// 保存患者评分 /// </summary> public void Save() { if (this.myPatientInfo == null) { return; } Neusoft.HISFC.BizProcess.Factory.Function.BeginTransaction(); try { if (Neusoft.HISFC.BizProcess.Factory.Function.IntegrateEPR.DeleteQCScore(this.myPatientInfo.ID) == -1) { Neusoft.HISFC.BizProcess.Factory.Function.RollBack(); MessageBox.Show(Neusoft.HISFC.BizProcess.Factory.Function.IntegrateEPR.Err); } for (int i = 0; i < this.fpSpread2_Sheet1.RowCount; i++) { if (this.fpSpread2_Sheet1.Cells[i, 5].Text.ToUpper() == "TRUE") { Neusoft.HISFC.Models.EPR.QCScore obj = new Neusoft.HISFC.Models.EPR.QCScore(); obj.ID = this.fpSpread2_Sheet1.Cells[i, 0].Text; obj.Type = this.fpSpread2_Sheet1.Cells[i, 1].Text; obj.Name = this.fpSpread2_Sheet1.Cells[i, 2].Text; obj.MiniScore = this.fpSpread2_Sheet1.Cells[i, 3].Text; obj.PatientInfo = this.myPatientInfo; if (Neusoft.HISFC.BizProcess.Factory.Function.IntegrateEPR.InsertQCScore(obj) == -1) { Neusoft.HISFC.BizProcess.Factory.Function.RollBack(); MessageBox.Show(Neusoft.HISFC.BizProcess.Factory.Function.IntegrateEPR.Err); } } } Neusoft.HISFC.BizProcess.Factory.Function.Commit(); } catch (Exception ex) { Neusoft.HISFC.BizProcess.Factory.Function.RollBack(); MessageBox.Show(ex.Message); } }
/// <summary> /// 修改 /// </summary> /// <returns></returns> public int Auditing() { // TODO: 添加 ucQCScoreSetManager.Auditing 实现 if (this.fpSpread1.Sheets[0].ActiveRowIndex < 0) { MessageBox.Show("请选择要修改的行!"); return(0); } int i = this.fpSpread1.Sheets[0].ActiveRowIndex; Neusoft.HISFC.Models.EPR.QCScore obj = new Neusoft.HISFC.Models.EPR.QCScore(); obj.ID = this.fpSpread1.Sheets[0].Cells[i, 0].Text; obj.Name = this.fpSpread1.Sheets[0].Cells[i, 1].Text; obj.Type = this.fpSpread1.Sheets[0].Cells[i, 2].Text; obj.Memo = this.fpSpread1.Sheets[0].Cells[i, 3].Text; obj.MiniScore = this.fpSpread1.Sheets[0].Cells[i, 4].Text; obj.TotalScore = this.fpSpread1.Sheets[0].Cells[i, 5].Text; // obj.User02 = this.fpSpread1.Sheets[0].Cells[i,4].Text; // obj.User03 = this.fpSpread1.Sheets[0].Cells[i,5].Text; //byte[] img = // System.Drawing.Image image ; // System.IO.Stream writer; // image.Save(writer); // System.Windows.Forms.PictureBox p; // //writer.Write(buffer,0,buffer.); // System.IO.StreamReader reader; //reader.Read(buffer,0,length); // byte[] byteimg = manager.GetQCScoreSetBackGround(obj.ID); ucQCScoreSetInput uc = new ucQCScoreSetInput(obj); Neusoft.FrameWork.WinForms.Classes.Function.PopForm.Text = "修改"; if (Neusoft.FrameWork.WinForms.Classes.Function.PopShowControl(uc) == DialogResult.OK) { this.Retrieve(); } return(0); }
private ArrayList myGetQCScoreList(string sql) { if (this.ExecQuery(sql) == -1) { return(null); } ArrayList al = new ArrayList(); while (this.Reader.Read()) { Neusoft.HISFC.Models.EPR.QCScore obj = new Neusoft.HISFC.Models.EPR.QCScore(); obj.ID = this.Reader[0].ToString(); obj.PatientInfo.ID = this.Reader[0].ToString(); obj.PatientInfo.Name = this.Reader[0].ToString(); obj.Name = this.Reader[0].ToString(); obj.MiniScore = this.Reader[0].ToString(); obj.User01 = this.Reader[0].ToString(); obj.Memo = this.Reader[0].ToString(); al.Add(obj); } this.Reader.Close(); return(al); }
// /// <summary> // /// 获得质量控制信息评价标准-查询所有评价标准 // /// </summary> // /// <param name="inpatientNo"></param> // /// <param name="ID"></param> // /// <returns></returns> // public ArrayList GetQCScoreSetTypeList() // { // string strSql = ""; // if(this.Sql.GetSql("EPR.QCScoreSet.GetQCScoreSetTypeList",ref strSql)==-1) return null; // return this.myGetQCScoreSetTypeList(strSql); // } // #region "私有" private ArrayList myGetQCScoreSet(string sql) { if (this.ExecQuery(sql) == -1) { return(null); } ArrayList al = new ArrayList(); while (this.Reader.Read()) { Neusoft.HISFC.Models.EPR.QCScore qcScoreSet = new Neusoft.HISFC.Models.EPR.QCScore(); qcScoreSet.ID = this.Reader[0].ToString(); qcScoreSet.Name = this.Reader[1].ToString(); qcScoreSet.Type = this.Reader[2].ToString(); qcScoreSet.Memo = this.Reader[3].ToString(); qcScoreSet.MiniScore = this.Reader[4].ToString(); qcScoreSet.TotalScore = this.Reader[5].ToString(); qcScoreSet.User02 = this.Reader[6].ToString(); qcScoreSet.User03 = this.Reader[7].ToString(); al.Add(qcScoreSet); } this.Reader.Close(); return(al); }
public int SetQCScoreSet(Neusoft.HISFC.Models.EPR.QCScore qcScoreSet) { Neusoft.HISFC.BizLogic.EPR.QCScore manager = new Neusoft.HISFC.BizLogic.EPR.QCScore(); this.SetDB(manager); return(manager.SetQCScoreSet(qcScoreSet)); }
public int InsertQCScore(Neusoft.HISFC.Models.EPR.QCScore qcScore) { Neusoft.HISFC.BizLogic.EPR.QCScore manager = new Neusoft.HISFC.BizLogic.EPR.QCScore(); this.SetDB(manager); return(manager.InsertQCScore(qcScore)); }