手术室外登记 术中显示时间轴
This commit is contained in:
parent
073f1fd73c
commit
7c7f753bb8
@ -494,6 +494,9 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="OremrUserControl\EventCodeCompilerBill.cs" />
|
<Compile Include="OremrUserControl\EventCodeCompilerBill.cs" />
|
||||||
<Compile Include="OremrUserControl\ExportConfig.cs" />
|
<Compile Include="OremrUserControl\ExportConfig.cs" />
|
||||||
|
<Compile Include="OremrUserControl\ExtendedPanel.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="OremrUserControl\PanelScrollHelper.cs" />
|
<Compile Include="OremrUserControl\PanelScrollHelper.cs" />
|
||||||
<Compile Include="OperationFront\frmPrintingArrangemen.cs">
|
<Compile Include="OperationFront\frmPrintingArrangemen.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
|
|||||||
@ -75,6 +75,7 @@
|
|||||||
this.superTabControlPanel1 = new DevComponents.DotNetBar.SuperTabControlPanel();
|
this.superTabControlPanel1 = new DevComponents.DotNetBar.SuperTabControlPanel();
|
||||||
this.panelExZKZB = new DevComponents.DotNetBar.PanelEx();
|
this.panelExZKZB = new DevComponents.DotNetBar.PanelEx();
|
||||||
this.panel8 = new AIMS.PublicUI.UI.DrawPanel();
|
this.panel8 = new AIMS.PublicUI.UI.DrawPanel();
|
||||||
|
this.paneltop = new System.Windows.Forms.Panel();
|
||||||
this.circularProgress1 = new DevComponents.DotNetBar.Controls.CircularProgress();
|
this.circularProgress1 = new DevComponents.DotNetBar.Controls.CircularProgress();
|
||||||
this.zgcAnaesRecord = new DrawGraph.ZedGraphControl();
|
this.zgcAnaesRecord = new DrawGraph.ZedGraphControl();
|
||||||
this.spTabQXQDD = new DevComponents.DotNetBar.SuperTabItem();
|
this.spTabQXQDD = new DevComponents.DotNetBar.SuperTabItem();
|
||||||
@ -921,6 +922,7 @@
|
|||||||
//
|
//
|
||||||
this.panel8.AutoScroll = true;
|
this.panel8.AutoScroll = true;
|
||||||
this.panel8.BackColor = System.Drawing.Color.White;
|
this.panel8.BackColor = System.Drawing.Color.White;
|
||||||
|
this.panel8.Controls.Add(this.paneltop);
|
||||||
this.panel8.Controls.Add(this.circularProgress1);
|
this.panel8.Controls.Add(this.circularProgress1);
|
||||||
this.panel8.Controls.Add(this.zgcAnaesRecord);
|
this.panel8.Controls.Add(this.zgcAnaesRecord);
|
||||||
this.panel8.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.panel8.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
@ -930,6 +932,14 @@
|
|||||||
this.panel8.TabIndex = 2;
|
this.panel8.TabIndex = 2;
|
||||||
this.panel8.Scroll += new System.Windows.Forms.ScrollEventHandler(this.panel8_Scroll);
|
this.panel8.Scroll += new System.Windows.Forms.ScrollEventHandler(this.panel8_Scroll);
|
||||||
//
|
//
|
||||||
|
// paneltop
|
||||||
|
//
|
||||||
|
this.paneltop.Location = new System.Drawing.Point(9, 137);
|
||||||
|
this.paneltop.Name = "paneltop";
|
||||||
|
this.paneltop.Size = new System.Drawing.Size(690, 30);
|
||||||
|
this.paneltop.TabIndex = 7;
|
||||||
|
this.paneltop.Visible = false;
|
||||||
|
//
|
||||||
// circularProgress1
|
// circularProgress1
|
||||||
//
|
//
|
||||||
this.circularProgress1.AnimationSpeed = 50;
|
this.circularProgress1.AnimationSpeed = 50;
|
||||||
@ -2163,5 +2173,6 @@
|
|||||||
private System.Windows.Forms.Button button10;
|
private System.Windows.Forms.Button button10;
|
||||||
private System.Windows.Forms.ComboBox cmbBGType;
|
private System.Windows.Forms.ComboBox cmbBGType;
|
||||||
private System.Windows.Forms.Panel PanelSave;
|
private System.Windows.Forms.Panel PanelSave;
|
||||||
|
private System.Windows.Forms.Panel paneltop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -211,6 +211,7 @@ namespace AIMS.OperationAanesthesia
|
|||||||
|
|
||||||
panel8.VerticalScroll.Value = 0;
|
panel8.VerticalScroll.Value = 0;
|
||||||
panel82.VerticalScroll.Value = 0;
|
panel82.VerticalScroll.Value = 0;
|
||||||
|
paneltop.Visible = false;
|
||||||
|
|
||||||
mPanes = new List<MasterPane>();
|
mPanes = new List<MasterPane>();
|
||||||
UpPanes = new List<MasterPane>();
|
UpPanes = new List<MasterPane>();
|
||||||
@ -940,6 +941,17 @@ namespace AIMS.OperationAanesthesia
|
|||||||
{
|
{
|
||||||
if (templateManage != null)
|
if (templateManage != null)
|
||||||
templateManage.SetPYL();
|
templateManage.SetPYL();
|
||||||
|
|
||||||
|
paneltop.Location = new Point(0, paneltop.VerticalScroll.Value);
|
||||||
|
if (panel8.VerticalScroll.Value > 240)
|
||||||
|
{
|
||||||
|
paneltop.Width = panel8.Width - 50;
|
||||||
|
paneltop.Visible = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
paneltop.Visible = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void panel82_Scroll(object sender, ScrollEventArgs e)
|
private void panel82_Scroll(object sender, ScrollEventArgs e)
|
||||||
{
|
{
|
||||||
@ -951,6 +963,17 @@ namespace AIMS.OperationAanesthesia
|
|||||||
{
|
{
|
||||||
if (templateManage != null)
|
if (templateManage != null)
|
||||||
templateManage.SetPYL();
|
templateManage.SetPYL();
|
||||||
|
|
||||||
|
paneltop.Location = new Point(0, paneltop.VerticalScroll.Value);
|
||||||
|
if (panel8.VerticalScroll.Value > 240)
|
||||||
|
{
|
||||||
|
paneltop.Width = panel8.Width - 50;
|
||||||
|
paneltop.Visible = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
paneltop.Visible = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void panel82_MouseWheel(object sender, MouseEventArgs e)
|
private void panel82_MouseWheel(object sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
@ -2054,9 +2077,9 @@ namespace AIMS.OperationAanesthesia
|
|||||||
{
|
{
|
||||||
area.MouseWheelParam += Area_MouseWheelParam;
|
area.MouseWheelParam += Area_MouseWheelParam;
|
||||||
}
|
}
|
||||||
reDrawEvent();
|
|
||||||
templateManage.Bind();
|
templateManage.Bind();
|
||||||
templateManage2.Bind();
|
templateManage2.Bind();
|
||||||
|
reDrawEvent();
|
||||||
reDrawAnalysis();
|
reDrawAnalysis();
|
||||||
|
|
||||||
zgcAnaesRecord.Refresh();
|
zgcAnaesRecord.Refresh();
|
||||||
@ -2095,15 +2118,16 @@ namespace AIMS.OperationAanesthesia
|
|||||||
|
|
||||||
private void DrawEvent()
|
private void DrawEvent()
|
||||||
{
|
{
|
||||||
reDrawEvent();
|
|
||||||
templateManage.Bind("IconManage");
|
templateManage.Bind("IconManage");
|
||||||
templateManage.Bind("RemarkManage");
|
templateManage.Bind("RemarkManage");
|
||||||
|
reDrawEvent();
|
||||||
zgcAnaesRecord.Refresh();
|
zgcAnaesRecord.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void reDrawEvent()
|
private void reDrawEvent()
|
||||||
{
|
{
|
||||||
ClearTimeText();
|
ClearTimeText();
|
||||||
|
DrawPanelTopTime();
|
||||||
if (_record.InRoomTime != null)
|
if (_record.InRoomTime != null)
|
||||||
{
|
{
|
||||||
txtInRoom.CustomFormat = "MM-dd HH:mm";
|
txtInRoom.CustomFormat = "MM-dd HH:mm";
|
||||||
@ -2189,6 +2213,34 @@ namespace AIMS.OperationAanesthesia
|
|||||||
EndOperationOutRoom();
|
EndOperationOutRoom();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void DrawPanelTopTime()
|
||||||
|
{
|
||||||
|
paneltop.Controls.Clear();
|
||||||
|
int LoactionX = Convert.ToInt32(panel8.Width * 0.19);
|
||||||
|
int SpanX = (panel8.Width - LoactionX) / (240 / 15 + 2);
|
||||||
|
paneltop.BringToFront();
|
||||||
|
System.Windows.Forms.Label label = new System.Windows.Forms.Label();
|
||||||
|
label.AutoSize = true;
|
||||||
|
label.Font = new System.Drawing.Font("微软雅黑", 9.5F);
|
||||||
|
label.Location = new System.Drawing.Point(LoactionX - 100, 7);
|
||||||
|
label.Size = new System.Drawing.Size(39, 17);
|
||||||
|
label.TabIndex = 0;
|
||||||
|
label.Text = "时间(min)";
|
||||||
|
paneltop.Controls.Add(label);
|
||||||
|
for (int i = 0; i <= (240 / 15); i++)
|
||||||
|
{
|
||||||
|
DateTime tempTime = _record.PageBegin.AddMinutes(i * 15);
|
||||||
|
System.Windows.Forms.Label labeltemp = new System.Windows.Forms.Label();
|
||||||
|
labeltemp.AutoSize = true;
|
||||||
|
labeltemp.Font = new System.Drawing.Font("微软雅黑", 9.5F);
|
||||||
|
labeltemp.Location = new System.Drawing.Point(LoactionX + SpanX * i, 7);
|
||||||
|
labeltemp.Size = new System.Drawing.Size(39, 17);
|
||||||
|
labeltemp.TabIndex = 0;
|
||||||
|
labeltemp.Text = tempTime.ToString("HH:mm");
|
||||||
|
paneltop.Controls.Add(labeltemp);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
private void ClearTimeText()
|
private void ClearTimeText()
|
||||||
{
|
{
|
||||||
txtInRoom.CustomFormat = " ";
|
txtInRoom.CustomFormat = " ";
|
||||||
@ -2224,6 +2276,7 @@ namespace AIMS.OperationAanesthesia
|
|||||||
this.picBG.BackgroundImage = global::AIMS.Properties.Resources.拔管;
|
this.picBG.BackgroundImage = global::AIMS.Properties.Resources.拔管;
|
||||||
this.picAnesEnd.BackgroundImage = global::AIMS.Properties.Resources.麻醉结束;
|
this.picAnesEnd.BackgroundImage = global::AIMS.Properties.Resources.麻醉结束;
|
||||||
this.picOutRoom.BackgroundImage = global::AIMS.Properties.Resources.出手术室;
|
this.picOutRoom.BackgroundImage = global::AIMS.Properties.Resources.出手术室;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool GetOpeState(ref string message)
|
private bool GetOpeState(ref string message)
|
||||||
@ -2345,6 +2398,7 @@ namespace AIMS.OperationAanesthesia
|
|||||||
{
|
{
|
||||||
panel8.VerticalScroll.Value = 0;
|
panel8.VerticalScroll.Value = 0;
|
||||||
panel82.VerticalScroll.Value = 0;
|
panel82.VerticalScroll.Value = 0;
|
||||||
|
paneltop.Visible = false;
|
||||||
//清空记录点并重新加载
|
//清空记录点并重新加载
|
||||||
ClearTimeText();
|
ClearTimeText();
|
||||||
//关闭采集的服务
|
//关闭采集的服务
|
||||||
@ -2429,7 +2483,7 @@ namespace AIMS.OperationAanesthesia
|
|||||||
{
|
{
|
||||||
if (_record != null)
|
if (_record != null)
|
||||||
{
|
{
|
||||||
EMRExtension.OpenFeesRecord(_record , "麻醉");
|
EMRExtension.OpenFeesRecord(_record, "麻醉");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void frmAnasRecordBill2_VisibleChanged(object sender, EventArgs e)
|
private void frmAnasRecordBill2_VisibleChanged(object sender, EventArgs e)
|
||||||
@ -2438,6 +2492,7 @@ namespace AIMS.OperationAanesthesia
|
|||||||
{
|
{
|
||||||
panel8.VerticalScroll.Value = 0;
|
panel8.VerticalScroll.Value = 0;
|
||||||
panel82.VerticalScroll.Value = 0;
|
panel82.VerticalScroll.Value = 0;
|
||||||
|
paneltop.Visible = false;
|
||||||
if (templateManage != null)
|
if (templateManage != null)
|
||||||
templateManage.SetPYL();
|
templateManage.SetPYL();
|
||||||
if (templateManage2 != null)
|
if (templateManage2 != null)
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
using AIMSBLL;
|
using AIMSBLL;
|
||||||
|
using AIMSExtension;
|
||||||
using AIMSModel;
|
using AIMSModel;
|
||||||
|
using HelperDB;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@ -12,6 +14,10 @@ namespace AIMS.OperationAanesthesia
|
|||||||
{
|
{
|
||||||
public partial class frmOperatingRoomRegister : Form
|
public partial class frmOperatingRoomRegister : Form
|
||||||
{
|
{
|
||||||
|
public OperatingRoomPutDoorRegister opr;
|
||||||
|
private string patientModel;
|
||||||
|
private OrisPatient p;
|
||||||
|
List<Department> execdepartments;
|
||||||
public frmOperatingRoomRegister()
|
public frmOperatingRoomRegister()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -22,6 +28,7 @@ namespace AIMS.OperationAanesthesia
|
|||||||
lblTitle.Left = (this.Width - lblTitle.Width) / 2;
|
lblTitle.Left = (this.Width - lblTitle.Width) / 2;
|
||||||
txtQuery.Text = "门诊/住院号/姓名";
|
txtQuery.Text = "门诊/住院号/姓名";
|
||||||
txtQuery.ForeColor = Color.Silver;
|
txtQuery.ForeColor = Color.Silver;
|
||||||
|
GetPatientModel();
|
||||||
|
|
||||||
dgvYP.AutoGenerateColumns = false;
|
dgvYP.AutoGenerateColumns = false;
|
||||||
dgvInfo.AutoGenerateColumns = false;
|
dgvInfo.AutoGenerateColumns = false;
|
||||||
@ -30,6 +37,15 @@ namespace AIMS.OperationAanesthesia
|
|||||||
}
|
}
|
||||||
private void Initial()
|
private void Initial()
|
||||||
{
|
{
|
||||||
|
//PublicMethod.BindBasicDictionaryToComboBox(cboOperationLevel, "手术分级");
|
||||||
|
//PublicMethod.BindBasicDictionaryToComboBox(cboASALevel, "ASA分级");
|
||||||
|
//PublicMethod.BindBasicDictionaryToComboBox(cboOperationPosition, "手术体位");
|
||||||
|
execdepartments = BDepartment.Select(" isvalid=1 ", null, RecursiveType.None, 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
private void FullDgvInfo(List<OperatingRoomPutDoorRegister> list)
|
||||||
|
{
|
||||||
|
dgvInfo.DataSource = list;
|
||||||
}
|
}
|
||||||
private void tsbExit_Click(object sender, EventArgs e)
|
private void tsbExit_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@ -38,8 +54,77 @@ namespace AIMS.OperationAanesthesia
|
|||||||
|
|
||||||
private void btnImport_Click(object sender, EventArgs e)
|
private void btnImport_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
if (chkZhuYuan.Checked == false && chkMenZhen.Checked == false)
|
||||||
|
{
|
||||||
|
MessageBox.Show("请选择门诊或住院患者!", "系统提示");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (txtInHospitalNo.Text.Trim() == "")
|
||||||
|
{
|
||||||
|
MessageBox.Show("请输入正确的住院号或者病历号!", "系统提示");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
if (PublicMethod.HospitalName.Contains("屯留"))
|
||||||
|
{
|
||||||
|
string sqlStr = string.Format("select * from AIMS_PATIENT where IPD_NO like '%{0}%'", txtInHospitalNo.Text);
|
||||||
|
DataTable dt = null;
|
||||||
|
dt = HisDBHelper.GetDataTable(sqlStr);
|
||||||
|
if (dt != null && dt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
DataRow row = dt.Rows[0];
|
||||||
|
//填充窗体
|
||||||
|
txtName.Text = row["PATIENT_NAME"].ToString();
|
||||||
|
if (row["PATIENT_SEX"].ToString() == "男")
|
||||||
|
{
|
||||||
|
RbMan.Checked = true;
|
||||||
|
RbWuMan.Checked = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RbMan.Checked = false;
|
||||||
|
RbWuMan.Checked = true;
|
||||||
|
}
|
||||||
|
lblBed.Text = row["PATIENT_BED"].ToString();
|
||||||
|
txtContacts.Text = row["PATIENT_CONTACTOR"].ToString();
|
||||||
|
txtContactsTel.Text = row["PATIENT_CONTACTOR_PHONE"].ToString();
|
||||||
|
txtAddress.Text = row["PATIENT_ADDRESS"].ToString();
|
||||||
|
txtIdEntityNo.Text = row["IDNO"].ToString();
|
||||||
|
//if (p.BirthDay != null) txtAge.Text = PublicMethod.GetAge(p.BirthDay.Value);
|
||||||
|
//hisPatientId = p.HISPatientId;
|
||||||
|
//hisVisitId = p.VisitId.ToString();
|
||||||
|
if (p.Height != null) txtHeight.Text = row["PATIENT_HEIGHT"].ToString();
|
||||||
|
if (p.Weight != null) txtWeight.Text = row["PATIENT_WEIGHT"].ToString();
|
||||||
|
//if (p.InHospitalTime != null) dtpInHospitalTime.Value = p.InHospitalTime.Value;
|
||||||
|
//if (p.BirthDay != null) dtpBirthDay.Value = p.BirthDay.Value;
|
||||||
|
|
||||||
|
cboPDepartment.Text = row["PATIENT_SECTION_NAME"].ToString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("未找到该患者信息!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
PublicMethod.WriteLog(ex);
|
||||||
|
MessageBox.Show("未找到患者信息 ,请检查门诊号或ID号!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void GetPatientModel()
|
||||||
|
{
|
||||||
|
foreach (Control ctl in panel6.Controls)
|
||||||
|
{
|
||||||
|
if (ctl is CheckBox && (ctl as CheckBox).Checked == true)
|
||||||
|
{
|
||||||
|
patientModel = (ctl as CheckBox).Text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
private void SetCheckBoxValue(Panel pnl, CheckBox chk)
|
private void SetCheckBoxValue(Panel pnl, CheckBox chk)
|
||||||
{
|
{
|
||||||
foreach (Control ctl in pnl.Controls)
|
foreach (Control ctl in pnl.Controls)
|
||||||
@ -103,10 +188,6 @@ namespace AIMS.OperationAanesthesia
|
|||||||
this.cboPDepartment.DroppedDown = true;
|
this.cboPDepartment.DroppedDown = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDoctor(TextBox controlTextBox, int workersType, bool isRadio = false)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
private void txtInstrumentNurse_Click(object sender, EventArgs e)
|
private void txtInstrumentNurse_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
setDoctor(sender as TextBox, 1);
|
setDoctor(sender as TextBox, 1);
|
||||||
@ -347,9 +428,58 @@ namespace AIMS.OperationAanesthesia
|
|||||||
|
|
||||||
private void tsbSaveOperationApply_Click(object sender, EventArgs e)
|
private void tsbSaveOperationApply_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
if (ValidInput())
|
||||||
|
{
|
||||||
|
if (opr == null)
|
||||||
|
{
|
||||||
|
opr = new OperatingRoomPutDoorRegister();
|
||||||
|
SetOPRValue(opr);
|
||||||
|
opr.Id = BOperatingRoomPutDoorRegister.Insert(opr);
|
||||||
|
if (opr.Id > 0)
|
||||||
|
{
|
||||||
|
InsertOPRDrugsRecords(opr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetOPRValue(opr);
|
||||||
|
int num = BOperatingRoomPutDoorRegister.Update(opr);
|
||||||
|
if (num > 0)
|
||||||
|
{
|
||||||
|
int dnum = DelOPRDrugsRecords(opr);
|
||||||
|
InsertOPRDrugsRecords(opr);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private int DelOPRDrugsRecords(OperatingRoomPutDoorRegister opr)
|
||||||
|
{
|
||||||
|
string sql = string.Format("delete OperatingRoomPutDoorRegisterDrugsRecords where PutDoorRegisterId=" + opr.Id.Value);
|
||||||
|
return DBHelper.ExecNonQuery(sql);
|
||||||
|
}
|
||||||
|
private void InsertOPRDrugsRecords(OperatingRoomPutDoorRegister opr)
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
foreach (DataGridViewRow r in dgvDrugs.Rows)
|
||||||
|
{
|
||||||
|
if (r.Cells["DrugName"].EditedFormattedValue.ToString() != "")
|
||||||
|
{
|
||||||
|
string sql = string.Format("insert into OperatingRoomPutDoorRegisterDrugsRecords values({0},'{1}','{2}','{3}',{4},{5},{6},'{7}')", opr.Id.Value, opr.HISPatientId, r.Cells["DrugId"].Value.ToString(), r.Cells["DrugName"].Value.ToString(), decimal.Parse(r.Cells["Dosage"].Value.ToString()), 1, 0, DateTime.Now);
|
||||||
|
sb.AppendLine(sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (sb.ToString().Length > 0)
|
||||||
|
{
|
||||||
|
int num = DBHelper.ExecNonQuery(sb.ToString());
|
||||||
|
}
|
||||||
|
MessageBox.Show("保存成功!");
|
||||||
|
SetControlNull();
|
||||||
|
btnQuery.PerformClick();
|
||||||
}
|
}
|
||||||
private void SetControlNull()
|
private void SetControlNull()
|
||||||
{
|
{
|
||||||
|
opr = null;
|
||||||
chkMenZhen.Checked = true;
|
chkMenZhen.Checked = true;
|
||||||
txtInHospitalNo.Text = "";
|
txtInHospitalNo.Text = "";
|
||||||
chkIsPlanAgainOperation.Checked = false;
|
chkIsPlanAgainOperation.Checked = false;
|
||||||
@ -358,7 +488,6 @@ namespace AIMS.OperationAanesthesia
|
|||||||
chkMZ.Checked = false;
|
chkMZ.Checked = false;
|
||||||
chkZQ.Checked = false;
|
chkZQ.Checked = false;
|
||||||
chkRJ.Checked = false;
|
chkRJ.Checked = false;
|
||||||
cboExecDepart.Text = "";
|
|
||||||
txtName.Text = "";
|
txtName.Text = "";
|
||||||
RbMan.Checked = true;
|
RbMan.Checked = true;
|
||||||
txtAge.Text = "";
|
txtAge.Text = "";
|
||||||
@ -410,6 +539,65 @@ namespace AIMS.OperationAanesthesia
|
|||||||
}
|
}
|
||||||
txtothere.Text = "";
|
txtothere.Text = "";
|
||||||
}
|
}
|
||||||
|
private void SetOPRValue(OperatingRoomPutDoorRegister opr)
|
||||||
|
{
|
||||||
|
opr.Address = txtAddress.Text;
|
||||||
|
opr.Age = txtAge.Text;
|
||||||
|
opr.Anaesthesia = txtAnaesthesia.Text;
|
||||||
|
opr.AnaesthesiaBeginTime = txtAnaesthesiaBeginTime.Text != "" ? DateTime.Parse(txtAnaesthesiaBeginTime.Text) : (DateTime?)null;
|
||||||
|
opr.AnaesthesiaDoctorName = txtAnaesthesiaDoctor.Text != "" ? txtAnaesthesiaDoctor.Text : "";
|
||||||
|
opr.AnaesthesiaDoctorNo = txtAnaesthesiaDoctor.Tag != null ? txtAnaesthesiaDoctor.Tag.ToString() : "";
|
||||||
|
opr.AnaesthesiaDrugs = GetDugsIds();
|
||||||
|
opr.AnaesthesiaEndTime = txtAnaesthesiaEndTime.Text != "" ? DateTime.Parse(txtAnaesthesiaEndTime.Text) : (DateTime?)null;
|
||||||
|
opr.AnaesthesiaMethod = GetCheckBoxCheckedValues(panel5);
|
||||||
|
opr.ASALevel = cboASALevel.Text;
|
||||||
|
opr.BirthDay = p != null ? p.BirthDay : (DateTime?)null;
|
||||||
|
opr.Complication = txtComplication.Text;
|
||||||
|
opr.Contacts = txtContacts.Text;
|
||||||
|
opr.ContactsTel = txtContactsTel.Text;
|
||||||
|
opr.Diagnose = txtDiagnose.Text;
|
||||||
|
opr.DiagnoseRemark = txtDiagnoseRemark.Text;
|
||||||
|
opr.ExecDeptName = "手术室";
|
||||||
|
opr.ExecDeptNo = "手术室";
|
||||||
|
opr.Height = txtHeight.Text != "" ? decimal.Parse(txtHeight.Text) : (decimal?)null;
|
||||||
|
opr.HISPatientId = p != null ? p.HisPatientId : "";
|
||||||
|
opr.IdEntityNo = txtIdEntityNo.Text;
|
||||||
|
opr.InHospitalNo = txtInHospitalNo.Text;
|
||||||
|
opr.InstrumentNurseName = txtInstrumentNurse.Text;
|
||||||
|
opr.InstrumentNurseNo = txtInstrumentNurse.Text != "" ? txtInstrumentNurse.Tag.ToString() : "";
|
||||||
|
opr.IsPainClinic = chkIsPainClinic.Checked == true ? 1 : 0;
|
||||||
|
opr.IsPlanAgainOperation = chkIsPlanAgainOperation.Checked == true ? 1 : chkIsPlanAgainOperation.Checked == true ? 2 : 0;
|
||||||
|
opr.IsValid = 1;
|
||||||
|
opr.Name = txtName.Text;
|
||||||
|
opr.HCode = PublicMethod.GetFirstLetter(opr.Name);
|
||||||
|
opr.OpeatorNo = PublicMethod.OperatorName;
|
||||||
|
opr.Operation = txtOperation.Text;
|
||||||
|
opr.OperationBeginTime = txtOperationBeginTime.Text != "" ? DateTime.Parse(txtOperationBeginTime.Text) : (DateTime?)null;
|
||||||
|
opr.OperationDate = opr.OperationBeginTime;
|
||||||
|
opr.OperationDoctorName = txtOperationDoctor.Text;
|
||||||
|
opr.OperationDoctorNo = txtOperationDoctor.Text != "" ? txtOperationDoctor.Tag.ToString() : "";
|
||||||
|
opr.OperationEndTime = txtOperationEndTime.Text != "" ? DateTime.Parse(txtOperationEndTime.Text) : (DateTime?)null;
|
||||||
|
opr.OperationLevel = cboOperationLevel.Text;
|
||||||
|
opr.OperationPosition = cboOperationPosition.Text;
|
||||||
|
opr.OPerationRemark = txtOperationRemark.Text;
|
||||||
|
opr.OperationSituation = txtOperationSituation.Text;
|
||||||
|
opr.OperationType = GetCheckBoxCheckedValue(panel4);
|
||||||
|
opr.OperatorTime = DateTime.Now;
|
||||||
|
opr.PainTreatment = txtPainTreatment.Text;
|
||||||
|
opr.PainTreatmentRemark = txtPainTreatmentRemark.Text;
|
||||||
|
opr.PatientBedNo = lblBed.Text;
|
||||||
|
opr.PatientDeptName = cboPDepartment.Text;
|
||||||
|
//opr.PatientDeptNo = cboPDepartment.Text != "" ? cboPDepartment.SelectedValue.ToString() : "";
|
||||||
|
opr.PatientId = p != null ? p.Id.ToString() : "";
|
||||||
|
opr.PatientModel = GetCheckBoxCheckedValue(panel6);
|
||||||
|
opr.Sex = RbMan.Checked == true ? "男" : "女";
|
||||||
|
opr.State = 0;
|
||||||
|
opr.Tel = txtContactsTel.Text;
|
||||||
|
opr.TourNurseName = txtTourNurse.Text;
|
||||||
|
opr.TourNurseNo = txtTourNurse.Text != "" ? txtTourNurse.Tag.ToString() : "";
|
||||||
|
opr.VisitId = p != null ? p.VisitTimes.ToString() : "";
|
||||||
|
opr.Weight = txtWeight.Text != "" ? decimal.Parse(txtWeight.Text) : (decimal?)null;
|
||||||
|
}
|
||||||
private string GetDugsIds()
|
private string GetDugsIds()
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
@ -464,7 +652,7 @@ namespace AIMS.OperationAanesthesia
|
|||||||
{
|
{
|
||||||
MessageBox.Show("请输入患者年龄!", "系统提示");
|
MessageBox.Show("请输入患者年龄!", "系统提示");
|
||||||
}
|
}
|
||||||
else if (GetCheckBoxCheckedValue(panel5) == "")
|
else if (GetCheckBoxCheckedValue(panel5) == "" && txtothere.Text.Trim() == "")
|
||||||
{
|
{
|
||||||
MessageBox.Show("请选择其他类型麻醉!", "系统提示");
|
MessageBox.Show("请选择其他类型麻醉!", "系统提示");
|
||||||
}
|
}
|
||||||
@ -472,6 +660,14 @@ namespace AIMS.OperationAanesthesia
|
|||||||
{
|
{
|
||||||
MessageBox.Show("请输入患者诊断!", "系统提示");
|
MessageBox.Show("请输入患者诊断!", "系统提示");
|
||||||
}
|
}
|
||||||
|
else if (txtOperationBeginTime.Text == "")
|
||||||
|
{
|
||||||
|
MessageBox.Show("请输入手术开始时间!", "系统提示");
|
||||||
|
}
|
||||||
|
else if (txtOperationEndTime.Text == "")
|
||||||
|
{
|
||||||
|
MessageBox.Show("请输入手术结束时间!", "系统提示");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
flag = true;
|
flag = true;
|
||||||
@ -524,10 +720,98 @@ namespace AIMS.OperationAanesthesia
|
|||||||
}
|
}
|
||||||
private void btnQuery_Click(object sender, EventArgs e)
|
private void btnQuery_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
string begin = dtpDate.Value.ToShortDateString() + " 00:00:00";
|
||||||
|
string end = dtpDate.Value.ToShortDateString() + " 23:59:59";
|
||||||
|
string str = txtQuery.Text.Trim();
|
||||||
|
if (str == "门诊/住院号/姓名") str = "";
|
||||||
|
string where = "";
|
||||||
|
if (str != "") where = " and (HCode like '%" + str + "%' or InHospitalNo like '%" + str + "%' or Name like '%" + str + "%')";
|
||||||
|
List<OperatingRoomPutDoorRegister> list = BOperatingRoomPutDoorRegister.Select("OperationBeginTime>='" + begin + "' and OperationBeginTime<='" + end + "' " + where, new ParameterList());
|
||||||
|
FullDgvInfo(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dgvInfo_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
private void dgvInfo_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (e.RowIndex >= 0)
|
||||||
|
{
|
||||||
|
SetControlNull();
|
||||||
|
int id = int.Parse(dgvInfo.CurrentRow.Cells["pId"].Value.ToString());
|
||||||
|
opr = BOperatingRoomPutDoorRegister.SelectSingle(id);
|
||||||
|
InitialOperatingRoomPutDoorRegister(opr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void InitialOperatingRoomPutDoorRegister(OperatingRoomPutDoorRegister opr)
|
||||||
|
{
|
||||||
|
SetCheckBoxValue(opr.PatientModel, panel6);
|
||||||
|
txtInHospitalNo.Text = opr.InHospitalNo;
|
||||||
|
if (opr.IsPlanAgainOperation == 1)
|
||||||
|
{
|
||||||
|
chkIsPlanAgainOperation.Checked = true;
|
||||||
|
}
|
||||||
|
else if (opr.IsPlanAgainOperation == 2)
|
||||||
|
{
|
||||||
|
chkIsNotPlanAgainOperation.Checked = true;
|
||||||
|
}
|
||||||
|
cboPDepartment.Text = opr.PatientDeptName;
|
||||||
|
lblBed.Text = opr.PatientBedNo;
|
||||||
|
SetCheckBoxValue(opr.OperationType, panel4);
|
||||||
|
txtName.Text = opr.Name;
|
||||||
|
if (opr.Sex == "男")
|
||||||
|
{
|
||||||
|
RbMan.Checked = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RbWuMan.Checked = true;
|
||||||
|
}
|
||||||
|
txtAge.Text = opr.Age;
|
||||||
|
txtHeight.Text = opr.Height.ToString();
|
||||||
|
txtHeight.Text = opr.Weight.ToString();
|
||||||
|
txtIdEntityNo.Text = opr.IdEntityNo;
|
||||||
|
txtContacts.Text = opr.Contacts;
|
||||||
|
txtContactsTel.Text = opr.ContactsTel;
|
||||||
|
txtAddress.Text = opr.Address;
|
||||||
|
SetCheckBoxValues(opr.AnaesthesiaMethod, panel5);
|
||||||
|
chkIsPainClinic.Checked = opr.IsPainClinic == 0 ? false : true;
|
||||||
|
txtPainTreatment.Text = opr.PainTreatment;
|
||||||
|
txtPainTreatmentRemark.Text = opr.PainTreatmentRemark;
|
||||||
|
txtDiagnose.Text = opr.Diagnose;
|
||||||
|
txtDiagnoseRemark.Text = opr.DiagnoseRemark;
|
||||||
|
txtOperation.Text = opr.Operation;
|
||||||
|
txtOperationRemark.Text = opr.OPerationRemark;
|
||||||
|
txtAnaesthesia.Text = opr.Anaesthesia;
|
||||||
|
cboASALevel.Text = opr.ASALevel;
|
||||||
|
cboOperationLevel.Text = opr.OperationLevel;
|
||||||
|
cboOperationPosition.Text = opr.OperationPosition;
|
||||||
|
txtComplication.Text = opr.Complication;
|
||||||
|
txtOperationSituation.Text = opr.OperationSituation;
|
||||||
|
if (opr.AnaesthesiaBeginTime != null) txtAnaesthesiaBeginTime.Text = opr.AnaesthesiaBeginTime.Value.ToString("yyyy-MM-dd HH:mm");
|
||||||
|
if (opr.AnaesthesiaEndTime != null) txtAnaesthesiaEndTime.Text = opr.AnaesthesiaEndTime.Value.ToString("yyyy-MM-dd HH:mm");
|
||||||
|
if (opr.OperationBeginTime != null) txtOperationBeginTime.Text = opr.OperationBeginTime.Value.ToString("yyyy-MM-dd HH:mm");
|
||||||
|
if (opr.OperationEndTime != null) txtOperationEndTime.Text = opr.OperationEndTime.Value.ToString("yyyy-MM-dd HH:mm");
|
||||||
|
txtOperationDoctor.Text = opr.OperationDoctorName;
|
||||||
|
txtOperationDoctor.Tag = opr.OperationDoctorNo;
|
||||||
|
txtAnaesthesiaDoctor.Text = opr.AnaesthesiaDoctorName;
|
||||||
|
txtAnaesthesiaDoctor.Tag = opr.AnaesthesiaDoctorNo;
|
||||||
|
txtInstrumentNurse.Text = opr.InstrumentNurseName;
|
||||||
|
txtInstrumentNurse.Tag = opr.InstrumentNurseNo;
|
||||||
|
txtTourNurse.Text = opr.TourNurseName;
|
||||||
|
txtTourNurse.Tag = opr.TourNurseNo;
|
||||||
|
|
||||||
|
FullDgvDrugs(opr.Id.Value);
|
||||||
|
|
||||||
|
}
|
||||||
|
private void FullDgvDrugs(int id)
|
||||||
|
{
|
||||||
|
List<OperatingRoomPutDoorRegisterDrugsRecords> list = BOperatingRoomPutDoorRegisterDrugsRecords.Select("PutDoorRegisterId=" + id, new ParameterList());
|
||||||
|
dgvDrugs.Rows.Clear();
|
||||||
|
foreach (OperatingRoomPutDoorRegisterDrugsRecords oprr in list)
|
||||||
|
{
|
||||||
|
int index = dgvDrugs.Rows.Add();
|
||||||
|
dgvDrugs.Rows[index].Cells["DrugId"].Value = oprr.DrugsNo;
|
||||||
|
dgvDrugs.Rows[index].Cells["DrugName"].Value = oprr.DrugsName;
|
||||||
|
dgvDrugs.Rows[index].Cells["Dosage"].Value = oprr.Dosage.Value.ToString("0.###");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void SetCheckBoxValue(string str, Panel p)
|
private void SetCheckBoxValue(string str, Panel p)
|
||||||
{
|
{
|
||||||
@ -615,6 +899,52 @@ namespace AIMS.OperationAanesthesia
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void tsbConfigDataGridview_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//frmOperatingRoomQuery frm = new frmOperatingRoomQuery();
|
||||||
|
//frm.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void txtDiagnose_DoubleClick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//frmSelectDisease fmdis = new frmSelectDisease();
|
||||||
|
//fmdis._controlName = sender as TextBox;
|
||||||
|
//fmdis._RemarkName = txtDiagnoseRemark;
|
||||||
|
//fmdis.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void txtOperation_DoubleClick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//frmSelectOperations frmso = new frmSelectOperations();
|
||||||
|
//frmso._controlName = sender as TextBox;
|
||||||
|
//frmso._RemarkName = txtOperationRemark;
|
||||||
|
//frmso.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void txtAnaesthesia_DoubleClick(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//frmSelectAnaesthesiaMethod fmatm = new frmSelectAnaesthesiaMethod();
|
||||||
|
//fmatm._controlName = sender as TextBox;
|
||||||
|
//fmatm._formName = this.Name;
|
||||||
|
//fmatm.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoctor(TextBox controlTextBox, int workersType, bool isRadio = false)
|
||||||
|
{
|
||||||
|
//frmSelectWorkers_New frmwok = new frmSelectWorkers_New();
|
||||||
|
//frmwok._controlName = controlTextBox;
|
||||||
|
//if (cboPDepartment.Text == "全部科室" || cboPDepartment.Text == "")
|
||||||
|
//{
|
||||||
|
// frmwok._deptId = 0;
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// frmwok._deptId = (BLL.BDepartments.SelectSingle("Name=@name", new ParameterList("@name", cboPDepartment.Text), RecursiveType.None, 0).Id.Value);
|
||||||
|
//}
|
||||||
|
//frmwok._workersType = workersType;
|
||||||
|
//frmwok.isRadio = isRadio;
|
||||||
|
//frmwok.ShowDialog();
|
||||||
|
}
|
||||||
private void txtOperationDoctor_DoubleClick(object sender, EventArgs e)
|
private void txtOperationDoctor_DoubleClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
setDoctor(sender as TextBox, 0, true);
|
setDoctor(sender as TextBox, 0, true);
|
||||||
@ -663,6 +993,17 @@ namespace AIMS.OperationAanesthesia
|
|||||||
|
|
||||||
private void tsmDel_Click(object sender, EventArgs e)
|
private void tsmDel_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
int id = int.Parse(dgvInfo.CurrentRow.Cells["pId"].Value.ToString());
|
||||||
|
DialogResult dialogResult = MessageBox.Show("确定删除当前患者记录?", "系统提示", MessageBoxButtons.YesNo);
|
||||||
|
if (dialogResult == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
int num = BOperatingRoomPutDoorRegister.Delete("Id=" + id, new ParameterList());
|
||||||
|
if (num > 0)
|
||||||
|
{
|
||||||
|
btnQuery.PerformClick();
|
||||||
|
MessageBox.Show("删除成功!");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dgvInfo_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
private void dgvInfo_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
||||||
@ -674,7 +1015,6 @@ namespace AIMS.OperationAanesthesia
|
|||||||
private void txtOperationBeginTime_DoubleClick(object sender, EventArgs e)
|
private void txtOperationBeginTime_DoubleClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
(sender as TextBox).Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm");
|
(sender as TextBox).Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -140,7 +140,6 @@
|
|||||||
this.label13 = new System.Windows.Forms.Label();
|
this.label13 = new System.Windows.Forms.Label();
|
||||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||||
this.label44 = new System.Windows.Forms.Label();
|
this.label44 = new System.Windows.Forms.Label();
|
||||||
this.cboExecDepart = new System.Windows.Forms.ComboBox();
|
|
||||||
this.panel7 = new System.Windows.Forms.Panel();
|
this.panel7 = new System.Windows.Forms.Panel();
|
||||||
this.label43 = new System.Windows.Forms.Label();
|
this.label43 = new System.Windows.Forms.Label();
|
||||||
this.RbMan = new System.Windows.Forms.RadioButton();
|
this.RbMan = new System.Windows.Forms.RadioButton();
|
||||||
@ -164,7 +163,6 @@
|
|||||||
this.label10 = new System.Windows.Forms.Label();
|
this.label10 = new System.Windows.Forms.Label();
|
||||||
this.label9 = new System.Windows.Forms.Label();
|
this.label9 = new System.Windows.Forms.Label();
|
||||||
this.label8 = new System.Windows.Forms.Label();
|
this.label8 = new System.Windows.Forms.Label();
|
||||||
this.label7 = new System.Windows.Forms.Label();
|
|
||||||
this.panel3 = new System.Windows.Forms.Panel();
|
this.panel3 = new System.Windows.Forms.Panel();
|
||||||
this.cboPDepartment = new System.Windows.Forms.ComboBox();
|
this.cboPDepartment = new System.Windows.Forms.ComboBox();
|
||||||
this.lblBed = new System.Windows.Forms.Label();
|
this.lblBed = new System.Windows.Forms.Label();
|
||||||
@ -1001,7 +999,6 @@
|
|||||||
this.txtPainTreatmentRemark.Name = "txtPainTreatmentRemark";
|
this.txtPainTreatmentRemark.Name = "txtPainTreatmentRemark";
|
||||||
this.txtPainTreatmentRemark.Size = new System.Drawing.Size(346, 26);
|
this.txtPainTreatmentRemark.Size = new System.Drawing.Size(346, 26);
|
||||||
this.txtPainTreatmentRemark.TabIndex = 32;
|
this.txtPainTreatmentRemark.TabIndex = 32;
|
||||||
this.txtPainTreatmentRemark.Visible = false;
|
|
||||||
//
|
//
|
||||||
// txtAnaesthesia
|
// txtAnaesthesia
|
||||||
//
|
//
|
||||||
@ -1063,7 +1060,6 @@
|
|||||||
this.txtPainTreatment.Name = "txtPainTreatment";
|
this.txtPainTreatment.Name = "txtPainTreatment";
|
||||||
this.txtPainTreatment.Size = new System.Drawing.Size(448, 26);
|
this.txtPainTreatment.Size = new System.Drawing.Size(448, 26);
|
||||||
this.txtPainTreatment.TabIndex = 27;
|
this.txtPainTreatment.TabIndex = 27;
|
||||||
this.txtPainTreatment.Visible = false;
|
|
||||||
//
|
//
|
||||||
// label15
|
// label15
|
||||||
//
|
//
|
||||||
@ -1073,7 +1069,6 @@
|
|||||||
this.label15.Size = new System.Drawing.Size(37, 20);
|
this.label15.Size = new System.Drawing.Size(37, 20);
|
||||||
this.label15.TabIndex = 23;
|
this.label15.TabIndex = 23;
|
||||||
this.label15.Text = "说明";
|
this.label15.Text = "说明";
|
||||||
this.label15.Visible = false;
|
|
||||||
//
|
//
|
||||||
// label23
|
// label23
|
||||||
//
|
//
|
||||||
@ -1171,7 +1166,6 @@
|
|||||||
this.label14.Size = new System.Drawing.Size(65, 20);
|
this.label14.Size = new System.Drawing.Size(65, 20);
|
||||||
this.label14.TabIndex = 25;
|
this.label14.TabIndex = 25;
|
||||||
this.label14.Text = "疼痛治疗";
|
this.label14.Text = "疼痛治疗";
|
||||||
this.label14.Visible = false;
|
|
||||||
//
|
//
|
||||||
// panel5
|
// panel5
|
||||||
//
|
//
|
||||||
@ -1382,7 +1376,6 @@
|
|||||||
// groupBox2
|
// groupBox2
|
||||||
//
|
//
|
||||||
this.groupBox2.Controls.Add(this.label44);
|
this.groupBox2.Controls.Add(this.label44);
|
||||||
this.groupBox2.Controls.Add(this.cboExecDepart);
|
|
||||||
this.groupBox2.Controls.Add(this.panel7);
|
this.groupBox2.Controls.Add(this.panel7);
|
||||||
this.groupBox2.Controls.Add(this.txtAddress);
|
this.groupBox2.Controls.Add(this.txtAddress);
|
||||||
this.groupBox2.Controls.Add(this.label35);
|
this.groupBox2.Controls.Add(this.label35);
|
||||||
@ -1403,7 +1396,6 @@
|
|||||||
this.groupBox2.Controls.Add(this.label10);
|
this.groupBox2.Controls.Add(this.label10);
|
||||||
this.groupBox2.Controls.Add(this.label9);
|
this.groupBox2.Controls.Add(this.label9);
|
||||||
this.groupBox2.Controls.Add(this.label8);
|
this.groupBox2.Controls.Add(this.label8);
|
||||||
this.groupBox2.Controls.Add(this.label7);
|
|
||||||
this.groupBox2.Controls.Add(this.panel3);
|
this.groupBox2.Controls.Add(this.panel3);
|
||||||
this.groupBox2.Controls.Add(this.panel4);
|
this.groupBox2.Controls.Add(this.panel4);
|
||||||
this.groupBox2.Location = new System.Drawing.Point(9, 38);
|
this.groupBox2.Location = new System.Drawing.Point(9, 38);
|
||||||
@ -1422,16 +1414,6 @@
|
|||||||
this.label44.TabIndex = 638;
|
this.label44.TabIndex = 638;
|
||||||
this.label44.Text = "手术类型";
|
this.label44.Text = "手术类型";
|
||||||
//
|
//
|
||||||
// cboExecDepart
|
|
||||||
//
|
|
||||||
this.cboExecDepart.Font = new System.Drawing.Font("微软雅黑", 10.5F);
|
|
||||||
this.cboExecDepart.FormattingEnabled = true;
|
|
||||||
this.cboExecDepart.Location = new System.Drawing.Point(830, 17);
|
|
||||||
this.cboExecDepart.Name = "cboExecDepart";
|
|
||||||
this.cboExecDepart.Size = new System.Drawing.Size(208, 28);
|
|
||||||
this.cboExecDepart.TabIndex = 637;
|
|
||||||
this.cboExecDepart.Visible = false;
|
|
||||||
//
|
|
||||||
// panel7
|
// panel7
|
||||||
//
|
//
|
||||||
this.panel7.Controls.Add(this.label43);
|
this.panel7.Controls.Add(this.label43);
|
||||||
@ -1640,17 +1622,6 @@
|
|||||||
this.label8.TabIndex = 16;
|
this.label8.TabIndex = 16;
|
||||||
this.label8.Text = "姓名";
|
this.label8.Text = "姓名";
|
||||||
//
|
//
|
||||||
// label7
|
|
||||||
//
|
|
||||||
this.label7.AutoSize = true;
|
|
||||||
this.label7.ForeColor = System.Drawing.Color.Red;
|
|
||||||
this.label7.Location = new System.Drawing.Point(759, 21);
|
|
||||||
this.label7.Name = "label7";
|
|
||||||
this.label7.Size = new System.Drawing.Size(65, 20);
|
|
||||||
this.label7.TabIndex = 17;
|
|
||||||
this.label7.Text = "执行科室";
|
|
||||||
this.label7.Visible = false;
|
|
||||||
//
|
|
||||||
// panel3
|
// panel3
|
||||||
//
|
//
|
||||||
this.panel3.Controls.Add(this.cboPDepartment);
|
this.panel3.Controls.Add(this.cboPDepartment);
|
||||||
@ -2277,7 +2248,6 @@
|
|||||||
private System.Windows.Forms.Label label10;
|
private System.Windows.Forms.Label label10;
|
||||||
private System.Windows.Forms.Label label9;
|
private System.Windows.Forms.Label label9;
|
||||||
private System.Windows.Forms.Label label8;
|
private System.Windows.Forms.Label label8;
|
||||||
private System.Windows.Forms.Label label7;
|
|
||||||
private System.Windows.Forms.Panel panel3;
|
private System.Windows.Forms.Panel panel3;
|
||||||
private System.Windows.Forms.Label lblBed;
|
private System.Windows.Forms.Label lblBed;
|
||||||
private System.Windows.Forms.Label label5;
|
private System.Windows.Forms.Label label5;
|
||||||
@ -2298,7 +2268,6 @@
|
|||||||
public System.Windows.Forms.RadioButton RbMan;
|
public System.Windows.Forms.RadioButton RbMan;
|
||||||
public System.Windows.Forms.RadioButton RbWuMan;
|
public System.Windows.Forms.RadioButton RbWuMan;
|
||||||
public System.Windows.Forms.ComboBox cboPDepartment;
|
public System.Windows.Forms.ComboBox cboPDepartment;
|
||||||
public System.Windows.Forms.ComboBox cboExecDepart;
|
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
|
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
|
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
|
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
|
||||||
|
|||||||
@ -909,7 +909,6 @@
|
|||||||
this.txtContactsPhone.Name = "txtContactsPhone";
|
this.txtContactsPhone.Name = "txtContactsPhone";
|
||||||
this.txtContactsPhone.Size = new System.Drawing.Size(134, 23);
|
this.txtContactsPhone.Size = new System.Drawing.Size(134, 23);
|
||||||
this.txtContactsPhone.TabIndex = 36;
|
this.txtContactsPhone.TabIndex = 36;
|
||||||
this.txtContactsPhone.TextChanged += new System.EventHandler(this.txtContactsPhone_TextChanged);
|
|
||||||
//
|
//
|
||||||
// label16
|
// label16
|
||||||
//
|
//
|
||||||
@ -970,7 +969,6 @@
|
|||||||
this.label15.Size = new System.Drawing.Size(63, 14);
|
this.label15.Size = new System.Drawing.Size(63, 14);
|
||||||
this.label15.TabIndex = 29;
|
this.label15.TabIndex = 29;
|
||||||
this.label15.Text = "入院日期";
|
this.label15.Text = "入院日期";
|
||||||
this.label15.Click += new System.EventHandler(this.label15_Click);
|
|
||||||
//
|
//
|
||||||
// cboPatientKind
|
// cboPatientKind
|
||||||
//
|
//
|
||||||
|
|||||||
@ -1217,16 +1217,6 @@ namespace AIMS.OperationFront.UI
|
|||||||
//cboApplyDepId.Text = cboDepartment.Text;
|
//cboApplyDepId.Text = cboDepartment.Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void txtContactsPhone_TextChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void label15_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void btnDR_Click(object sender, EventArgs e)
|
private void btnDR_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
52
AIMS/OremrUserControl/ExtendedPanel.cs
Normal file
52
AIMS/OremrUserControl/ExtendedPanel.cs
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace AIMS.OremrUserControl
|
||||||
|
{
|
||||||
|
public class ExtendedPanel : Panel
|
||||||
|
{
|
||||||
|
private const int WS_EX_TRANSPARENT = 0x20;
|
||||||
|
public ExtendedPanel()
|
||||||
|
{
|
||||||
|
SetStyle(ControlStyles.Opaque, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private int opacity = 90;
|
||||||
|
[DefaultValue(50)]
|
||||||
|
public int Opacity
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.opacity;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (value < 0 || value > 100)
|
||||||
|
throw new ArgumentException("value must be between 0 and 100");
|
||||||
|
this.opacity = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected override CreateParams CreateParams
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
CreateParams cp = base.CreateParams;
|
||||||
|
cp.ExStyle = cp.ExStyle | WS_EX_TRANSPARENT;
|
||||||
|
return cp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
using (var brush = new SolidBrush(Color.FromArgb(this.opacity * 255 / 100, this.BackColor)))
|
||||||
|
{
|
||||||
|
e.Graphics.FillRectangle(brush, this.ClientRectangle);
|
||||||
|
}
|
||||||
|
base.OnPaint(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -54,6 +54,8 @@
|
|||||||
<Compile Include="BLL\AutoGenerate\BFeesRecord.cs" />
|
<Compile Include="BLL\AutoGenerate\BFeesRecord.cs" />
|
||||||
<Compile Include="BLL\AutoGenerate\BFeesRecordReport.cs" />
|
<Compile Include="BLL\AutoGenerate\BFeesRecordReport.cs" />
|
||||||
<Compile Include="BLL\AutoGenerate\BNotesRecord.cs" />
|
<Compile Include="BLL\AutoGenerate\BNotesRecord.cs" />
|
||||||
|
<Compile Include="BLL\AutoGenerate\BOperatingRoomPutDoorRegister.cs" />
|
||||||
|
<Compile Include="BLL\AutoGenerate\BOperatingRoomPutDoorRegisterDrugsRecords.cs" />
|
||||||
<Compile Include="BLL\AutoGenerate\BOperationRecordAnalgesia.cs" />
|
<Compile Include="BLL\AutoGenerate\BOperationRecordAnalgesia.cs" />
|
||||||
<Compile Include="BLL\AutoGenerate\BPrintDocumentUP.cs" />
|
<Compile Include="BLL\AutoGenerate\BPrintDocumentUP.cs" />
|
||||||
<Compile Include="BLL\Extension\BFeesRecord.cs" />
|
<Compile Include="BLL\Extension\BFeesRecord.cs" />
|
||||||
@ -62,6 +64,8 @@
|
|||||||
<Compile Include="DAL\AutoGenerate\DFeesRecord.cs" />
|
<Compile Include="DAL\AutoGenerate\DFeesRecord.cs" />
|
||||||
<Compile Include="DAL\AutoGenerate\DFeesRecordReport.cs" />
|
<Compile Include="DAL\AutoGenerate\DFeesRecordReport.cs" />
|
||||||
<Compile Include="DAL\AutoGenerate\DNotesRecord.cs" />
|
<Compile Include="DAL\AutoGenerate\DNotesRecord.cs" />
|
||||||
|
<Compile Include="DAL\AutoGenerate\DOperatingRoomPutDoorRegister.cs" />
|
||||||
|
<Compile Include="DAL\AutoGenerate\DOperatingRoomPutDoorRegisterDrugsRecords.cs" />
|
||||||
<Compile Include="DAL\AutoGenerate\DOperationRecordAnalgesia.cs" />
|
<Compile Include="DAL\AutoGenerate\DOperationRecordAnalgesia.cs" />
|
||||||
<Compile Include="DAL\AutoGenerate\DPrintDocumentUP.cs" />
|
<Compile Include="DAL\AutoGenerate\DPrintDocumentUP.cs" />
|
||||||
<Compile Include="DAL\Extension\DFeesRecord.cs" />
|
<Compile Include="DAL\Extension\DFeesRecord.cs" />
|
||||||
@ -348,6 +352,8 @@
|
|||||||
<Compile Include="DAL\Extension\DUserPurview.cs" />
|
<Compile Include="DAL\Extension\DUserPurview.cs" />
|
||||||
<Compile Include="Model\AutoGenerate\FeesRecordReport.cs" />
|
<Compile Include="Model\AutoGenerate\FeesRecordReport.cs" />
|
||||||
<Compile Include="Model\AutoGenerate\NotesRecord.cs" />
|
<Compile Include="Model\AutoGenerate\NotesRecord.cs" />
|
||||||
|
<Compile Include="Model\AutoGenerate\OperatingRoomPutDoorRegister.cs" />
|
||||||
|
<Compile Include="Model\AutoGenerate\OperatingRoomPutDoorRegisterDrugsRecords.cs" />
|
||||||
<Compile Include="Model\AutoGenerate\PrintDocumentUP.cs" />
|
<Compile Include="Model\AutoGenerate\PrintDocumentUP.cs" />
|
||||||
<Compile Include="Model\Extension\FeesRecord.cs" />
|
<Compile Include="Model\Extension\FeesRecord.cs" />
|
||||||
<Compile Include="Model\AutoGenerate\AnaesthesiaEvents.cs" />
|
<Compile Include="Model\AutoGenerate\AnaesthesiaEvents.cs" />
|
||||||
@ -520,6 +526,8 @@
|
|||||||
<Compile Include="ObjectQuery\NoticeContentMap.cs" />
|
<Compile Include="ObjectQuery\NoticeContentMap.cs" />
|
||||||
<Compile Include="ObjectQuery\NoticeMap.cs" />
|
<Compile Include="ObjectQuery\NoticeMap.cs" />
|
||||||
<Compile Include="ObjectQuery\NoticeTemplateMap.cs" />
|
<Compile Include="ObjectQuery\NoticeTemplateMap.cs" />
|
||||||
|
<Compile Include="ObjectQuery\OperatingRoomPutDoorRegisterDrugsRecordsMap.cs" />
|
||||||
|
<Compile Include="ObjectQuery\OperatingRoomPutDoorRegisterMap.cs" />
|
||||||
<Compile Include="ObjectQuery\OperationApplyMap.cs" />
|
<Compile Include="ObjectQuery\OperationApplyMap.cs" />
|
||||||
<Compile Include="ObjectQuery\OperationApplyVerifyRoleMap.cs" />
|
<Compile Include="ObjectQuery\OperationApplyVerifyRoleMap.cs" />
|
||||||
<Compile Include="ObjectQuery\OperationBodyPositionMap.cs" />
|
<Compile Include="ObjectQuery\OperationBodyPositionMap.cs" />
|
||||||
|
|||||||
166
AIMSEntity/BLL/AutoGenerate/BOperatingRoomPutDoorRegister.cs
Normal file
166
AIMSEntity/BLL/AutoGenerate/BOperatingRoomPutDoorRegister.cs
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
using AIMSDAL;
|
||||||
|
using AIMSModel;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
|
||||||
|
namespace AIMSBLL
|
||||||
|
|
||||||
|
{
|
||||||
|
public partial class BOperatingRoomPutDoorRegister
|
||||||
|
{
|
||||||
|
#region 插入实体操作部份
|
||||||
|
/// <summary>
|
||||||
|
/// 插入实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="operatingRoomPutDoorRegister">实体类对象</param>
|
||||||
|
/// <returns>标识列值或影响的记录行数</returns>
|
||||||
|
public static int Insert(OperatingRoomPutDoorRegister operatingRoomPutDoorRegister)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegister.Insert(operatingRoomPutDoorRegister);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 删除实体操作
|
||||||
|
/// <summary>
|
||||||
|
/// 删除实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="operatingRoomPutDoorRegister">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Delete(OperatingRoomPutDoorRegister operatingRoomPutDoorRegister)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegister.Delete(operatingRoomPutDoorRegister);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句删除
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Delete(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegister.Delete(oql,parameters);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 更新实体操作
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="operatingRoomPutDoorRegister">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Update(OperatingRoomPutDoorRegister operatingRoomPutDoorRegister)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegister.Update(operatingRoomPutDoorRegister);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句更新实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Update(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegister.Update(oql,parameters);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询实体集合
|
||||||
|
/// <summary>
|
||||||
|
/// \查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegister> Select()
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegister.Select();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 递归查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegister> Select(RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegister.Select(recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegister> Select(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegister.Select(oql, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句递归查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegister> Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegister.Select(oql, parameters, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询单个实体
|
||||||
|
/// <summary>
|
||||||
|
/// 更据对象查询语句查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegister SelectSingle(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegister.SelectSingle(oql, parameters);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 更据对象查询语句递归查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegister SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegister.SelectSingle(oql, parameters, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 按主键字段查询特定实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">主键值</param>
|
||||||
|
/// <returns>实体类对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegister SelectSingle(int? id)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegister.SelectSingle(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更据主键递归查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegister SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegister.SelectSingle(id, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
public static DataTable GetOperatingRoomPutDoorRegisterByCondition(string begin, string end, string anaesthesiaMethod, string anaesthesiaDoctor, string execDepart, string pDept,string Asa)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegister.GetOperatingRoomPutDoorRegisterByCondition(begin, end, anaesthesiaMethod, anaesthesiaDoctor, execDepart, pDept,Asa);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,158 @@
|
|||||||
|
using AIMSDAL;
|
||||||
|
using AIMSModel;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace AIMSBLL
|
||||||
|
{
|
||||||
|
public partial class BOperatingRoomPutDoorRegisterDrugsRecords
|
||||||
|
{
|
||||||
|
#region 插入实体操作部份
|
||||||
|
/// <summary>
|
||||||
|
/// 插入实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="operatingRoomPutDoorRegisterDrugsRecords">实体类对象</param>
|
||||||
|
/// <returns>标识列值或影响的记录行数</returns>
|
||||||
|
public static int Insert(OperatingRoomPutDoorRegisterDrugsRecords operatingRoomPutDoorRegisterDrugsRecords)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegisterDrugsRecords.Insert(operatingRoomPutDoorRegisterDrugsRecords);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 删除实体操作
|
||||||
|
/// <summary>
|
||||||
|
/// 删除实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="operatingRoomPutDoorRegisterDrugsRecords">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Delete(OperatingRoomPutDoorRegisterDrugsRecords operatingRoomPutDoorRegisterDrugsRecords)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegisterDrugsRecords.Delete(operatingRoomPutDoorRegisterDrugsRecords);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句删除
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Delete(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegisterDrugsRecords.Delete(oql,parameters);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 更新实体操作
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="operatingRoomPutDoorRegisterDrugsRecords">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Update(OperatingRoomPutDoorRegisterDrugsRecords operatingRoomPutDoorRegisterDrugsRecords)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegisterDrugsRecords.Update(operatingRoomPutDoorRegisterDrugsRecords);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句更新实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Update(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegisterDrugsRecords.Update(oql,parameters);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询实体集合
|
||||||
|
/// <summary>
|
||||||
|
/// \查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegisterDrugsRecords> Select()
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegisterDrugsRecords.Select();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 递归查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegisterDrugsRecords> Select(RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegisterDrugsRecords.Select(recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegisterDrugsRecords> Select(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegisterDrugsRecords.Select(oql, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句递归查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegisterDrugsRecords> Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegisterDrugsRecords.Select(oql, parameters, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询单个实体
|
||||||
|
/// <summary>
|
||||||
|
/// 更据对象查询语句查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegisterDrugsRecords SelectSingle(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegisterDrugsRecords.SelectSingle(oql, parameters);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 更据对象查询语句递归查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegisterDrugsRecords SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegisterDrugsRecords.SelectSingle(oql, parameters, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 按主键字段查询特定实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">主键值</param>
|
||||||
|
/// <returns>实体类对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegisterDrugsRecords SelectSingle(int? id)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegisterDrugsRecords.SelectSingle(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更据主键递归查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegisterDrugsRecords SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
return DOperatingRoomPutDoorRegisterDrugsRecords.SelectSingle(id, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
957
AIMSEntity/DAL/AutoGenerate/DOperatingRoomPutDoorRegister.cs
Normal file
957
AIMSEntity/DAL/AutoGenerate/DOperatingRoomPutDoorRegister.cs
Normal file
@ -0,0 +1,957 @@
|
|||||||
|
using AIMSModel;
|
||||||
|
using AIMSObjectQuery;
|
||||||
|
using HelperDB;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
|
namespace AIMSDAL
|
||||||
|
{
|
||||||
|
public partial class DOperatingRoomPutDoorRegister
|
||||||
|
{
|
||||||
|
#region 插入实体操作部份
|
||||||
|
/// <summary>
|
||||||
|
/// 插入
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="operatingRoomPutDoorRegister">实体类对象</param>
|
||||||
|
/// <returns>标识列值或影响的记录行数</returns>
|
||||||
|
public static int Insert(SqlCommand cmd, OperatingRoomPutDoorRegister operatingRoomPutDoorRegister)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
cmd.CommandText = "insert into OperatingRoomPutDoorRegister (PatientId,HISPatientId,InHospitalNo,VisitId,PatientModel,PatientDeptNo,PatientDeptName,PatientBedNo,Name,Sex,Age,BirthDay,Height,Weight,IdEntityNo,Tel,Address,Contacts,ContactsTel,OperationType,IsPlanAgainOperation,ExecDeptNo,ExecDeptName,AnaesthesiaMethod,IsPainClinic,PainTreatment,PainTreatmentRemark,Diagnose,DiagnoseRemark,Operation,OPerationRemark,Anaesthesia,AnaesthesiaRemark,ASALevel,OperationLevel,OperationPosition,AnaesthesiaDrugs,Complication,OperationSituation,OperationDate,AnaesthesiaBeginTime,AnaesthesiaEndTime,OperationBeginTime,OperationEndTime,OperationDoctorNo,OperationDoctorName,AnaesthesiaDoctorNo,AnaesthesiaDoctorName,InstrumentNurseNo,InstrumentNurseName,TourNurseNo,TourNurseName,IsValid,State,OpeatorNo,OperatorTime,Remark,HCode) values (@PatientId,@HISPatientId,@InHospitalNo,@VisitId,@PatientModel,@PatientDeptNo,@PatientDeptName,@PatientBedNo,@Name,@Sex,@Age,@BirthDay,@Height,@Weight,@IdEntityNo,@Tel,@Address,@Contacts,@ContactsTel,@OperationType,@IsPlanAgainOperation,@ExecDeptNo,@ExecDeptName,@AnaesthesiaMethod,@IsPainClinic,@PainTreatment,@PainTreatmentRemark,@Diagnose,@DiagnoseRemark,@Operation,@OPerationRemark,@Anaesthesia,@AnaesthesiaRemark,@ASALevel,@OperationLevel,@OperationPosition,@AnaesthesiaDrugs,@Complication,@OperationSituation,@OperationDate,@AnaesthesiaBeginTime,@AnaesthesiaEndTime,@OperationBeginTime,@OperationEndTime,@OperationDoctorNo,@OperationDoctorName,@AnaesthesiaDoctorNo,@AnaesthesiaDoctorName,@InstrumentNurseNo,@InstrumentNurseName,@TourNurseNo,@TourNurseName,@IsValid,@State,@OpeatorNo,@OperatorTime,@Remark,@HCode);select @@identity";
|
||||||
|
//从实体中取出值放入Command的参数列表
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PatientId", operatingRoomPutDoorRegister.PatientId == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.PatientId));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@HISPatientId", operatingRoomPutDoorRegister.HISPatientId == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.HISPatientId));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@InHospitalNo", operatingRoomPutDoorRegister.InHospitalNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.InHospitalNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@VisitId", operatingRoomPutDoorRegister.VisitId == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.VisitId));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PatientModel", operatingRoomPutDoorRegister.PatientModel == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.PatientModel));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PatientDeptNo", operatingRoomPutDoorRegister.PatientDeptNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.PatientDeptNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PatientDeptName", operatingRoomPutDoorRegister.PatientDeptName == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.PatientDeptName));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PatientBedNo", operatingRoomPutDoorRegister.PatientBedNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.PatientBedNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Name", operatingRoomPutDoorRegister.Name == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Name));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Sex", operatingRoomPutDoorRegister.Sex == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Sex));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Age", operatingRoomPutDoorRegister.Age == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Age));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@BirthDay", operatingRoomPutDoorRegister.BirthDay.HasValue ? (object)operatingRoomPutDoorRegister.BirthDay.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Height", operatingRoomPutDoorRegister.Height.HasValue ? (object)operatingRoomPutDoorRegister.Height.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Weight", operatingRoomPutDoorRegister.Weight.HasValue ? (object)operatingRoomPutDoorRegister.Weight.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@IdEntityNo", operatingRoomPutDoorRegister.IdEntityNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.IdEntityNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Tel", operatingRoomPutDoorRegister.Tel == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Tel));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Address", operatingRoomPutDoorRegister.Address == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Address));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Contacts", operatingRoomPutDoorRegister.Contacts == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Contacts));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@ContactsTel", operatingRoomPutDoorRegister.ContactsTel == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.ContactsTel));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationType", operatingRoomPutDoorRegister.OperationType == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OperationType));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@IsPlanAgainOperation", operatingRoomPutDoorRegister.IsPlanAgainOperation.HasValue ? (object)operatingRoomPutDoorRegister.IsPlanAgainOperation.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@ExecDeptNo", operatingRoomPutDoorRegister.ExecDeptNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.ExecDeptNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@ExecDeptName", operatingRoomPutDoorRegister.ExecDeptName == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.ExecDeptName));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@AnaesthesiaMethod", operatingRoomPutDoorRegister.AnaesthesiaMethod == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.AnaesthesiaMethod));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@IsPainClinic", operatingRoomPutDoorRegister.IsPainClinic.HasValue ? (object)operatingRoomPutDoorRegister.IsPainClinic.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PainTreatment", operatingRoomPutDoorRegister.PainTreatment == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.PainTreatment));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PainTreatmentRemark", operatingRoomPutDoorRegister.PainTreatmentRemark == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.PainTreatmentRemark));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Diagnose", operatingRoomPutDoorRegister.Diagnose == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Diagnose));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@DiagnoseRemark", operatingRoomPutDoorRegister.DiagnoseRemark == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.DiagnoseRemark));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Operation", operatingRoomPutDoorRegister.Operation == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Operation));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OPerationRemark", operatingRoomPutDoorRegister.OPerationRemark == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OPerationRemark));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Anaesthesia", operatingRoomPutDoorRegister.Anaesthesia == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Anaesthesia));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@AnaesthesiaRemark", operatingRoomPutDoorRegister.AnaesthesiaRemark == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.AnaesthesiaRemark));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@ASALevel", operatingRoomPutDoorRegister.ASALevel == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.ASALevel));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationLevel", operatingRoomPutDoorRegister.OperationLevel == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OperationLevel));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationPosition", operatingRoomPutDoorRegister.OperationPosition == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OperationPosition));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@AnaesthesiaDrugs", operatingRoomPutDoorRegister.AnaesthesiaDrugs == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.AnaesthesiaDrugs));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Complication", operatingRoomPutDoorRegister.Complication == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Complication));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationSituation", operatingRoomPutDoorRegister.OperationSituation == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OperationSituation));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationDate", operatingRoomPutDoorRegister.OperationDate.HasValue ? (object)operatingRoomPutDoorRegister.OperationDate.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@AnaesthesiaBeginTime", operatingRoomPutDoorRegister.AnaesthesiaBeginTime.HasValue ? (object)operatingRoomPutDoorRegister.AnaesthesiaBeginTime.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@AnaesthesiaEndTime", operatingRoomPutDoorRegister.AnaesthesiaEndTime.HasValue ? (object)operatingRoomPutDoorRegister.AnaesthesiaEndTime.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationBeginTime", operatingRoomPutDoorRegister.OperationBeginTime.HasValue ? (object)operatingRoomPutDoorRegister.OperationBeginTime.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationEndTime", operatingRoomPutDoorRegister.OperationEndTime.HasValue ? (object)operatingRoomPutDoorRegister.OperationEndTime.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationDoctorNo", operatingRoomPutDoorRegister.OperationDoctorNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OperationDoctorNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationDoctorName", operatingRoomPutDoorRegister.OperationDoctorName == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OperationDoctorName));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@AnaesthesiaDoctorNo", operatingRoomPutDoorRegister.AnaesthesiaDoctorNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.AnaesthesiaDoctorNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@AnaesthesiaDoctorName", operatingRoomPutDoorRegister.AnaesthesiaDoctorName == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.AnaesthesiaDoctorName));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@InstrumentNurseNo", operatingRoomPutDoorRegister.InstrumentNurseNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.InstrumentNurseNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@InstrumentNurseName", operatingRoomPutDoorRegister.InstrumentNurseName == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.InstrumentNurseName));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@TourNurseNo", operatingRoomPutDoorRegister.TourNurseNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.TourNurseNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@TourNurseName", operatingRoomPutDoorRegister.TourNurseName == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.TourNurseName));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@IsValid", operatingRoomPutDoorRegister.IsValid.HasValue ? (object)operatingRoomPutDoorRegister.IsValid.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@State", operatingRoomPutDoorRegister.State.HasValue ? (object)operatingRoomPutDoorRegister.State.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OpeatorNo", operatingRoomPutDoorRegister.OpeatorNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OpeatorNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperatorTime", operatingRoomPutDoorRegister.OperatorTime.HasValue ? (object)operatingRoomPutDoorRegister.OperatorTime.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Remark", operatingRoomPutDoorRegister.Remark == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Remark));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@HCode", operatingRoomPutDoorRegister.HCode == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.HCode));
|
||||||
|
return Convert.ToInt32(cmd.ExecuteScalar());
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 不使用事务的插入方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="operatingRoomPutDoorRegister">实体类对象</param>
|
||||||
|
/// <returns>标识列值或影响的记录行数</returns>
|
||||||
|
public static int Insert(OperatingRoomPutDoorRegister operatingRoomPutDoorRegister)
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return Insert(cmd, operatingRoomPutDoorRegister);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 使用事务的插入方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
|
/// <param name="operatingRoomPutDoorRegister">实体类对象</param>
|
||||||
|
/// <returns>标识列值或影响的记录行数</returns>
|
||||||
|
public static int Insert(Connection connection, OperatingRoomPutDoorRegister operatingRoomPutDoorRegister)
|
||||||
|
{
|
||||||
|
return Insert(connection.Command, operatingRoomPutDoorRegister);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 删除实体操作
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="operatingRoomPutDoorRegister">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int ExcuteDeleteCommand(SqlCommand cmd, OperatingRoomPutDoorRegister operatingRoomPutDoorRegister)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
cmd.CommandText = "delete from OperatingRoomPutDoorRegister where Id=@Id";
|
||||||
|
//从实体中取出值放入Command的参数列表
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Id", operatingRoomPutDoorRegister.Id));
|
||||||
|
return cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 不使用事务的删除方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="operatingRoomPutDoorRegister">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Delete(OperatingRoomPutDoorRegister operatingRoomPutDoorRegister)
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return ExcuteDeleteCommand(cmd, operatingRoomPutDoorRegister);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 使用事务的删除方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
|
/// <param name="operatingRoomPutDoorRegister">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Delete(Connection connection, OperatingRoomPutDoorRegister operatingRoomPutDoorRegister)
|
||||||
|
{
|
||||||
|
return ExcuteDeleteCommand(connection.Command, operatingRoomPutDoorRegister);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 执行删除命令
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int ExcuteDeleteCommand(SqlCommand cmd, string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
//解析过滤部份Sql语句
|
||||||
|
string filterString = SyntaxAnalyzer.ParseSql(oql, new OperatingRoomPutDoorRegisterMap());
|
||||||
|
if (filterString != string.Empty)
|
||||||
|
{
|
||||||
|
filterString = " where " + filterString;
|
||||||
|
}
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
cmd.CommandText = "delete from OperatingRoomPutDoorRegister " + filterString;
|
||||||
|
//添加参数
|
||||||
|
if (parameters != null)
|
||||||
|
{
|
||||||
|
foreach (string key in parameters.Keys)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 不使用事务的删除方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Delete(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return ExcuteDeleteCommand(cmd, oql, parameters);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 使用事务的删除方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Delete(Connection connection, string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
return ExcuteDeleteCommand(connection.Command, oql, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 更新实体操作
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="operatingRoomPutDoorRegister">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int ExcuteUpdateCommand(SqlCommand cmd, OperatingRoomPutDoorRegister operatingRoomPutDoorRegister)
|
||||||
|
{
|
||||||
|
cmd.CommandText = "update OperatingRoomPutDoorRegister set PatientId=@PatientId,HISPatientId=@HISPatientId,InHospitalNo=@InHospitalNo,VisitId=@VisitId,PatientModel=@PatientModel,PatientDeptNo=@PatientDeptNo,PatientDeptName=@PatientDeptName,PatientBedNo=@PatientBedNo,Name=@Name,Sex=@Sex,Age=@Age,BirthDay=@BirthDay,Height=@Height,Weight=@Weight,IdEntityNo=@IdEntityNo,Tel=@Tel,Address=@Address,Contacts=@Contacts,ContactsTel=@ContactsTel,OperationType=@OperationType,IsPlanAgainOperation=@IsPlanAgainOperation,ExecDeptNo=@ExecDeptNo,ExecDeptName=@ExecDeptName,AnaesthesiaMethod=@AnaesthesiaMethod,IsPainClinic=@IsPainClinic,PainTreatment=@PainTreatment,PainTreatmentRemark=@PainTreatmentRemark,Diagnose=@Diagnose,DiagnoseRemark=@DiagnoseRemark,Operation=@Operation,OPerationRemark=@OPerationRemark,Anaesthesia=@Anaesthesia,AnaesthesiaRemark=@AnaesthesiaRemark,ASALevel=@ASALevel,OperationLevel=@OperationLevel,OperationPosition=@OperationPosition,AnaesthesiaDrugs=@AnaesthesiaDrugs,Complication=@Complication,OperationSituation=@OperationSituation,OperationDate=@OperationDate,AnaesthesiaBeginTime=@AnaesthesiaBeginTime,AnaesthesiaEndTime=@AnaesthesiaEndTime,OperationBeginTime=@OperationBeginTime,OperationEndTime=@OperationEndTime,OperationDoctorNo=@OperationDoctorNo,OperationDoctorName=@OperationDoctorName,AnaesthesiaDoctorNo=@AnaesthesiaDoctorNo,AnaesthesiaDoctorName=@AnaesthesiaDoctorName,InstrumentNurseNo=@InstrumentNurseNo,InstrumentNurseName=@InstrumentNurseName,TourNurseNo=@TourNurseNo,TourNurseName=@TourNurseName,IsValid=@IsValid,State=@State,OpeatorNo=@OpeatorNo,OperatorTime=@OperatorTime,Remark=@Remark,HCode=@HCode where Id=@Id";
|
||||||
|
//从实体中取出值放入Command的参数列表
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PatientId", operatingRoomPutDoorRegister.PatientId == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.PatientId));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@HISPatientId", operatingRoomPutDoorRegister.HISPatientId == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.HISPatientId));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@InHospitalNo", operatingRoomPutDoorRegister.InHospitalNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.InHospitalNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@VisitId", operatingRoomPutDoorRegister.VisitId == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.VisitId));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PatientModel", operatingRoomPutDoorRegister.PatientModel == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.PatientModel));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PatientDeptNo", operatingRoomPutDoorRegister.PatientDeptNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.PatientDeptNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PatientDeptName", operatingRoomPutDoorRegister.PatientDeptName == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.PatientDeptName));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PatientBedNo", operatingRoomPutDoorRegister.PatientBedNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.PatientBedNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Name", operatingRoomPutDoorRegister.Name == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Name));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Sex", operatingRoomPutDoorRegister.Sex == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Sex));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Age", operatingRoomPutDoorRegister.Age == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Age));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@BirthDay", operatingRoomPutDoorRegister.BirthDay.HasValue ? (object)operatingRoomPutDoorRegister.BirthDay.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Height", operatingRoomPutDoorRegister.Height.HasValue ? (object)operatingRoomPutDoorRegister.Height.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Weight", operatingRoomPutDoorRegister.Weight.HasValue ? (object)operatingRoomPutDoorRegister.Weight.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@IdEntityNo", operatingRoomPutDoorRegister.IdEntityNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.IdEntityNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Tel", operatingRoomPutDoorRegister.Tel == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Tel));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Address", operatingRoomPutDoorRegister.Address == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Address));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Contacts", operatingRoomPutDoorRegister.Contacts == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Contacts));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@ContactsTel", operatingRoomPutDoorRegister.ContactsTel == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.ContactsTel));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationType", operatingRoomPutDoorRegister.OperationType == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OperationType));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@IsPlanAgainOperation", operatingRoomPutDoorRegister.IsPlanAgainOperation.HasValue ? (object)operatingRoomPutDoorRegister.IsPlanAgainOperation.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@ExecDeptNo", operatingRoomPutDoorRegister.ExecDeptNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.ExecDeptNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@ExecDeptName", operatingRoomPutDoorRegister.ExecDeptName == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.ExecDeptName));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@AnaesthesiaMethod", operatingRoomPutDoorRegister.AnaesthesiaMethod == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.AnaesthesiaMethod));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@IsPainClinic", operatingRoomPutDoorRegister.IsPainClinic.HasValue ? (object)operatingRoomPutDoorRegister.IsPainClinic.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PainTreatment", operatingRoomPutDoorRegister.PainTreatment == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.PainTreatment));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PainTreatmentRemark", operatingRoomPutDoorRegister.PainTreatmentRemark == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.PainTreatmentRemark));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Diagnose", operatingRoomPutDoorRegister.Diagnose == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Diagnose));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@DiagnoseRemark", operatingRoomPutDoorRegister.DiagnoseRemark == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.DiagnoseRemark));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Operation", operatingRoomPutDoorRegister.Operation == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Operation));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OPerationRemark", operatingRoomPutDoorRegister.OPerationRemark == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OPerationRemark));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Anaesthesia", operatingRoomPutDoorRegister.Anaesthesia == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Anaesthesia));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@AnaesthesiaRemark", operatingRoomPutDoorRegister.AnaesthesiaRemark == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.AnaesthesiaRemark));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@ASALevel", operatingRoomPutDoorRegister.ASALevel == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.ASALevel));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationLevel", operatingRoomPutDoorRegister.OperationLevel == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OperationLevel));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationPosition", operatingRoomPutDoorRegister.OperationPosition == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OperationPosition));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@AnaesthesiaDrugs", operatingRoomPutDoorRegister.AnaesthesiaDrugs == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.AnaesthesiaDrugs));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Complication", operatingRoomPutDoorRegister.Complication == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Complication));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationSituation", operatingRoomPutDoorRegister.OperationSituation == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OperationSituation));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationDate", operatingRoomPutDoorRegister.OperationDate.HasValue ? (object)operatingRoomPutDoorRegister.OperationDate.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@AnaesthesiaBeginTime", operatingRoomPutDoorRegister.AnaesthesiaBeginTime.HasValue ? (object)operatingRoomPutDoorRegister.AnaesthesiaBeginTime.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@AnaesthesiaEndTime", operatingRoomPutDoorRegister.AnaesthesiaEndTime.HasValue ? (object)operatingRoomPutDoorRegister.AnaesthesiaEndTime.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationBeginTime", operatingRoomPutDoorRegister.OperationBeginTime.HasValue ? (object)operatingRoomPutDoorRegister.OperationBeginTime.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationEndTime", operatingRoomPutDoorRegister.OperationEndTime.HasValue ? (object)operatingRoomPutDoorRegister.OperationEndTime.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationDoctorNo", operatingRoomPutDoorRegister.OperationDoctorNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OperationDoctorNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperationDoctorName", operatingRoomPutDoorRegister.OperationDoctorName == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OperationDoctorName));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@AnaesthesiaDoctorNo", operatingRoomPutDoorRegister.AnaesthesiaDoctorNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.AnaesthesiaDoctorNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@AnaesthesiaDoctorName", operatingRoomPutDoorRegister.AnaesthesiaDoctorName == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.AnaesthesiaDoctorName));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@InstrumentNurseNo", operatingRoomPutDoorRegister.InstrumentNurseNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.InstrumentNurseNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@InstrumentNurseName", operatingRoomPutDoorRegister.InstrumentNurseName == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.InstrumentNurseName));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@TourNurseNo", operatingRoomPutDoorRegister.TourNurseNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.TourNurseNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@TourNurseName", operatingRoomPutDoorRegister.TourNurseName == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.TourNurseName));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@IsValid", operatingRoomPutDoorRegister.IsValid.HasValue ? (object)operatingRoomPutDoorRegister.IsValid.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@State", operatingRoomPutDoorRegister.State.HasValue ? (object)operatingRoomPutDoorRegister.State.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OpeatorNo", operatingRoomPutDoorRegister.OpeatorNo == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.OpeatorNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperatorTime", operatingRoomPutDoorRegister.OperatorTime.HasValue ? (object)operatingRoomPutDoorRegister.OperatorTime.Value : (object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Remark", operatingRoomPutDoorRegister.Remark == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.Remark));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@HCode", operatingRoomPutDoorRegister.HCode == null ? (object)DBNull.Value : (object)operatingRoomPutDoorRegister.HCode));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Id", operatingRoomPutDoorRegister.Id));
|
||||||
|
return cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 不使用事务的更新方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="operatingRoomPutDoorRegister">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Update(OperatingRoomPutDoorRegister operatingRoomPutDoorRegister)
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return ExcuteUpdateCommand(cmd, operatingRoomPutDoorRegister);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 使用事务的更新方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
|
/// <param name="operatingRoomPutDoorRegister">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Update(Connection connection, OperatingRoomPutDoorRegister operatingRoomPutDoorRegister)
|
||||||
|
{
|
||||||
|
return ExcuteUpdateCommand(connection.Command, operatingRoomPutDoorRegister);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 执行更新命令
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int ExcuteUpdateCommand(SqlCommand cmd, string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
//解析过滤部份Sql语句
|
||||||
|
string updateString = SyntaxAnalyzer.ParseSql(oql, new OperatingRoomPutDoorRegisterMap());
|
||||||
|
cmd.CommandText = "update OperatingRoomPutDoorRegister set " + updateString;
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
//添加参数
|
||||||
|
if (parameters != null)
|
||||||
|
{
|
||||||
|
foreach (string key in parameters.Keys)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 不使用事务的更新方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Update(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return ExcuteUpdateCommand(cmd, oql, parameters);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 使用事务的更新方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Update(Connection connection, string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
return ExcuteUpdateCommand(connection.Command, oql, parameters);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询实体集合
|
||||||
|
/// <summary>
|
||||||
|
/// 执行Command获取对象列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象列表</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegister> ExcuteSelectCommand(SqlCommand cmd, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
List<OperatingRoomPutDoorRegister> operatingRoomPutDoorRegisterList = new List<OperatingRoomPutDoorRegister>();
|
||||||
|
using (SqlDataReader dr = cmd.ExecuteReader())
|
||||||
|
{
|
||||||
|
while (dr.Read())
|
||||||
|
{
|
||||||
|
OperatingRoomPutDoorRegister operatingRoomPutDoorRegister = DataReaderToEntity(dr);
|
||||||
|
operatingRoomPutDoorRegisterList.Add(operatingRoomPutDoorRegister);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return operatingRoomPutDoorRegisterList;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 执行查询命令
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegister> ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
//解析过滤部份Sql语句
|
||||||
|
string filterString = SyntaxAnalyzer.ParseSql(oql, new OperatingRoomPutDoorRegisterMap());
|
||||||
|
if (filterString != string.Empty)
|
||||||
|
{
|
||||||
|
if (filterString.Trim().ToLower().IndexOf("order ") != 0)
|
||||||
|
filterString = " where " + filterString;
|
||||||
|
}
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
cmd.CommandText = "select * from OperatingRoomPutDoorRegister " + filterString;
|
||||||
|
//添加参数
|
||||||
|
if (parameters != null)
|
||||||
|
{
|
||||||
|
foreach (string key in parameters.Keys)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegister> Select()
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
cmd.CommandText = "select * from OperatingRoomPutDoorRegister";
|
||||||
|
return ExcuteSelectCommand(cmd, RecursiveType.Parent, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegister> Select(RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
cmd.CommandText = "select * from OperatingRoomPutDoorRegister";
|
||||||
|
return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegister> Select(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return ExcuteSelectCommand(cmd, oql, parameters, RecursiveType.Parent, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegister> Select(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return ExcuteSelectCommand(cmd, oql, parameters, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句查询实体集合(启用事务)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">连接对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegister> Select(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
return ExcuteSelectCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询单个实体
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 递归查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegister ExcuteSelectSingleCommand(SqlCommand cmd, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
OperatingRoomPutDoorRegister operatingRoomPutDoorRegister = null;
|
||||||
|
using (SqlDataReader dr = cmd.ExecuteReader())
|
||||||
|
{
|
||||||
|
if (dr.Read())
|
||||||
|
operatingRoomPutDoorRegister = DataReaderToEntity(dr);
|
||||||
|
}
|
||||||
|
if (operatingRoomPutDoorRegister == null)
|
||||||
|
return operatingRoomPutDoorRegister;
|
||||||
|
return operatingRoomPutDoorRegister;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 更据对象查询语句递归查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegister ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
//解析过滤部份Sql语句
|
||||||
|
string filterString = SyntaxAnalyzer.ParseSql(oql, new OperatingRoomPutDoorRegisterMap());
|
||||||
|
if (filterString != string.Empty)
|
||||||
|
{
|
||||||
|
filterString = " where " + filterString;
|
||||||
|
}
|
||||||
|
cmd.CommandText = "select * from OperatingRoomPutDoorRegister " + filterString;
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
//添加参数
|
||||||
|
if (parameters != null)
|
||||||
|
{
|
||||||
|
foreach (string key in parameters.Keys)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更据对象查询语句递归查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegister SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return ExcuteSelectSingleCommand(cmd, oql, parameters, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更据对象查询语句查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegister SelectSingle(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
return SelectSingle(oql, parameters, RecursiveType.Parent, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更据对象查询语句并启用事务查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">连接对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegister SelectSingle(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
return ExcuteSelectSingleCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更据主键值递归查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="id">主键值</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegister SelectSingle(SqlCommand cmd, int? id, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
if (id.HasValue)
|
||||||
|
{
|
||||||
|
cmd.CommandText = "select * from OperatingRoomPutDoorRegister where Id=@pk";
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@pk", id.Value));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cmd.CommandText = "select * from OperatingRoomPutDoorRegister where Id is null";
|
||||||
|
}
|
||||||
|
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 按主键字段查询特定实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">主键值</param>
|
||||||
|
/// <returns>实体类对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegister SelectSingle(int? id)
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return SelectSingle(cmd, id, RecursiveType.Parent, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 按主键字段查询特定实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">主键值</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegister SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return SelectSingle(cmd, id, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 使用事务并按主键字段查询特定实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">连接对象</param>
|
||||||
|
/// <param name="id">主键值</param>
|
||||||
|
/// <returns>实体类对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegister SelectSingle(Connection connection, int? id, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
return SelectSingle(connection.Command, id, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 从DataReader中取出值生成实体对象
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="searcher">查询对象</param>
|
||||||
|
/// <returns>过滤条件字符串</returns>
|
||||||
|
private static OperatingRoomPutDoorRegister DataReaderToEntity(SqlDataReader dr)
|
||||||
|
{
|
||||||
|
OperatingRoomPutDoorRegister entity = new OperatingRoomPutDoorRegister();
|
||||||
|
if (dr["Id"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Id = Convert.ToInt32(dr["Id"]);
|
||||||
|
}
|
||||||
|
if (dr["PatientId"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.PatientId = dr["PatientId"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["HISPatientId"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.HISPatientId = dr["HISPatientId"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["InHospitalNo"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.InHospitalNo = dr["InHospitalNo"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["VisitId"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.VisitId = dr["VisitId"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["PatientModel"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.PatientModel = dr["PatientModel"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["PatientDeptNo"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.PatientDeptNo = dr["PatientDeptNo"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["PatientDeptName"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.PatientDeptName = dr["PatientDeptName"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["PatientBedNo"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.PatientBedNo = dr["PatientBedNo"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["Name"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Name = dr["Name"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["Sex"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Sex = dr["Sex"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["Age"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Age = dr["Age"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["BirthDay"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.BirthDay = Convert.ToDateTime(dr["BirthDay"]);
|
||||||
|
}
|
||||||
|
if (dr["Height"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Height = Convert.ToDecimal(dr["Height"]);
|
||||||
|
}
|
||||||
|
if (dr["Weight"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Weight = Convert.ToDecimal(dr["Weight"]);
|
||||||
|
}
|
||||||
|
if (dr["IdEntityNo"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.IdEntityNo = dr["IdEntityNo"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["Tel"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Tel = dr["Tel"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["Address"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Address = dr["Address"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["Contacts"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Contacts = dr["Contacts"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["ContactsTel"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.ContactsTel = dr["ContactsTel"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["OperationType"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.OperationType = dr["OperationType"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["IsPlanAgainOperation"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.IsPlanAgainOperation = Convert.ToInt32(dr["IsPlanAgainOperation"]);
|
||||||
|
}
|
||||||
|
if (dr["ExecDeptNo"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.ExecDeptNo = dr["ExecDeptNo"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["ExecDeptName"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.ExecDeptName = dr["ExecDeptName"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["AnaesthesiaMethod"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.AnaesthesiaMethod = dr["AnaesthesiaMethod"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["IsPainClinic"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.IsPainClinic = Convert.ToInt32(dr["IsPainClinic"]);
|
||||||
|
}
|
||||||
|
if (dr["PainTreatment"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.PainTreatment = dr["PainTreatment"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["PainTreatmentRemark"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.PainTreatmentRemark = dr["PainTreatmentRemark"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["Diagnose"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Diagnose = dr["Diagnose"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["DiagnoseRemark"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.DiagnoseRemark = dr["DiagnoseRemark"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["Operation"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Operation = dr["Operation"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["OPerationRemark"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.OPerationRemark = dr["OPerationRemark"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["Anaesthesia"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Anaesthesia = dr["Anaesthesia"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["AnaesthesiaRemark"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.AnaesthesiaRemark = dr["AnaesthesiaRemark"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["ASALevel"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.ASALevel = dr["ASALevel"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["OperationLevel"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.OperationLevel = dr["OperationLevel"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["OperationPosition"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.OperationPosition = dr["OperationPosition"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["AnaesthesiaDrugs"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.AnaesthesiaDrugs = dr["AnaesthesiaDrugs"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["Complication"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Complication = dr["Complication"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["OperationSituation"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.OperationSituation = dr["OperationSituation"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["OperationDate"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.OperationDate = Convert.ToDateTime(dr["OperationDate"]);
|
||||||
|
}
|
||||||
|
if (dr["AnaesthesiaBeginTime"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.AnaesthesiaBeginTime = Convert.ToDateTime(dr["AnaesthesiaBeginTime"]);
|
||||||
|
}
|
||||||
|
if (dr["AnaesthesiaEndTime"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.AnaesthesiaEndTime = Convert.ToDateTime(dr["AnaesthesiaEndTime"]);
|
||||||
|
}
|
||||||
|
if (dr["OperationBeginTime"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.OperationBeginTime = Convert.ToDateTime(dr["OperationBeginTime"]);
|
||||||
|
}
|
||||||
|
if (dr["OperationEndTime"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.OperationEndTime = Convert.ToDateTime(dr["OperationEndTime"]);
|
||||||
|
}
|
||||||
|
if (dr["OperationDoctorNo"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.OperationDoctorNo = dr["OperationDoctorNo"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["OperationDoctorName"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.OperationDoctorName = dr["OperationDoctorName"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["AnaesthesiaDoctorNo"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.AnaesthesiaDoctorNo = dr["AnaesthesiaDoctorNo"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["AnaesthesiaDoctorName"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.AnaesthesiaDoctorName = dr["AnaesthesiaDoctorName"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["InstrumentNurseNo"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.InstrumentNurseNo = dr["InstrumentNurseNo"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["InstrumentNurseName"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.InstrumentNurseName = dr["InstrumentNurseName"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["TourNurseNo"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.TourNurseNo = dr["TourNurseNo"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["TourNurseName"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.TourNurseName = dr["TourNurseName"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["IsValid"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.IsValid = Convert.ToInt32(dr["IsValid"]);
|
||||||
|
}
|
||||||
|
if (dr["State"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.State = Convert.ToInt32(dr["State"]);
|
||||||
|
}
|
||||||
|
if (dr["OpeatorNo"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.OpeatorNo = dr["OpeatorNo"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["OperatorTime"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.OperatorTime = Convert.ToDateTime(dr["OperatorTime"]);
|
||||||
|
}
|
||||||
|
if (dr["Remark"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Remark = dr["Remark"].ToString();
|
||||||
|
}
|
||||||
|
if (dr["HCode"] != System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.HCode = dr["HCode"].ToString();
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DataTable GetOperatingRoomPutDoorRegisterByCondition(string begin, string end, string anaesthesiaMethod, string anaesthesiaDoctor, string execDepart, string pDept, string Asa)
|
||||||
|
{
|
||||||
|
DataTable dt = null;
|
||||||
|
string sql = "select *,dbo.split(AnaesthesiaDoctorName,',',0)AnaesthesiaDoctorName1,dbo.split(AnaesthesiaDoctorName,',',1)AnaesthesiaDoctorName2 from OperatingRoomPutDoorRegister where OperationDate>='" + begin + "' and OperationDate<='" + end + "' ";
|
||||||
|
if (anaesthesiaMethod != "")
|
||||||
|
{
|
||||||
|
sql += " and AnaesthesiaMethod like '%" + anaesthesiaMethod + "%'";
|
||||||
|
}
|
||||||
|
if (anaesthesiaDoctor != "")
|
||||||
|
{
|
||||||
|
sql += " and AnaesthesiaDoctorName='" + anaesthesiaDoctor + "'";
|
||||||
|
}
|
||||||
|
if (execDepart != "")
|
||||||
|
{
|
||||||
|
sql += " and ExecDeptName='" + execDepart + "'";
|
||||||
|
}
|
||||||
|
if (Asa != "")
|
||||||
|
{
|
||||||
|
sql += " and ASALevel='" + Asa + "'";
|
||||||
|
}
|
||||||
|
if (pDept != "")
|
||||||
|
{
|
||||||
|
sql += " and PatientDeptName='" + pDept + "'";
|
||||||
|
}
|
||||||
|
dt = DBHelper.GetDataTable(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,625 @@
|
|||||||
|
using AIMSModel;
|
||||||
|
using AIMSObjectQuery;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
|
namespace AIMSDAL
|
||||||
|
{
|
||||||
|
public partial class DOperatingRoomPutDoorRegisterDrugsRecords
|
||||||
|
{
|
||||||
|
#region 插入实体操作部份
|
||||||
|
/// <summary>
|
||||||
|
/// 插入
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="operatingRoomPutDoorRegisterDrugsRecords">实体类对象</param>
|
||||||
|
/// <returns>标识列值或影响的记录行数</returns>
|
||||||
|
public static int Insert(SqlCommand cmd, OperatingRoomPutDoorRegisterDrugsRecords operatingRoomPutDoorRegisterDrugsRecords)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
cmd.CommandText = "insert into OperatingRoomPutDoorRegisterDrugsRecords (PutDoorRegisterId,HisPatientId,DrugsNo,DrugsName,Dosage,IsValid,state,OperatorTime) values (@PutDoorRegisterId,@HisPatientId,@DrugsNo,@DrugsName,@Dosage,@IsValid,@state,@OperatorTime);select @@identity";
|
||||||
|
//从实体中取出值放入Command的参数列表
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PutDoorRegisterId",operatingRoomPutDoorRegisterDrugsRecords.PutDoorRegisterId.HasValue?(object)operatingRoomPutDoorRegisterDrugsRecords.PutDoorRegisterId.Value:(object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@HisPatientId",operatingRoomPutDoorRegisterDrugsRecords.HisPatientId==null?(object)DBNull.Value:(object)operatingRoomPutDoorRegisterDrugsRecords.HisPatientId));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@DrugsNo",operatingRoomPutDoorRegisterDrugsRecords.DrugsNo==null?(object)DBNull.Value:(object)operatingRoomPutDoorRegisterDrugsRecords.DrugsNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@DrugsName",operatingRoomPutDoorRegisterDrugsRecords.DrugsName==null?(object)DBNull.Value:(object)operatingRoomPutDoorRegisterDrugsRecords.DrugsName));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Dosage",operatingRoomPutDoorRegisterDrugsRecords.Dosage.HasValue?(object)operatingRoomPutDoorRegisterDrugsRecords.Dosage.Value:(object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@IsValid",operatingRoomPutDoorRegisterDrugsRecords.IsValid.HasValue?(object)operatingRoomPutDoorRegisterDrugsRecords.IsValid.Value:(object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@state",operatingRoomPutDoorRegisterDrugsRecords.State.HasValue?(object)operatingRoomPutDoorRegisterDrugsRecords.State.Value:(object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperatorTime",operatingRoomPutDoorRegisterDrugsRecords.OperatorTime.HasValue?(object)operatingRoomPutDoorRegisterDrugsRecords.OperatorTime.Value:(object)DBNull.Value));
|
||||||
|
return Convert.ToInt32(cmd.ExecuteScalar());
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 不使用事务的插入方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="operatingRoomPutDoorRegisterDrugsRecords">实体类对象</param>
|
||||||
|
/// <returns>标识列值或影响的记录行数</returns>
|
||||||
|
public static int Insert(OperatingRoomPutDoorRegisterDrugsRecords operatingRoomPutDoorRegisterDrugsRecords)
|
||||||
|
{
|
||||||
|
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return Insert(cmd, operatingRoomPutDoorRegisterDrugsRecords);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 使用事务的插入方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
|
/// <param name="operatingRoomPutDoorRegisterDrugsRecords">实体类对象</param>
|
||||||
|
/// <returns>标识列值或影响的记录行数</returns>
|
||||||
|
public static int Insert(Connection connection,OperatingRoomPutDoorRegisterDrugsRecords operatingRoomPutDoorRegisterDrugsRecords)
|
||||||
|
{
|
||||||
|
return Insert(connection.Command, operatingRoomPutDoorRegisterDrugsRecords);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 删除实体操作
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="operatingRoomPutDoorRegisterDrugsRecords">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int ExcuteDeleteCommand(SqlCommand cmd, OperatingRoomPutDoorRegisterDrugsRecords operatingRoomPutDoorRegisterDrugsRecords)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
cmd.CommandText = "delete from OperatingRoomPutDoorRegisterDrugsRecords where Id=@Id";
|
||||||
|
//从实体中取出值放入Command的参数列表
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Id", operatingRoomPutDoorRegisterDrugsRecords.Id));
|
||||||
|
return cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 不使用事务的删除方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="operatingRoomPutDoorRegisterDrugsRecords">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Delete(OperatingRoomPutDoorRegisterDrugsRecords operatingRoomPutDoorRegisterDrugsRecords)
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return ExcuteDeleteCommand(cmd, operatingRoomPutDoorRegisterDrugsRecords);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 使用事务的删除方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
|
/// <param name="operatingRoomPutDoorRegisterDrugsRecords">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Delete(Connection connection,OperatingRoomPutDoorRegisterDrugsRecords operatingRoomPutDoorRegisterDrugsRecords)
|
||||||
|
{
|
||||||
|
return ExcuteDeleteCommand(connection.Command, operatingRoomPutDoorRegisterDrugsRecords);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 执行删除命令
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int ExcuteDeleteCommand(SqlCommand cmd, string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
//解析过滤部份Sql语句
|
||||||
|
string filterString = SyntaxAnalyzer.ParseSql(oql, new OperatingRoomPutDoorRegisterDrugsRecordsMap());
|
||||||
|
if (filterString != string.Empty)
|
||||||
|
{
|
||||||
|
filterString = " where " + filterString;
|
||||||
|
}
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
cmd.CommandText = "delete from OperatingRoomPutDoorRegisterDrugsRecords " + filterString;
|
||||||
|
//添加参数
|
||||||
|
if (parameters != null)
|
||||||
|
{
|
||||||
|
foreach (string key in parameters.Keys)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 不使用事务的删除方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Delete(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return ExcuteDeleteCommand(cmd, oql, parameters);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 使用事务的删除方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Delete(Connection connection, string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
return ExcuteDeleteCommand(connection.Command, oql, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 更新实体操作
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="operatingRoomPutDoorRegisterDrugsRecords">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int ExcuteUpdateCommand(SqlCommand cmd, OperatingRoomPutDoorRegisterDrugsRecords operatingRoomPutDoorRegisterDrugsRecords)
|
||||||
|
{
|
||||||
|
cmd.CommandText = "update OperatingRoomPutDoorRegisterDrugsRecords set PutDoorRegisterId=@PutDoorRegisterId,HisPatientId=@HisPatientId,DrugsNo=@DrugsNo,DrugsName=@DrugsName,Dosage=@Dosage,IsValid=@IsValid,state=@state,OperatorTime=@OperatorTime where Id=@Id";
|
||||||
|
//从实体中取出值放入Command的参数列表
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@PutDoorRegisterId",operatingRoomPutDoorRegisterDrugsRecords.PutDoorRegisterId.HasValue?(object)operatingRoomPutDoorRegisterDrugsRecords.PutDoorRegisterId.Value:(object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@HisPatientId",operatingRoomPutDoorRegisterDrugsRecords.HisPatientId==null?(object)DBNull.Value:(object)operatingRoomPutDoorRegisterDrugsRecords.HisPatientId));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@DrugsNo",operatingRoomPutDoorRegisterDrugsRecords.DrugsNo==null?(object)DBNull.Value:(object)operatingRoomPutDoorRegisterDrugsRecords.DrugsNo));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@DrugsName",operatingRoomPutDoorRegisterDrugsRecords.DrugsName==null?(object)DBNull.Value:(object)operatingRoomPutDoorRegisterDrugsRecords.DrugsName));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Dosage",operatingRoomPutDoorRegisterDrugsRecords.Dosage.HasValue?(object)operatingRoomPutDoorRegisterDrugsRecords.Dosage.Value:(object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@IsValid",operatingRoomPutDoorRegisterDrugsRecords.IsValid.HasValue?(object)operatingRoomPutDoorRegisterDrugsRecords.IsValid.Value:(object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@state",operatingRoomPutDoorRegisterDrugsRecords.State.HasValue?(object)operatingRoomPutDoorRegisterDrugsRecords.State.Value:(object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@OperatorTime",operatingRoomPutDoorRegisterDrugsRecords.OperatorTime.HasValue?(object)operatingRoomPutDoorRegisterDrugsRecords.OperatorTime.Value:(object)DBNull.Value));
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@Id", operatingRoomPutDoorRegisterDrugsRecords.Id));
|
||||||
|
return cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 不使用事务的更新方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="operatingRoomPutDoorRegisterDrugsRecords">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Update(OperatingRoomPutDoorRegisterDrugsRecords operatingRoomPutDoorRegisterDrugsRecords)
|
||||||
|
{
|
||||||
|
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return ExcuteUpdateCommand(cmd, operatingRoomPutDoorRegisterDrugsRecords);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 使用事务的更新方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
|
/// <param name="operatingRoomPutDoorRegisterDrugsRecords">实体类对象</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Update(Connection connection,OperatingRoomPutDoorRegisterDrugsRecords operatingRoomPutDoorRegisterDrugsRecords)
|
||||||
|
{
|
||||||
|
return ExcuteUpdateCommand(connection.Command, operatingRoomPutDoorRegisterDrugsRecords);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 执行更新命令
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int ExcuteUpdateCommand(SqlCommand cmd, string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
//解析过滤部份Sql语句
|
||||||
|
string updateString = SyntaxAnalyzer.ParseSql(oql, new OperatingRoomPutDoorRegisterDrugsRecordsMap());
|
||||||
|
cmd.CommandText = "update OperatingRoomPutDoorRegisterDrugsRecords set " + updateString;
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
//添加参数
|
||||||
|
if (parameters != null)
|
||||||
|
{
|
||||||
|
foreach (string key in parameters.Keys)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 不使用事务的更新方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Update(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
using (SqlConnection conn = new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return ExcuteUpdateCommand(cmd, oql, parameters);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 使用事务的更新方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">实现共享Connection的对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>影响的记录行数</returns>
|
||||||
|
public static int Update(Connection connection, string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
return ExcuteUpdateCommand(connection.Command, oql, parameters);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询实体集合
|
||||||
|
/// <summary>
|
||||||
|
/// 执行Command获取对象列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象列表</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegisterDrugsRecords> ExcuteSelectCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth)
|
||||||
|
{
|
||||||
|
List<OperatingRoomPutDoorRegisterDrugsRecords> operatingRoomPutDoorRegisterDrugsRecordsList = new List<OperatingRoomPutDoorRegisterDrugsRecords>();
|
||||||
|
using (SqlDataReader dr = cmd.ExecuteReader())
|
||||||
|
{
|
||||||
|
while (dr.Read())
|
||||||
|
{
|
||||||
|
OperatingRoomPutDoorRegisterDrugsRecords operatingRoomPutDoorRegisterDrugsRecords = DataReaderToEntity(dr);
|
||||||
|
operatingRoomPutDoorRegisterDrugsRecordsList.Add(operatingRoomPutDoorRegisterDrugsRecords);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return operatingRoomPutDoorRegisterDrugsRecordsList;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 执行查询命令
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegisterDrugsRecords> ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth)
|
||||||
|
{
|
||||||
|
//解析过滤部份Sql语句
|
||||||
|
string filterString = SyntaxAnalyzer.ParseSql(oql, new OperatingRoomPutDoorRegisterDrugsRecordsMap());
|
||||||
|
if (filterString != string.Empty)
|
||||||
|
{
|
||||||
|
if(filterString.Trim().ToLower().IndexOf("order ")!=0)
|
||||||
|
filterString = " where " + filterString;
|
||||||
|
}
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
cmd.CommandText = "select * from OperatingRoomPutDoorRegisterDrugsRecords " + filterString;
|
||||||
|
//添加参数
|
||||||
|
if (parameters != null)
|
||||||
|
{
|
||||||
|
foreach (string key in parameters.Keys)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegisterDrugsRecords> Select()
|
||||||
|
{
|
||||||
|
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
cmd.CommandText = "select * from OperatingRoomPutDoorRegisterDrugsRecords";
|
||||||
|
return ExcuteSelectCommand(cmd, RecursiveType.Parent, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegisterDrugsRecords> Select(RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
cmd.CommandText = "select * from OperatingRoomPutDoorRegisterDrugsRecords";
|
||||||
|
return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegisterDrugsRecords> Select(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return ExcuteSelectCommand(cmd, oql, parameters, RecursiveType.Parent, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句查询实体集合
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegisterDrugsRecords> Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return ExcuteSelectCommand(cmd, oql, parameters, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据对象查询语句查询实体集合(启用事务)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">连接对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象集合</returns>
|
||||||
|
public static List<OperatingRoomPutDoorRegisterDrugsRecords> Select(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
return ExcuteSelectCommand(connection.Command, oql, parameters,recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询单个实体
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 递归查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegisterDrugsRecords ExcuteSelectSingleCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth)
|
||||||
|
{
|
||||||
|
OperatingRoomPutDoorRegisterDrugsRecords operatingRoomPutDoorRegisterDrugsRecords=null;
|
||||||
|
using (SqlDataReader dr = cmd.ExecuteReader())
|
||||||
|
{
|
||||||
|
if(dr.Read())
|
||||||
|
operatingRoomPutDoorRegisterDrugsRecords = DataReaderToEntity(dr);
|
||||||
|
}
|
||||||
|
if(operatingRoomPutDoorRegisterDrugsRecords==null)
|
||||||
|
return operatingRoomPutDoorRegisterDrugsRecords;
|
||||||
|
return operatingRoomPutDoorRegisterDrugsRecords;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 更据对象查询语句递归查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegisterDrugsRecords ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth)
|
||||||
|
{
|
||||||
|
//解析过滤部份Sql语句
|
||||||
|
string filterString = SyntaxAnalyzer.ParseSql(oql, new OperatingRoomPutDoorRegisterDrugsRecordsMap());
|
||||||
|
if(filterString!=string.Empty)
|
||||||
|
{
|
||||||
|
filterString=" where "+filterString;
|
||||||
|
}
|
||||||
|
cmd.CommandText = "select * from OperatingRoomPutDoorRegisterDrugsRecords " + filterString;
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
//添加参数
|
||||||
|
if (parameters != null)
|
||||||
|
{
|
||||||
|
foreach (string key in parameters.Keys)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Add(new SqlParameter(key, parameters[key]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更据对象查询语句递归查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegisterDrugsRecords SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return ExcuteSelectSingleCommand(cmd, oql, parameters, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更据对象查询语句查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegisterDrugsRecords SelectSingle(string oql, ParameterList parameters)
|
||||||
|
{
|
||||||
|
return SelectSingle(oql,parameters,RecursiveType.Parent,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更据对象查询语句并启用事务查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">连接对象</param>
|
||||||
|
/// <param name="oql">对象查询语句</param>
|
||||||
|
/// <param name="parameters">参数列表</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegisterDrugsRecords SelectSingle(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
return ExcuteSelectSingleCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更据主键值递归查询单个实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="cmd">Command对象</param>
|
||||||
|
/// <param name="id">主键值</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegisterDrugsRecords SelectSingle(SqlCommand cmd, int? id,RecursiveType recursiveType,int recursiveDepth)
|
||||||
|
{
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
if(id.HasValue)
|
||||||
|
{
|
||||||
|
cmd.CommandText = "select * from OperatingRoomPutDoorRegisterDrugsRecords where Id=@pk";
|
||||||
|
cmd.Parameters.Add(new SqlParameter("@pk",id.Value));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cmd.CommandText = "select * from OperatingRoomPutDoorRegisterDrugsRecords where Id is null";
|
||||||
|
}
|
||||||
|
return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 按主键字段查询特定实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">主键值</param>
|
||||||
|
/// <returns>实体类对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegisterDrugsRecords SelectSingle(int? id)
|
||||||
|
{
|
||||||
|
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return SelectSingle(cmd,id,RecursiveType.Parent,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 按主键字段查询特定实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">主键值</param>
|
||||||
|
/// <param name="recursiveType">递归类型</param>
|
||||||
|
/// <param name="recursiveDepth">递归深度</param>
|
||||||
|
/// <returns>实体类对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegisterDrugsRecords SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
using(SqlConnection conn=new SqlConnection(Connection.ConnectionString))
|
||||||
|
{
|
||||||
|
conn.Open();
|
||||||
|
using (SqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
return SelectSingle(cmd,id, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 使用事务并按主键字段查询特定实体
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connection">连接对象</param>
|
||||||
|
/// <param name="id">主键值</param>
|
||||||
|
/// <returns>实体类对象</returns>
|
||||||
|
public static OperatingRoomPutDoorRegisterDrugsRecords SelectSingle(Connection connection,int? id, RecursiveType recursiveType, int recursiveDepth)
|
||||||
|
{
|
||||||
|
return SelectSingle(connection.Command, id, recursiveType, recursiveDepth);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 从DataReader中取出值生成实体对象
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="searcher">查询对象</param>
|
||||||
|
/// <returns>过滤条件字符串</returns>
|
||||||
|
private static OperatingRoomPutDoorRegisterDrugsRecords DataReaderToEntity(SqlDataReader dr)
|
||||||
|
{
|
||||||
|
OperatingRoomPutDoorRegisterDrugsRecords entity = new OperatingRoomPutDoorRegisterDrugsRecords ();
|
||||||
|
if(dr["Id"]!=System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Id=Convert.ToInt32(dr["Id"]);
|
||||||
|
}
|
||||||
|
if(dr["PutDoorRegisterId"]!=System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.PutDoorRegisterId=Convert.ToInt32(dr["PutDoorRegisterId"]);
|
||||||
|
}
|
||||||
|
if(dr["HisPatientId"]!=System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.HisPatientId=dr["HisPatientId"].ToString();
|
||||||
|
}
|
||||||
|
if(dr["DrugsNo"]!=System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.DrugsNo=dr["DrugsNo"].ToString();
|
||||||
|
}
|
||||||
|
if(dr["DrugsName"]!=System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.DrugsName=dr["DrugsName"].ToString();
|
||||||
|
}
|
||||||
|
if(dr["Dosage"]!=System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.Dosage=Convert.ToDecimal(dr["Dosage"]);
|
||||||
|
}
|
||||||
|
if(dr["IsValid"]!=System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.IsValid=Convert.ToInt32(dr["IsValid"]);
|
||||||
|
}
|
||||||
|
if(dr["state"]!=System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.State=Convert.ToInt32(dr["state"]);
|
||||||
|
}
|
||||||
|
if(dr["OperatorTime"]!=System.DBNull.Value)
|
||||||
|
{
|
||||||
|
entity.OperatorTime=Convert.ToDateTime(dr["OperatorTime"]);
|
||||||
|
}
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
542
AIMSEntity/Model/AutoGenerate/OperatingRoomPutDoorRegister.cs
Normal file
542
AIMSEntity/Model/AutoGenerate/OperatingRoomPutDoorRegister.cs
Normal file
@ -0,0 +1,542 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AIMSModel
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
public partial class OperatingRoomPutDoorRegister
|
||||||
|
{
|
||||||
|
private int? id;
|
||||||
|
private string patientId;
|
||||||
|
private string hISPatientId;
|
||||||
|
private string inHospitalNo;
|
||||||
|
private string visitId;
|
||||||
|
private string patientModel;
|
||||||
|
private string patientDeptNo;
|
||||||
|
private string patientDeptName;
|
||||||
|
private string patientBedNo;
|
||||||
|
private string name;
|
||||||
|
private string sex;
|
||||||
|
private string age;
|
||||||
|
private DateTime? birthDay;
|
||||||
|
private Decimal? height;
|
||||||
|
private Decimal? weight;
|
||||||
|
private string idEntityNo;
|
||||||
|
private string tel;
|
||||||
|
private string address;
|
||||||
|
private string contacts;
|
||||||
|
private string contactsTel;
|
||||||
|
private string operationType;
|
||||||
|
private int? isPlanAgainOperation;
|
||||||
|
private string execDeptNo;
|
||||||
|
private string execDeptName;
|
||||||
|
private string anaesthesiaMethod;
|
||||||
|
private int? isPainClinic;
|
||||||
|
private string painTreatment;
|
||||||
|
private string painTreatmentRemark;
|
||||||
|
private string diagnose;
|
||||||
|
private string diagnoseRemark;
|
||||||
|
private string operation;
|
||||||
|
private string oPerationRemark;
|
||||||
|
private string anaesthesia;
|
||||||
|
private string anaesthesiaRemark;
|
||||||
|
private string aSALevel;
|
||||||
|
private string operationLevel;
|
||||||
|
private string operationPosition;
|
||||||
|
private string anaesthesiaDrugs;
|
||||||
|
private string complication;
|
||||||
|
private string operationSituation;
|
||||||
|
private DateTime? operationDate;
|
||||||
|
private DateTime? anaesthesiaBeginTime;
|
||||||
|
private DateTime? anaesthesiaEndTime;
|
||||||
|
private DateTime? operationBeginTime;
|
||||||
|
private DateTime? operationEndTime;
|
||||||
|
private string operationDoctorNo;
|
||||||
|
private string operationDoctorName;
|
||||||
|
private string anaesthesiaDoctorNo;
|
||||||
|
private string anaesthesiaDoctorName;
|
||||||
|
private string instrumentNurseNo;
|
||||||
|
private string instrumentNurseName;
|
||||||
|
private string tourNurseNo;
|
||||||
|
private string tourNurseName;
|
||||||
|
private int? isValid;
|
||||||
|
private int? state;
|
||||||
|
private string opeatorNo;
|
||||||
|
private DateTime? operatorTime;
|
||||||
|
private string remark;
|
||||||
|
private string hCode;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编号,自增
|
||||||
|
/// </summary>
|
||||||
|
public int? Id
|
||||||
|
{
|
||||||
|
get{ return id; }
|
||||||
|
set{ id=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 患者Id
|
||||||
|
/// </summary>
|
||||||
|
public string PatientId
|
||||||
|
{
|
||||||
|
get{ return patientId; }
|
||||||
|
set{ patientId=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 患者HISId
|
||||||
|
/// </summary>
|
||||||
|
public string HISPatientId
|
||||||
|
{
|
||||||
|
get{ return hISPatientId; }
|
||||||
|
set{ hISPatientId=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 住院/门诊(编号)
|
||||||
|
/// </summary>
|
||||||
|
public string InHospitalNo
|
||||||
|
{
|
||||||
|
get{ return inHospitalNo; }
|
||||||
|
set{ inHospitalNo=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 住院次数(就诊次数)
|
||||||
|
/// </summary>
|
||||||
|
public string VisitId
|
||||||
|
{
|
||||||
|
get{ return visitId; }
|
||||||
|
set{ visitId=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 患者类别(门诊、住院)
|
||||||
|
/// </summary>
|
||||||
|
public string PatientModel
|
||||||
|
{
|
||||||
|
get{ return patientModel; }
|
||||||
|
set{ patientModel=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 患者科室编号
|
||||||
|
/// </summary>
|
||||||
|
public string PatientDeptNo
|
||||||
|
{
|
||||||
|
get{ return patientDeptNo; }
|
||||||
|
set{ patientDeptNo=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 患者科室名称
|
||||||
|
/// </summary>
|
||||||
|
public string PatientDeptName
|
||||||
|
{
|
||||||
|
get{ return patientDeptName; }
|
||||||
|
set{ patientDeptName=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 床位
|
||||||
|
/// </summary>
|
||||||
|
public string PatientBedNo
|
||||||
|
{
|
||||||
|
get{ return patientBedNo; }
|
||||||
|
set{ patientBedNo=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 姓名
|
||||||
|
/// </summary>
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get{ return name; }
|
||||||
|
set{ name=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 性别
|
||||||
|
/// </summary>
|
||||||
|
public string Sex
|
||||||
|
{
|
||||||
|
get{ return sex; }
|
||||||
|
set{ sex=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 年龄
|
||||||
|
/// </summary>
|
||||||
|
public string Age
|
||||||
|
{
|
||||||
|
get{ return age; }
|
||||||
|
set{ age=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 出生日期
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? BirthDay
|
||||||
|
{
|
||||||
|
get{ return birthDay; }
|
||||||
|
set{ birthDay=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 身高
|
||||||
|
/// </summary>
|
||||||
|
public Decimal? Height
|
||||||
|
{
|
||||||
|
get{ return height; }
|
||||||
|
set{ height=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 体重
|
||||||
|
/// </summary>
|
||||||
|
public Decimal? Weight
|
||||||
|
{
|
||||||
|
get{ return weight; }
|
||||||
|
set{ weight=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 身份证号码
|
||||||
|
/// </summary>
|
||||||
|
public string IdEntityNo
|
||||||
|
{
|
||||||
|
get{ return idEntityNo; }
|
||||||
|
set{ idEntityNo=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 电话
|
||||||
|
/// </summary>
|
||||||
|
public string Tel
|
||||||
|
{
|
||||||
|
get{ return tel; }
|
||||||
|
set{ tel=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 住址
|
||||||
|
/// </summary>
|
||||||
|
public string Address
|
||||||
|
{
|
||||||
|
get{ return address; }
|
||||||
|
set{ address=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 联系人
|
||||||
|
/// </summary>
|
||||||
|
public string Contacts
|
||||||
|
{
|
||||||
|
get{ return contacts; }
|
||||||
|
set{ contacts=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 联系人电话
|
||||||
|
/// </summary>
|
||||||
|
public string ContactsTel
|
||||||
|
{
|
||||||
|
get{ return contactsTel; }
|
||||||
|
set{ contactsTel=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 手术类型(择期、急诊、日间)
|
||||||
|
/// </summary>
|
||||||
|
public string OperationType
|
||||||
|
{
|
||||||
|
get{ return operationType; }
|
||||||
|
set{ operationType=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 是否计划再次手术
|
||||||
|
/// </summary>
|
||||||
|
public int? IsPlanAgainOperation
|
||||||
|
{
|
||||||
|
get{ return isPlanAgainOperation; }
|
||||||
|
set{ isPlanAgainOperation=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 执行科室编号
|
||||||
|
/// </summary>
|
||||||
|
public string ExecDeptNo
|
||||||
|
{
|
||||||
|
get{ return execDeptNo; }
|
||||||
|
set{ execDeptNo=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 执行科室名称
|
||||||
|
/// </summary>
|
||||||
|
public string ExecDeptName
|
||||||
|
{
|
||||||
|
get{ return execDeptName; }
|
||||||
|
set{ execDeptName=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 其他麻醉方式(分娩镇痛,无痛人流、无痛胃镜、无痛肠镜、无痛气管镜、无痛介入、急救插管、ERCP、MECT)等
|
||||||
|
/// </summary>
|
||||||
|
public string AnaesthesiaMethod
|
||||||
|
{
|
||||||
|
get{ return anaesthesiaMethod; }
|
||||||
|
set{ anaesthesiaMethod=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 是否疼痛门诊
|
||||||
|
/// </summary>
|
||||||
|
public int? IsPainClinic
|
||||||
|
{
|
||||||
|
get{ return isPainClinic; }
|
||||||
|
set{ isPainClinic=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 疼痛治疗
|
||||||
|
/// </summary>
|
||||||
|
public string PainTreatment
|
||||||
|
{
|
||||||
|
get{ return painTreatment; }
|
||||||
|
set{ painTreatment=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 疼痛治疗备注
|
||||||
|
/// </summary>
|
||||||
|
public string PainTreatmentRemark
|
||||||
|
{
|
||||||
|
get{ return painTreatmentRemark; }
|
||||||
|
set{ painTreatmentRemark=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 诊断
|
||||||
|
/// </summary>
|
||||||
|
public string Diagnose
|
||||||
|
{
|
||||||
|
get{ return diagnose; }
|
||||||
|
set{ diagnose=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 诊断备注
|
||||||
|
/// </summary>
|
||||||
|
public string DiagnoseRemark
|
||||||
|
{
|
||||||
|
get{ return diagnoseRemark; }
|
||||||
|
set{ diagnoseRemark=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 手术
|
||||||
|
/// </summary>
|
||||||
|
public string Operation
|
||||||
|
{
|
||||||
|
get{ return operation; }
|
||||||
|
set{ operation=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 手术备注
|
||||||
|
/// </summary>
|
||||||
|
public string OPerationRemark
|
||||||
|
{
|
||||||
|
get{ return oPerationRemark; }
|
||||||
|
set{ oPerationRemark=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 麻醉
|
||||||
|
/// </summary>
|
||||||
|
public string Anaesthesia
|
||||||
|
{
|
||||||
|
get{ return anaesthesia; }
|
||||||
|
set{ anaesthesia=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 麻醉备注
|
||||||
|
/// </summary>
|
||||||
|
public string AnaesthesiaRemark
|
||||||
|
{
|
||||||
|
get{ return anaesthesiaRemark; }
|
||||||
|
set{ anaesthesiaRemark=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// ASA分级
|
||||||
|
/// </summary>
|
||||||
|
public string ASALevel
|
||||||
|
{
|
||||||
|
get{ return aSALevel; }
|
||||||
|
set{ aSALevel=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 手术分级
|
||||||
|
/// </summary>
|
||||||
|
public string OperationLevel
|
||||||
|
{
|
||||||
|
get{ return operationLevel; }
|
||||||
|
set{ operationLevel=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 手术体位
|
||||||
|
/// </summary>
|
||||||
|
public string OperationPosition
|
||||||
|
{
|
||||||
|
get{ return operationPosition; }
|
||||||
|
set{ operationPosition=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 麻醉用药
|
||||||
|
/// </summary>
|
||||||
|
public string AnaesthesiaDrugs
|
||||||
|
{
|
||||||
|
get{ return anaesthesiaDrugs; }
|
||||||
|
set{ anaesthesiaDrugs=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 合并症
|
||||||
|
/// </summary>
|
||||||
|
public string Complication
|
||||||
|
{
|
||||||
|
get{ return complication; }
|
||||||
|
set{ complication=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 术中情况
|
||||||
|
/// </summary>
|
||||||
|
public string OperationSituation
|
||||||
|
{
|
||||||
|
get{ return operationSituation; }
|
||||||
|
set{ operationSituation=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 手术日期
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? OperationDate
|
||||||
|
{
|
||||||
|
get{ return operationDate; }
|
||||||
|
set{ operationDate=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 麻醉开始时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? AnaesthesiaBeginTime
|
||||||
|
{
|
||||||
|
get{ return anaesthesiaBeginTime; }
|
||||||
|
set{ anaesthesiaBeginTime=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 麻醉结束时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? AnaesthesiaEndTime
|
||||||
|
{
|
||||||
|
get{ return anaesthesiaEndTime; }
|
||||||
|
set{ anaesthesiaEndTime=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 手术开始时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? OperationBeginTime
|
||||||
|
{
|
||||||
|
get{ return operationBeginTime; }
|
||||||
|
set{ operationBeginTime=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 手术结束时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? OperationEndTime
|
||||||
|
{
|
||||||
|
get{ return operationEndTime; }
|
||||||
|
set{ operationEndTime=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 手术医生工号
|
||||||
|
/// </summary>
|
||||||
|
public string OperationDoctorNo
|
||||||
|
{
|
||||||
|
get{ return operationDoctorNo; }
|
||||||
|
set{ operationDoctorNo=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 手术医生姓名
|
||||||
|
/// </summary>
|
||||||
|
public string OperationDoctorName
|
||||||
|
{
|
||||||
|
get{ return operationDoctorName; }
|
||||||
|
set{ operationDoctorName=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 麻醉医生工号
|
||||||
|
/// </summary>
|
||||||
|
public string AnaesthesiaDoctorNo
|
||||||
|
{
|
||||||
|
get{ return anaesthesiaDoctorNo; }
|
||||||
|
set{ anaesthesiaDoctorNo=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 麻醉医生姓名
|
||||||
|
/// </summary>
|
||||||
|
public string AnaesthesiaDoctorName
|
||||||
|
{
|
||||||
|
get{ return anaesthesiaDoctorName; }
|
||||||
|
set{ anaesthesiaDoctorName=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 器械护士工号
|
||||||
|
/// </summary>
|
||||||
|
public string InstrumentNurseNo
|
||||||
|
{
|
||||||
|
get{ return instrumentNurseNo; }
|
||||||
|
set{ instrumentNurseNo=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 器械护士姓名
|
||||||
|
/// </summary>
|
||||||
|
public string InstrumentNurseName
|
||||||
|
{
|
||||||
|
get{ return instrumentNurseName; }
|
||||||
|
set{ instrumentNurseName=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 巡回护士工号
|
||||||
|
/// </summary>
|
||||||
|
public string TourNurseNo
|
||||||
|
{
|
||||||
|
get{ return tourNurseNo; }
|
||||||
|
set{ tourNurseNo=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 巡回护士姓名
|
||||||
|
/// </summary>
|
||||||
|
public string TourNurseName
|
||||||
|
{
|
||||||
|
get{ return tourNurseName; }
|
||||||
|
set{ tourNurseName=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有效
|
||||||
|
/// </summary>
|
||||||
|
public int? IsValid
|
||||||
|
{
|
||||||
|
get{ return isValid; }
|
||||||
|
set{ isValid=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
public int? State
|
||||||
|
{
|
||||||
|
get{ return state; }
|
||||||
|
set{ state=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 登记人工号
|
||||||
|
/// </summary>
|
||||||
|
public string OpeatorNo
|
||||||
|
{
|
||||||
|
get{ return opeatorNo; }
|
||||||
|
set{ opeatorNo=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 登记时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? OperatorTime
|
||||||
|
{
|
||||||
|
get{ return operatorTime; }
|
||||||
|
set{ operatorTime=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
public string Remark
|
||||||
|
{
|
||||||
|
get{ return remark; }
|
||||||
|
set{ remark=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 拼音码
|
||||||
|
/// </summary>
|
||||||
|
public string HCode
|
||||||
|
{
|
||||||
|
get{ return hCode; }
|
||||||
|
set{ hCode=value; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,92 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace AIMSModel
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
public partial class OperatingRoomPutDoorRegisterDrugsRecords
|
||||||
|
{
|
||||||
|
private int? id;
|
||||||
|
private int? putDoorRegisterId;
|
||||||
|
private string hisPatientId;
|
||||||
|
private string drugsNo;
|
||||||
|
private string drugsName;
|
||||||
|
private Decimal? dosage;
|
||||||
|
private int? isValid;
|
||||||
|
private int? state;
|
||||||
|
private DateTime? operatorTime;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 编号,自增
|
||||||
|
/// </summary>
|
||||||
|
public int? Id
|
||||||
|
{
|
||||||
|
get{ return id; }
|
||||||
|
set{ id=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 手术室外登记编号
|
||||||
|
/// </summary>
|
||||||
|
public int? PutDoorRegisterId
|
||||||
|
{
|
||||||
|
get{ return putDoorRegisterId; }
|
||||||
|
set{ putDoorRegisterId=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 患者His编号
|
||||||
|
/// </summary>
|
||||||
|
public string HisPatientId
|
||||||
|
{
|
||||||
|
get{ return hisPatientId; }
|
||||||
|
set{ hisPatientId=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 药品编号
|
||||||
|
/// </summary>
|
||||||
|
public string DrugsNo
|
||||||
|
{
|
||||||
|
get{ return drugsNo; }
|
||||||
|
set{ drugsNo=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 药品名称
|
||||||
|
/// </summary>
|
||||||
|
public string DrugsName
|
||||||
|
{
|
||||||
|
get{ return drugsName; }
|
||||||
|
set{ drugsName=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 使用剂量
|
||||||
|
/// </summary>
|
||||||
|
public Decimal? Dosage
|
||||||
|
{
|
||||||
|
get{ return dosage; }
|
||||||
|
set{ dosage=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有效
|
||||||
|
/// </summary>
|
||||||
|
public int? IsValid
|
||||||
|
{
|
||||||
|
get{ return isValid; }
|
||||||
|
set{ isValid=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
public int? State
|
||||||
|
{
|
||||||
|
get{ return state; }
|
||||||
|
set{ state=value; }
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 登记时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? OperatorTime
|
||||||
|
{
|
||||||
|
get{ return operatorTime; }
|
||||||
|
set{ operatorTime=value; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace AIMSObjectQuery
|
||||||
|
{
|
||||||
|
internal partial class OperatingRoomPutDoorRegisterDrugsRecordsMap:IMap
|
||||||
|
{
|
||||||
|
private Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
||||||
|
public OperatingRoomPutDoorRegisterDrugsRecordsMap()
|
||||||
|
{
|
||||||
|
dictionary.Add("id", "Id");
|
||||||
|
dictionary.Add("putdoorregisterid", "PutDoorRegisterId");
|
||||||
|
dictionary.Add("hispatientid", "HisPatientId");
|
||||||
|
dictionary.Add("drugsno", "DrugsNo");
|
||||||
|
dictionary.Add("drugsname", "DrugsName");
|
||||||
|
dictionary.Add("dosage", "Dosage");
|
||||||
|
dictionary.Add("isvalid", "IsValid");
|
||||||
|
dictionary.Add("state", "state");
|
||||||
|
dictionary.Add("operatortime", "OperatorTime");
|
||||||
|
}
|
||||||
|
|
||||||
|
#region IMap 成员
|
||||||
|
|
||||||
|
public string this[string propertyName]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return dictionary[propertyName.ToLower()];
|
||||||
|
}
|
||||||
|
catch (KeyNotFoundException)
|
||||||
|
{
|
||||||
|
throw new Exception(propertyName + "属性不存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
92
AIMSEntity/ObjectQuery/OperatingRoomPutDoorRegisterMap.cs
Normal file
92
AIMSEntity/ObjectQuery/OperatingRoomPutDoorRegisterMap.cs
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace AIMSObjectQuery
|
||||||
|
{
|
||||||
|
internal partial class OperatingRoomPutDoorRegisterMap:IMap
|
||||||
|
{
|
||||||
|
private Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
||||||
|
public OperatingRoomPutDoorRegisterMap()
|
||||||
|
{
|
||||||
|
dictionary.Add("id", "Id");
|
||||||
|
dictionary.Add("patientid", "PatientId");
|
||||||
|
dictionary.Add("hispatientid", "HISPatientId");
|
||||||
|
dictionary.Add("inhospitalno", "InHospitalNo");
|
||||||
|
dictionary.Add("visitid", "VisitId");
|
||||||
|
dictionary.Add("patientmodel", "PatientModel");
|
||||||
|
dictionary.Add("patientdeptno", "PatientDeptNo");
|
||||||
|
dictionary.Add("patientdeptname", "PatientDeptName");
|
||||||
|
dictionary.Add("patientbedno", "PatientBedNo");
|
||||||
|
dictionary.Add("name", "Name");
|
||||||
|
dictionary.Add("sex", "Sex");
|
||||||
|
dictionary.Add("age", "Age");
|
||||||
|
dictionary.Add("birthday", "BirthDay");
|
||||||
|
dictionary.Add("height", "Height");
|
||||||
|
dictionary.Add("weight", "Weight");
|
||||||
|
dictionary.Add("identityno", "IdEntityNo");
|
||||||
|
dictionary.Add("tel", "Tel");
|
||||||
|
dictionary.Add("address", "Address");
|
||||||
|
dictionary.Add("contacts", "Contacts");
|
||||||
|
dictionary.Add("contactstel", "ContactsTel");
|
||||||
|
dictionary.Add("operationtype", "OperationType");
|
||||||
|
dictionary.Add("isplanagainoperation", "IsPlanAgainOperation");
|
||||||
|
dictionary.Add("execdeptno", "ExecDeptNo");
|
||||||
|
dictionary.Add("execdeptname", "ExecDeptName");
|
||||||
|
dictionary.Add("anaesthesiamethod", "AnaesthesiaMethod");
|
||||||
|
dictionary.Add("ispainclinic", "IsPainClinic");
|
||||||
|
dictionary.Add("paintreatment", "PainTreatment");
|
||||||
|
dictionary.Add("paintreatmentremark", "PainTreatmentRemark");
|
||||||
|
dictionary.Add("diagnose", "Diagnose");
|
||||||
|
dictionary.Add("diagnoseremark", "DiagnoseRemark");
|
||||||
|
dictionary.Add("operation", "Operation");
|
||||||
|
dictionary.Add("operationremark", "OPerationRemark");
|
||||||
|
dictionary.Add("anaesthesia", "Anaesthesia");
|
||||||
|
dictionary.Add("anaesthesiaremark", "AnaesthesiaRemark");
|
||||||
|
dictionary.Add("asalevel", "ASALevel");
|
||||||
|
dictionary.Add("operationlevel", "OperationLevel");
|
||||||
|
dictionary.Add("operationposition", "OperationPosition");
|
||||||
|
dictionary.Add("anaesthesiadrugs", "AnaesthesiaDrugs");
|
||||||
|
dictionary.Add("complication", "Complication");
|
||||||
|
dictionary.Add("operationsituation", "OperationSituation");
|
||||||
|
dictionary.Add("operationdate", "OperationDate");
|
||||||
|
dictionary.Add("anaesthesiabegintime", "AnaesthesiaBeginTime");
|
||||||
|
dictionary.Add("anaesthesiaendtime", "AnaesthesiaEndTime");
|
||||||
|
dictionary.Add("operationbegintime", "OperationBeginTime");
|
||||||
|
dictionary.Add("operationendtime", "OperationEndTime");
|
||||||
|
dictionary.Add("operationdoctorno", "OperationDoctorNo");
|
||||||
|
dictionary.Add("operationdoctorname", "OperationDoctorName");
|
||||||
|
dictionary.Add("anaesthesiadoctorno", "AnaesthesiaDoctorNo");
|
||||||
|
dictionary.Add("anaesthesiadoctorname", "AnaesthesiaDoctorName");
|
||||||
|
dictionary.Add("instrumentnurseno", "InstrumentNurseNo");
|
||||||
|
dictionary.Add("instrumentnursename", "InstrumentNurseName");
|
||||||
|
dictionary.Add("tournurseno", "TourNurseNo");
|
||||||
|
dictionary.Add("tournursename", "TourNurseName");
|
||||||
|
dictionary.Add("isvalid", "IsValid");
|
||||||
|
dictionary.Add("state", "State");
|
||||||
|
dictionary.Add("opeatorno", "OpeatorNo");
|
||||||
|
dictionary.Add("operatortime", "OperatorTime");
|
||||||
|
dictionary.Add("remark", "Remark");
|
||||||
|
dictionary.Add("hcode", "HCode");
|
||||||
|
}
|
||||||
|
|
||||||
|
#region IMap 成员
|
||||||
|
|
||||||
|
public string this[string propertyName]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return dictionary[propertyName.ToLower()];
|
||||||
|
}
|
||||||
|
catch (KeyNotFoundException)
|
||||||
|
{
|
||||||
|
throw new Exception(propertyName + "属性不存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user