From 54e3ec3fd4b37f5e99764e144625b7cf08f4cd10 Mon Sep 17 00:00:00 2001 From: leomo Date: Sat, 29 Oct 2022 23:57:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E6=9C=AF=E9=97=B4=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=20=E6=9C=AF=E4=B8=AD=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=80=A7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AIMS/AIMS.csproj | 21 +- AIMS/DataDictionary/frmBasicDictionary.cs | 21 +- .../frmDepartment.Designer.cs | 0 .../frmDepartment.cs | 0 .../frmDepartment.resx | 0 AIMS/DataDictionary/frmOperationRoom.cs | 277 ++++++++ .../frmOperationRoom.designer.cs | 571 +++++++++++++++ AIMS/DataDictionary/frmOperationRoom.resx | 147 ++++ .../frmPerson.Designer.cs | 40 +- .../{PublicUI => DataDictionary}/frmPerson.cs | 39 +- .../frmPerson.resx | 45 -- AIMS/FormMainManage.designer.cs | Bin 204310 -> 205464 bytes AIMS/FormMainManage.resx | 48 +- .../AnasRecordBill/DrawAnasReordBill.cs | 2 +- .../AnasRecordBill/frmAnasRecordBill2.cs | 61 +- .../AnasRecordBill/frmSelectPatientNew2.cs | 21 + .../frmOperationApplyDetail.Designer.cs | 67 +- .../OperationFront/frmOperationApplyDetail.cs | 2 + AIMSEntity/BLL/Extension/BPerson.cs | 4 +- .../DAL/AutoGenerate/DBasicDictionary.cs | 4 +- AIMSEntity/DAL/AutoGenerate/DOperationRoom.cs | 480 +++++++------ AIMSEntity/DAL/AutoGenerate/DOrisPatient.cs | 672 ++++++++++-------- AIMSEntity/DAL/Extension/DPerson.cs | 16 +- AIMSEntity/Extensions/SelectPatient.cs | 6 + .../Model/AutoGenerate/OperationRoom.cs | 32 +- AIMSEntity/Model/AutoGenerate/OrisPatient.cs | 104 ++- AIMSEntity/ObjectQuery/OperationRoomMap.cs | 1 + AIMSEntity/ObjectQuery/OrisPatientMap.cs | 10 + 28 files changed, 1965 insertions(+), 726 deletions(-) rename AIMS/{PublicUI => DataDictionary}/frmDepartment.Designer.cs (100%) rename AIMS/{PublicUI => DataDictionary}/frmDepartment.cs (100%) rename AIMS/{PublicUI => DataDictionary}/frmDepartment.resx (100%) create mode 100644 AIMS/DataDictionary/frmOperationRoom.cs create mode 100644 AIMS/DataDictionary/frmOperationRoom.designer.cs create mode 100644 AIMS/DataDictionary/frmOperationRoom.resx rename AIMS/{PublicUI => DataDictionary}/frmPerson.Designer.cs (97%) rename AIMS/{PublicUI => DataDictionary}/frmPerson.cs (87%) rename AIMS/{PublicUI => DataDictionary}/frmPerson.resx (75%) diff --git a/AIMS/AIMS.csproj b/AIMS/AIMS.csproj index 0671097..f0be091 100644 --- a/AIMS/AIMS.csproj +++ b/AIMS/AIMS.csproj @@ -123,6 +123,12 @@ frmOperation.cs + + Form + + + frmOperationRoom.cs + Form @@ -676,10 +682,10 @@ frmCreateTemplate.cs - + Form - + frmDepartment.cs @@ -730,10 +736,10 @@ frmOperationPosition.cs - + Form - + frmPerson.cs @@ -900,6 +906,9 @@ frmOperation.cs + + frmOperationRoom.cs + frmOutputLiquids.cs @@ -1180,7 +1189,7 @@ frmCreateTemplate.cs - + frmDepartment.cs @@ -1207,7 +1216,7 @@ frmOperationPosition.cs - + frmPerson.cs diff --git a/AIMS/DataDictionary/frmBasicDictionary.cs b/AIMS/DataDictionary/frmBasicDictionary.cs index afbf938..36f4dc1 100644 --- a/AIMS/DataDictionary/frmBasicDictionary.cs +++ b/AIMS/DataDictionary/frmBasicDictionary.cs @@ -15,7 +15,7 @@ namespace DataDictionary.UI { public AIMSExtension.EditState _state; public List BasicDictionaryObjList; - // private BasicDictionary BasicDictionaryRowData; + // private BasicDictionary BasicDictionaryRowData; public frmBasicDictionary() { InitializeComponent(); @@ -34,7 +34,7 @@ namespace DataDictionary.UI AIMSExtension.PublicMethod.EnabledControl(panel4, false); _state = AIMSExtension.EditState.BROWSE; InitTreeView(); - + } @@ -60,7 +60,7 @@ namespace DataDictionary.UI BuildChildNode(BasicDictionaryObj.Children[i], Node); } } - + private void tsbAdd_Click(object sender, EventArgs e) @@ -103,7 +103,7 @@ namespace DataDictionary.UI chkIsValid.Checked = false; } } - + } private void tsbCancel_Click(object sender, EventArgs e) @@ -118,7 +118,7 @@ namespace DataDictionary.UI { BasicDictionary BasicDictionaryObj = new BasicDictionary(); if (ValidInput()) - { + { BasicDictionaryObj.Name = txtName.Text.Trim(); BasicDictionaryObj.HelpCode = txtHelpCode.Text.Trim(); @@ -155,9 +155,10 @@ namespace DataDictionary.UI AIMSExtension.PublicMethod.ClearControl(panel4); intOrder.Text = "0"; - dgvBasicDictionary.DataSource = BBasicDictionary.GetDataDictionaryDataTable(BasicDictionaryObj.ParentId.Value.ToString()); + dgvBasicDictionary.DataSource = BBasicDictionary.GetDataDictionaryDataTable(" ParentId=" + BasicDictionaryObj.ParentId.Value.ToString()); - InitTreeView(); + if (BasicDictionaryObj.ParentId == 0) + InitTreeView(); } private void tsbExit_Click(object sender, EventArgs e) { @@ -184,16 +185,14 @@ namespace DataDictionary.UI } private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) - { - + { if (this.treeView1.SelectedNode.Level == 0) { txtName.Text = ""; } if (this.treeView1.SelectedNode.Level == 1) { - - dgvBasicDictionary.DataSource = BBasicDictionary.GetDataDictionaryDataTable(int.Parse(treeView1.SelectedNode.Parent.Name)); + dgvBasicDictionary.DataSource = BBasicDictionary.GetDataDictionaryDataTable(" ParentId=" + int.Parse(treeView1.SelectedNode.Parent.Name)); } } } diff --git a/AIMS/PublicUI/frmDepartment.Designer.cs b/AIMS/DataDictionary/frmDepartment.Designer.cs similarity index 100% rename from AIMS/PublicUI/frmDepartment.Designer.cs rename to AIMS/DataDictionary/frmDepartment.Designer.cs diff --git a/AIMS/PublicUI/frmDepartment.cs b/AIMS/DataDictionary/frmDepartment.cs similarity index 100% rename from AIMS/PublicUI/frmDepartment.cs rename to AIMS/DataDictionary/frmDepartment.cs diff --git a/AIMS/PublicUI/frmDepartment.resx b/AIMS/DataDictionary/frmDepartment.resx similarity index 100% rename from AIMS/PublicUI/frmDepartment.resx rename to AIMS/DataDictionary/frmDepartment.resx diff --git a/AIMS/DataDictionary/frmOperationRoom.cs b/AIMS/DataDictionary/frmOperationRoom.cs new file mode 100644 index 0000000..ba81820 --- /dev/null +++ b/AIMS/DataDictionary/frmOperationRoom.cs @@ -0,0 +1,277 @@ +using AIMSBLL; +using AIMSExtension; +using AIMSModel; +using System; +using System.Collections.Generic; +using System.Data; +using System.IO; +using System.Linq; +using System.Net; +using System.Windows.Forms; + +namespace DataDictionary.UI +{ + public partial class frmOperationRoom : Form + { + /// + /// 手术间集合 + /// + public List list; + public List listNew = new List(); + public List listOnit = new List(); + public string cboDepartmentText; + /// + /// 声明保存数据时的状态 + /// + public EditState _state; + public frmOperationRoom() + { + InitializeComponent(); + } + + private void frmOperationRoom_Load(object sender, EventArgs e) + { + list = BOperationRoom.Select(" order by Site,[RoomOrder] asc", new ParameterList(), RecursiveType.None, 0); + PublicMethod.EnabledControl(panel1, false); + + //listOnit = BDepartment.Select(" id in (select roomtype from operationroom) order by id desc ", new ParameterList(), RecursiveType.None, 0); + //listOnit.Insert(0, new Department() { Id = -1, Name = "" }); + //this.cboDepartment.Items.AddRange(listOnit.ToArray()); + //cboDepartment.ValueMember = "Id"; + //cboDepartment.DisplayMember = "Name"; + //cboDepartment.Text = cboDepartmentText; + //cboDepartment.Enabled = true; + + BindDgv(list); + } + /// + /// 为DataGridView绑定数据 + /// + private void BindDgv(List list) + { + dgvOperationsRoom.AutoGenerateColumns = false; + dgvOperationsRoom.Rows.Clear(); + int num = 1; + foreach (OperationRoom item in list) + { + try + { + int index = this.dgvOperationsRoom.Rows.Add(); + this.dgvOperationsRoom.Rows[index].Cells["Id"].Value = item.Id; + this.dgvOperationsRoom.Rows[index].Cells["Index"].Value = num; + num++; + this.dgvOperationsRoom.Rows[index].Cells["oName"].Value = item.Name; + this.dgvOperationsRoom.Rows[index].Cells["type"].Value = item.Site; + this.dgvOperationsRoom.Rows[index].Cells["Ip1"].Value = item.Ip; + this.dgvOperationsRoom.Rows[index].Cells["OrderBy"].Value = item.RoomOrder; + this.dgvOperationsRoom.Rows[index].Cells["IsValid"].Value = item.IsValid == 1 ? "有效" : "无效"; + } + catch (Exception) + { + } + } + } + /// + /// 退出事件 + /// + /// + /// + private void tsbExit_Click(object sender, EventArgs e) + { + this.Close(); + } + /// + /// 新增事件 + /// + /// + /// + private void tsbAdd_Click(object sender, EventArgs e) + { + //设置状态为新增 + _state = EditState.ADD; + PublicMethod.EnabledControl(panel1, true); + PublicMethod.ClearControl(panel1); + } + /// + /// 修改事件 + /// + /// + /// + private void tsbModify_Click(object sender, EventArgs e) + { + //设置状态为修改 + _state = EditState.EDIT; + if (!(dgvOperationsRoom.SelectedRows.Count > 0)) + { + MessageBox.Show("请选择列表中的一项!"); + return; + } + PublicMethod.EnabledControl(panel1, true); + txtName.Text = dgvOperationsRoom.SelectedRows[0].Cells["oName"].Value.ToString(); + if (dgvOperationsRoom.SelectedRows[0].Cells["Ip1"].EditedFormattedValue.ToString() != "") + { + txtIp1.Text = dgvOperationsRoom.SelectedRows[0].Cells["Ip1"].Value.ToString(); + } + cbotype.Text = dgvOperationsRoom.SelectedRows[0].Cells["type"].Value.ToString(); + txtOrderBy.Text = dgvOperationsRoom.SelectedRows[0].Cells["OrderBy"].Value.ToString(); + chkIsValid.Checked = dgvOperationsRoom.SelectedRows[0].Cells["IsValid"].Value.ToString() == "有效" ? true : false; + + try + { + cboDepartment.Text = dgvOperationsRoom.SelectedRows[0].Cells["DepartmentNameColumn"].EditedFormattedValue.ToString(); + } + catch (Exception) + { + } + } + /// + /// 取消事件 + /// + /// + /// + private void tsbCancel_Click(object sender, EventArgs e) + { + PublicMethod.ClearControl(panel1); + PublicMethod.EnabledControl(panel1, false); + cboDepartment.SelectedIndex = -1; + cboDepartment.Text = ""; + } + /// + /// 保存数据事件 + /// + /// + /// + private void tsbSave_Click(object sender, EventArgs e) + { + if (!ValidInput()) + { + return; + } + if (_state == EditState.ADD && dgvOperationsRoom.Rows.Count > 0 && PublicMethod.ValidDataGridViewExistsItemName(dgvOperationsRoom, "oName", txtName.Text.Trim())) + { + MessageBox.Show("该手术间已存在,请重新输入!"); + txtName.Focus(); + return; + } + OperationRoom opr = new OperationRoom(); + opr.Name = txtName.Text.Trim(); + opr.HelpCode = PublicMethod.GetFirstLetter(txtName.Text.Trim()); + opr.Ip = txtIp1.Text.Trim(); + opr.Site = cbotype.Text.Trim(); + opr.RoomOrder = Convert.ToInt32(txtOrderBy.Text.Trim()); + opr.IsValid = chkIsValid.Checked == true ? 1 : 0; + opr.OperatorName = PublicMethod.OperatorName; + opr.OperatorNo = PublicMethod.OperatorNo; + opr.OperateDate = DateTime.Now; + int num = 0; + if (_state == EditState.ADD) + { + num = BOperationRoom.Insert(opr); + } + else if (_state == EditState.EDIT) + { + opr.Id = Convert.ToInt32(dgvOperationsRoom.SelectedRows[0].Cells["Id"].Value); + num = BOperationRoom.Update(opr); + } + if (num > 0) + { + MessageBox.Show("保存成功!"); + PublicMethod.EnabledControl(panel1, false); + PublicMethod.ClearControl(panel1); + list = BOperationRoom.Select(" order by Site,[RoomOrder] asc", new ParameterList(), RecursiveType.None, 0); ; + BindDgv(list); + } + } + /// + /// 输入验证 + /// + /// + private bool ValidInput() + { + bool key = false; + if (txtName.Text.Trim().Length < 1) + { + MessageBox.Show("请输入手术间!"); + txtName.Focus(); + } + else if (txtIp1.Text.Trim().Length < 1) + { + MessageBox.Show("请输入一个Ip地址!"); + txtIp1.Focus(); + } + else if (txtOrderBy.Text.Trim().Length < 1) + { + MessageBox.Show("请输入排序顺序!"); + txtOrderBy.Focus(); + } + else + { + key = true; + } + return key; + } + /// + /// 判断DataGridView是否显示全部记录 + /// + /// + /// + private void chkAll_CheckedChanged(object sender, EventArgs e) + { + if (chkAll.Checked == true) + { + BindDgv(list); + } + else + { + var results = from p in list + where p.IsValid == 1 + select p; + BindDgv(results.ToList()); + } + } + + private void txtIp1_Leave(object sender, EventArgs e) + { + TextBox tb = (TextBox)sender; + if (tb.Text.Trim().Length == 0) + { + return; + } + IPAddress ip; + if (!IPAddress.TryParse(tb.Text.Trim(), out ip)) + { + MessageBox.Show("非法IP地址,请重新输入!"); + tb.Text = ""; + tb.Focus(); + } + } + + private void cboDepartment_TextUpdate(object sender, EventArgs e) + { + //清空combobox + this.cboDepartment.Items.Clear(); + //清空listNew + listNew.Clear(); + //遍历全部备查数据 + listNew = BDepartment.Select("IsValid=1 and (HCode like '%" + cboDepartment.Text + "%' or Name like '%" + cboDepartment.Text + "%' )", new ParameterList(), RecursiveType.None, 0); + if (listNew.Count <= 0) + { + listNew = BDepartment.Select("IsValid=1 ", new ParameterList(), RecursiveType.None, 0); + listNew.Insert(0, new Department() { Id = -1, Name = "全部科室" }); + } + + //combobox添加已经查到的关键词 + this.cboDepartment.Items.AddRange(listNew.ToArray()); + //设置光标位置,否则光标位置始终保持在第一列,造成输入关键词的倒序排列 + this.cboDepartment.SelectionStart = this.cboDepartment.Text.Length; + //保持鼠标指针原来状态,有时候鼠标指针会被下拉框覆盖,所以要进行一次设置。 + Cursor = Cursors.Default; + //自动弹出下拉框 + this.cboDepartment.DroppedDown = true; + } + + private void tsbClear_Click(object sender, EventArgs e) + { + } + } +} diff --git a/AIMS/DataDictionary/frmOperationRoom.designer.cs b/AIMS/DataDictionary/frmOperationRoom.designer.cs new file mode 100644 index 0000000..801763a --- /dev/null +++ b/AIMS/DataDictionary/frmOperationRoom.designer.cs @@ -0,0 +1,571 @@ +namespace DataDictionary.UI +{ + partial class frmOperationRoom + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.tsbAdd = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.tsbModify = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.tsbCancel = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); + this.tsbSave = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.tsbExit = new System.Windows.Forms.ToolStripButton(); + this.panel1 = new System.Windows.Forms.Panel(); + this.label6 = new System.Windows.Forms.Label(); + this.cboDepartment = new System.Windows.Forms.ComboBox(); + this.txtOrderBy = new AIMS.OremrUserControl.NumTextBox(); + this.chkAll = new System.Windows.Forms.CheckBox(); + this.chkIsValid = new System.Windows.Forms.CheckBox(); + this.label5 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.panel2 = new System.Windows.Forms.Panel(); + this.dgvOperationsRoom = new DevComponents.DotNetBar.Controls.DataGridViewX(); + this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.txtName = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.txtIp1 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cbotype = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.comboItem1 = new DevComponents.Editors.ComboItem(); + this.comboItem2 = new DevComponents.Editors.ComboItem(); + this.Id = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.type = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.oName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Ip1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.DepartmentNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.OrderBy = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.IsValid = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.toolStrip1.SuspendLayout(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvOperationsRoom)).BeginInit(); + this.SuspendLayout(); + // + // toolStrip1 + // + this.toolStrip1.BackColor = System.Drawing.Color.Transparent; + this.toolStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.toolStrip1.Font = new System.Drawing.Font("微软雅黑", 10.5F); + this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.toolStrip1.ImageScalingSize = new System.Drawing.Size(30, 30); + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsbAdd, + this.toolStripSeparator2, + this.tsbModify, + this.toolStripSeparator3, + this.tsbCancel, + this.toolStripSeparator4, + this.tsbSave, + this.toolStripSeparator1, + this.tsbExit}); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(811, 57); + this.toolStrip1.TabIndex = 5; + this.toolStrip1.Text = "toolStrip1"; + // + // tsbAdd + // + this.tsbAdd.Image = global::AIMS.Properties.Resources.图标_新增; + this.tsbAdd.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbAdd.Name = "tsbAdd"; + this.tsbAdd.Size = new System.Drawing.Size(41, 54); + this.tsbAdd.Text = "增加"; + this.tsbAdd.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; + this.tsbAdd.ToolTipText = "增加"; + this.tsbAdd.Click += new System.EventHandler(this.tsbAdd_Click); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(6, 57); + // + // tsbModify + // + this.tsbModify.Image = global::AIMS.Properties.Resources.图标_编辑; + this.tsbModify.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbModify.Name = "tsbModify"; + this.tsbModify.Size = new System.Drawing.Size(41, 54); + this.tsbModify.Text = "修改"; + this.tsbModify.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; + this.tsbModify.Click += new System.EventHandler(this.tsbModify_Click); + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(6, 57); + // + // tsbCancel + // + this.tsbCancel.Image = global::AIMS.Properties.Resources.图标_取消; + this.tsbCancel.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbCancel.Name = "tsbCancel"; + this.tsbCancel.Size = new System.Drawing.Size(41, 54); + this.tsbCancel.Text = "取消"; + this.tsbCancel.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; + this.tsbCancel.Click += new System.EventHandler(this.tsbCancel_Click); + // + // toolStripSeparator4 + // + this.toolStripSeparator4.Name = "toolStripSeparator4"; + this.toolStripSeparator4.Size = new System.Drawing.Size(6, 57); + // + // tsbSave + // + this.tsbSave.Image = global::AIMS.Properties.Resources.图标_保存; + this.tsbSave.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbSave.Name = "tsbSave"; + this.tsbSave.Size = new System.Drawing.Size(41, 54); + this.tsbSave.Text = "保存"; + this.tsbSave.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; + this.tsbSave.Click += new System.EventHandler(this.tsbSave_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(6, 57); + // + // tsbExit + // + this.tsbExit.Image = global::AIMS.Properties.Resources.图标_关闭当前页; + this.tsbExit.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsbExit.Name = "tsbExit"; + this.tsbExit.Size = new System.Drawing.Size(41, 54); + this.tsbExit.Text = "关闭"; + this.tsbExit.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; + this.tsbExit.Click += new System.EventHandler(this.tsbExit_Click); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.cbotype); + this.panel1.Controls.Add(this.txtIp1); + this.panel1.Controls.Add(this.txtName); + this.panel1.Controls.Add(this.label6); + this.panel1.Controls.Add(this.cboDepartment); + this.panel1.Controls.Add(this.txtOrderBy); + this.panel1.Controls.Add(this.chkAll); + this.panel1.Controls.Add(this.chkIsValid); + this.panel1.Controls.Add(this.label5); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.label2); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.panel1.Location = new System.Drawing.Point(0, 57); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(811, 103); + this.panel1.TabIndex = 6; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("微软雅黑", 10.5F); + this.label6.ForeColor = System.Drawing.Color.Black; + this.label6.Location = new System.Drawing.Point(40, 51); + this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(37, 20); + this.label6.TabIndex = 401; + this.label6.Text = "地点"; + // + // cboDepartment + // + this.cboDepartment.Font = new System.Drawing.Font("微软雅黑", 10.5F); + this.cboDepartment.FormattingEnabled = true; + this.cboDepartment.Location = new System.Drawing.Point(598, 13); + this.cboDepartment.Margin = new System.Windows.Forms.Padding(2); + this.cboDepartment.Name = "cboDepartment"; + this.cboDepartment.Size = new System.Drawing.Size(167, 28); + this.cboDepartment.TabIndex = 400; + this.cboDepartment.Visible = false; + this.cboDepartment.TextUpdate += new System.EventHandler(this.cboDepartment_TextUpdate); + // + // txtOrderBy + // + this.txtOrderBy.Location = new System.Drawing.Point(341, 49); + this.txtOrderBy.Name = "txtOrderBy"; + this.txtOrderBy.Size = new System.Drawing.Size(51, 26); + this.txtOrderBy.TabIndex = 365; + // + // chkAll + // + this.chkAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.chkAll.AutoSize = true; + this.chkAll.Checked = true; + this.chkAll.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkAll.Location = new System.Drawing.Point(704, 58); + this.chkAll.Name = "chkAll"; + this.chkAll.Size = new System.Drawing.Size(84, 24); + this.chkAll.TabIndex = 8; + this.chkAll.Text = "显示全部"; + this.chkAll.UseVisualStyleBackColor = true; + this.chkAll.CheckedChanged += new System.EventHandler(this.chkAll_CheckedChanged); + // + // chkIsValid + // + this.chkIsValid.AutoSize = true; + this.chkIsValid.Checked = true; + this.chkIsValid.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkIsValid.Location = new System.Drawing.Point(429, 49); + this.chkIsValid.Name = "chkIsValid"; + this.chkIsValid.Size = new System.Drawing.Size(56, 24); + this.chkIsValid.TabIndex = 7; + this.chkIsValid.Text = "有效"; + this.chkIsValid.UseVisualStyleBackColor = true; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(302, 52); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(37, 20); + this.label5.TabIndex = 5; + this.label5.Text = "排序"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(266, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(50, 20); + this.label1.TabIndex = 5; + this.label1.Text = "IP地址"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(40, 13); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(51, 20); + this.label2.TabIndex = 5; + this.label2.Text = "手术间"; + // + // panel2 + // + this.panel2.Controls.Add(this.dgvOperationsRoom); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.panel2.Location = new System.Drawing.Point(0, 160); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(811, 329); + this.panel2.TabIndex = 7; + // + // dgvOperationsRoom + // + this.dgvOperationsRoom.AllowUserToAddRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(249)))), ((int)(((byte)(255))))); + this.dgvOperationsRoom.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvOperationsRoom.BackgroundColor = System.Drawing.Color.Snow; + this.dgvOperationsRoom.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvOperationsRoom.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvOperationsRoom.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvOperationsRoom.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.Id, + this.Index, + this.type, + this.oName, + this.Ip1, + this.DepartmentNameColumn, + this.OrderBy, + this.IsValid}); + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvOperationsRoom.DefaultCellStyle = dataGridViewCellStyle3; + this.dgvOperationsRoom.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvOperationsRoom.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170))))); + this.dgvOperationsRoom.Location = new System.Drawing.Point(0, 0); + this.dgvOperationsRoom.MultiSelect = false; + this.dgvOperationsRoom.Name = "dgvOperationsRoom"; + this.dgvOperationsRoom.RowTemplate.Height = 23; + this.dgvOperationsRoom.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgvOperationsRoom.Size = new System.Drawing.Size(811, 329); + this.dgvOperationsRoom.TabIndex = 0; + // + // dataGridViewTextBoxColumn1 + // + this.dataGridViewTextBoxColumn1.DataPropertyName = "Id"; + this.dataGridViewTextBoxColumn1.HeaderText = "编号"; + this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; + this.dataGridViewTextBoxColumn1.Visible = false; + // + // dataGridViewTextBoxColumn2 + // + this.dataGridViewTextBoxColumn2.DataPropertyName = "Index"; + this.dataGridViewTextBoxColumn2.HeaderText = "序号"; + this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; + this.dataGridViewTextBoxColumn2.Width = 80; + // + // dataGridViewTextBoxColumn3 + // + this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.dataGridViewTextBoxColumn3.DataPropertyName = "oName"; + this.dataGridViewTextBoxColumn3.HeaderText = "名称"; + this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; + // + // dataGridViewTextBoxColumn4 + // + this.dataGridViewTextBoxColumn4.DataPropertyName = "Ip1"; + this.dataGridViewTextBoxColumn4.HeaderText = "Ip地址1"; + this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; + this.dataGridViewTextBoxColumn4.Width = 140; + // + // dataGridViewTextBoxColumn5 + // + this.dataGridViewTextBoxColumn5.DataPropertyName = "Ip2"; + this.dataGridViewTextBoxColumn5.HeaderText = "Ip地址2"; + this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; + this.dataGridViewTextBoxColumn5.Width = 140; + // + // dataGridViewTextBoxColumn6 + // + this.dataGridViewTextBoxColumn6.DataPropertyName = "Ip3"; + this.dataGridViewTextBoxColumn6.HeaderText = "Ip地址3"; + this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; + this.dataGridViewTextBoxColumn6.Width = 140; + // + // dataGridViewTextBoxColumn7 + // + this.dataGridViewTextBoxColumn7.HeaderText = "所属科室"; + this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; + // + // dataGridViewTextBoxColumn8 + // + this.dataGridViewTextBoxColumn8.DataPropertyName = "OrderBy"; + this.dataGridViewTextBoxColumn8.HeaderText = "排序顺序"; + this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8"; + // + // dataGridViewTextBoxColumn9 + // + this.dataGridViewTextBoxColumn9.DataPropertyName = "IsValid"; + this.dataGridViewTextBoxColumn9.HeaderText = "是否有效"; + this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9"; + // + // txtName + // + this.txtName.BackColor = System.Drawing.Color.White; + // + // + // + this.txtName.Border.Class = "TextBoxBorder"; + this.txtName.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.txtName.DisabledBackColor = System.Drawing.Color.White; + this.txtName.ForeColor = System.Drawing.Color.Black; + this.txtName.Location = new System.Drawing.Point(94, 8); + this.txtName.Name = "txtName"; + this.txtName.PreventEnterBeep = true; + this.txtName.Size = new System.Drawing.Size(167, 26); + this.txtName.TabIndex = 402; + // + // txtIp1 + // + this.txtIp1.BackColor = System.Drawing.Color.White; + // + // + // + this.txtIp1.Border.Class = "TextBoxBorder"; + this.txtIp1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.txtIp1.DisabledBackColor = System.Drawing.Color.White; + this.txtIp1.ForeColor = System.Drawing.Color.Black; + this.txtIp1.Location = new System.Drawing.Point(327, 10); + this.txtIp1.Name = "txtIp1"; + this.txtIp1.PreventEnterBeep = true; + this.txtIp1.Size = new System.Drawing.Size(167, 26); + this.txtIp1.TabIndex = 402; + // + // cbotype + // + this.cbotype.DisplayMember = "Text"; + this.cbotype.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cbotype.ForeColor = System.Drawing.Color.Black; + this.cbotype.FormattingEnabled = true; + this.cbotype.ItemHeight = 20; + this.cbotype.Items.AddRange(new object[] { + this.comboItem1, + this.comboItem2}); + this.cbotype.Location = new System.Drawing.Point(94, 49); + this.cbotype.Name = "cbotype"; + this.cbotype.Size = new System.Drawing.Size(167, 26); + this.cbotype.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbotype.TabIndex = 403; + this.cbotype.Text = "手术室"; + // + // comboItem1 + // + this.comboItem1.Text = "手术间"; + // + // comboItem2 + // + this.comboItem2.Text = "恢复室"; + // + // Id + // + this.Id.DataPropertyName = "Id"; + this.Id.HeaderText = "编号"; + this.Id.Name = "Id"; + this.Id.Visible = false; + // + // Index + // + this.Index.DataPropertyName = "Index"; + this.Index.HeaderText = "序号"; + this.Index.Name = "Index"; + this.Index.Width = 80; + // + // type + // + this.type.HeaderText = "地点"; + this.type.Name = "type"; + // + // oName + // + this.oName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.oName.DataPropertyName = "oName"; + this.oName.HeaderText = "名称"; + this.oName.Name = "oName"; + // + // Ip1 + // + this.Ip1.DataPropertyName = "Ip"; + this.Ip1.HeaderText = "Ip地址"; + this.Ip1.Name = "Ip1"; + this.Ip1.Width = 140; + // + // DepartmentNameColumn + // + this.DepartmentNameColumn.HeaderText = "所属科室"; + this.DepartmentNameColumn.Name = "DepartmentNameColumn"; + this.DepartmentNameColumn.Visible = false; + // + // OrderBy + // + this.OrderBy.DataPropertyName = "OrderBy"; + this.OrderBy.HeaderText = "排序顺序"; + this.OrderBy.Name = "OrderBy"; + // + // IsValid + // + this.IsValid.DataPropertyName = "IsValid"; + this.IsValid.HeaderText = "是否有效"; + this.IsValid.Name = "IsValid"; + // + // frmOperationRoom + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(811, 489); + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel1); + this.Controls.Add(this.toolStrip1); + this.Name = "frmOperationRoom"; + this.Text = "手术间管理"; + this.Load += new System.EventHandler(this.frmOperationRoom_Load); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgvOperationsRoom)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripButton tsbAdd; + private System.Windows.Forms.ToolStripButton tsbModify; + private System.Windows.Forms.ToolStripButton tsbCancel; + private System.Windows.Forms.ToolStripButton tsbSave; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripButton tsbExit; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.CheckBox chkAll; + private System.Windows.Forms.CheckBox chkIsValid; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Panel panel2; + private DevComponents.DotNetBar.Controls.DataGridViewX dgvOperationsRoom; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; + private AIMS.OremrUserControl.NumTextBox txtOrderBy; + public System.Windows.Forms.Label label6; + public System.Windows.Forms.ComboBox cboDepartment; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbotype; + private DevComponents.Editors.ComboItem comboItem1; + private DevComponents.Editors.ComboItem comboItem2; + private DevComponents.DotNetBar.Controls.TextBoxX txtIp1; + private DevComponents.DotNetBar.Controls.TextBoxX txtName; + private System.Windows.Forms.DataGridViewTextBoxColumn Id; + private System.Windows.Forms.DataGridViewTextBoxColumn Index; + private System.Windows.Forms.DataGridViewTextBoxColumn type; + private System.Windows.Forms.DataGridViewTextBoxColumn oName; + private System.Windows.Forms.DataGridViewTextBoxColumn Ip1; + private System.Windows.Forms.DataGridViewTextBoxColumn DepartmentNameColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn OrderBy; + private System.Windows.Forms.DataGridViewTextBoxColumn IsValid; + } +} \ No newline at end of file diff --git a/AIMS/DataDictionary/frmOperationRoom.resx b/AIMS/DataDictionary/frmOperationRoom.resx new file mode 100644 index 0000000..cbe907a --- /dev/null +++ b/AIMS/DataDictionary/frmOperationRoom.resx @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/AIMS/PublicUI/frmPerson.Designer.cs b/AIMS/DataDictionary/frmPerson.Designer.cs similarity index 97% rename from AIMS/PublicUI/frmPerson.Designer.cs rename to AIMS/DataDictionary/frmPerson.Designer.cs index 1c215e0..9ef8392 100644 --- a/AIMS/PublicUI/frmPerson.Designer.cs +++ b/AIMS/DataDictionary/frmPerson.Designer.cs @@ -64,7 +64,6 @@ this.label6 = new System.Windows.Forms.Label(); this.cboRole = new System.Windows.Forms.ComboBox(); this.label3 = new System.Windows.Forms.Label(); - this.cboDepartment = new System.Windows.Forms.ComboBox(); this.label5 = new System.Windows.Forms.Label(); this.txtHelpCode = new System.Windows.Forms.TextBox(); this.label12 = new System.Windows.Forms.Label(); @@ -84,6 +83,8 @@ this.tsbSava = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.tsbExit = new System.Windows.Forms.ToolStripButton(); + this.cboDepartment = new System.Windows.Forms.ComboBox(); + this.chkAllShow = new System.Windows.Forms.CheckBox(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dgvPerson)).BeginInit(); this.panel1.SuspendLayout(); @@ -249,6 +250,7 @@ // // panel1 // + this.panel1.Controls.Add(this.cboDepartment); this.panel1.Controls.Add(this.cboPersonType); this.panel1.Controls.Add(this.label14); this.panel1.Controls.Add(this.txtPassWord); @@ -267,7 +269,6 @@ this.panel1.Controls.Add(this.label6); this.panel1.Controls.Add(this.cboRole); this.panel1.Controls.Add(this.label3); - this.panel1.Controls.Add(this.cboDepartment); this.panel1.Controls.Add(this.label5); this.panel1.Controls.Add(this.txtHelpCode); this.panel1.Controls.Add(this.label12); @@ -549,15 +550,6 @@ this.label3.TabIndex = 557; this.label3.Text = "角色"; // - // cboDepartment - // - this.cboDepartment.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cboDepartment.FormattingEnabled = true; - this.cboDepartment.Location = new System.Drawing.Point(71, 10); - this.cboDepartment.Name = "cboDepartment"; - this.cboDepartment.Size = new System.Drawing.Size(123, 22); - this.cboDepartment.TabIndex = 556; - // // label5 // this.label5.AutoSize = true; @@ -734,12 +726,35 @@ this.tsbExit.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText; this.tsbExit.Click += new System.EventHandler(this.tsbExit_Click); // + // cboDepartment + // + this.cboDepartment.Font = new System.Drawing.Font("微软雅黑", 10.5F); + this.cboDepartment.FormattingEnabled = true; + this.cboDepartment.Location = new System.Drawing.Point(71, 6); + this.cboDepartment.Margin = new System.Windows.Forms.Padding(2); + this.cboDepartment.Name = "cboDepartment"; + this.cboDepartment.Size = new System.Drawing.Size(123, 28); + this.cboDepartment.TabIndex = 575; + this.cboDepartment.Visible = false; + this.cboDepartment.TextUpdate += new System.EventHandler(this.cboDepartment_TextUpdate); + // + // chkAllShow + // + this.chkAllShow.AutoSize = true; + this.chkAllShow.Location = new System.Drawing.Point(318, 12); + this.chkAllShow.Name = "chkAllShow"; + this.chkAllShow.Size = new System.Drawing.Size(72, 16); + this.chkAllShow.TabIndex = 13; + this.chkAllShow.Text = "显示全部"; + this.chkAllShow.UseVisualStyleBackColor = true; + // // frmPerson // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(913, 495); this.ControlBox = false; + this.Controls.Add(this.chkAllShow); this.Controls.Add(this.panel2); this.Controls.Add(this.panel1); this.Controls.Add(this.toolStrip1); @@ -769,7 +784,6 @@ private System.Windows.Forms.Panel panel2; private System.Windows.Forms.DataGridView dgvPerson; private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.ComboBox cboDepartment; private System.Windows.Forms.TextBox txtHelpCode; private System.Windows.Forms.Label label12; private DevComponents.Editors.IntegerInput intPersonOrder; @@ -822,5 +836,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn PassWordColumn; private System.Windows.Forms.DataGridViewTextBoxColumn IsValidColumn; private System.Windows.Forms.DataGridViewTextBoxColumn PersonOrderColumn; + public System.Windows.Forms.ComboBox cboDepartment; + private System.Windows.Forms.CheckBox chkAllShow; } } \ No newline at end of file diff --git a/AIMS/PublicUI/frmPerson.cs b/AIMS/DataDictionary/frmPerson.cs similarity index 87% rename from AIMS/PublicUI/frmPerson.cs rename to AIMS/DataDictionary/frmPerson.cs index 70f5e30..722187d 100644 --- a/AIMS/PublicUI/frmPerson.cs +++ b/AIMS/DataDictionary/frmPerson.cs @@ -15,6 +15,8 @@ namespace AIMS.PublicUI.UI { public AIMSExtension.EditState _state; private Person SelectPerson = new Person(); + public List listNew = new List(); + public List listOnit = new List(); public frmPerson() { InitializeComponent(); @@ -31,10 +33,13 @@ namespace AIMS.PublicUI.UI private void Initial() { - cboDepartment.DisplayMember = "Name"; + listOnit = BDepartment.Select("IsValid=1 ", new ParameterList(), RecursiveType.None, 0); + listOnit.Insert(0, new Department() { Id = -1, Name = "全部科室" }); + this.cboDepartment.Items.AddRange(listOnit.ToArray()); cboDepartment.ValueMember = "Id"; - cboDepartment.DataSource = BDepartment.GetDepartmentDataTable(""); - cboDepartment.SelectedIndex = -1; + cboDepartment.DisplayMember = "Name"; + cboDepartment.Text = "全部科室"; + cboDepartment.Enabled = true; cboRole.DisplayMember = "RoleName"; cboRole.ValueMember = "Id"; @@ -61,7 +66,6 @@ namespace AIMS.PublicUI.UI this.txtName.Enabled = true; this.txtName.TextChanged += new System.EventHandler(this.txtName_TextChanged); - this.cboDepartment.Enabled = true; this.cboDepartment.SelectedIndexChanged += new System.EventHandler(this.cboDepartment_SelectedIndexChanged); } @@ -240,7 +244,7 @@ namespace AIMS.PublicUI.UI private void GetPersonDataTable(string name, string DepartName) { dgvPerson.Rows.Clear(); - DataTable dt = BPerson.GetPersonDataTable(name,DepartName); + DataTable dt = BPerson.GetPersonDataTable(name,DepartName, chkAllShow.Checked); for (int i = 0; i < dt.Rows.Count; i++) { dgvPerson.Rows.Add(dt.Rows[i]["Id"].ToString(), @@ -268,6 +272,31 @@ namespace AIMS.PublicUI.UI } } + + private void cboDepartment_TextUpdate(object sender, EventArgs e) + { + //清空combobox + this.cboDepartment.Items.Clear(); + //清空listNew + listNew.Clear(); + //遍历全部备查数据 + listNew = BDepartment.Select("IsValid=1 and (HCode like '%" + cboDepartment.Text + "%' or Name like '%" + cboDepartment.Text + "%' )", new ParameterList(), RecursiveType.None, 0); + if (listNew.Count <= 0) + { + listNew = BDepartment.Select("IsValid=1 ", new ParameterList(), RecursiveType.None, 0); + listNew.Insert(0, new Department() { Id = -1, Name = "全部科室" }); + } + + //combobox添加已经查到的关键词 + this.cboDepartment.Items.AddRange(listNew.ToArray()); + //设置光标位置,否则光标位置始终保持在第一列,造成输入关键词的倒序排列 + this.cboDepartment.SelectionStart = this.cboDepartment.Text.Length; + //保持鼠标指针原来状态,有时候鼠标指针会被下拉框覆盖,所以要进行一次设置。 + Cursor = Cursors.Default; + //自动弹出下拉框 + this.cboDepartment.DroppedDown = true; + } + private void cboDepartment_SelectedIndexChanged(object sender, EventArgs e) { GetPersonDataTable("", cboDepartment.Text.Trim()); diff --git a/AIMS/PublicUI/frmPerson.resx b/AIMS/DataDictionary/frmPerson.resx similarity index 75% rename from AIMS/PublicUI/frmPerson.resx rename to AIMS/DataDictionary/frmPerson.resx index 585a440..0285924 100644 --- a/AIMS/PublicUI/frmPerson.resx +++ b/AIMS/DataDictionary/frmPerson.resx @@ -162,51 +162,6 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - 17, 17 diff --git a/AIMS/FormMainManage.designer.cs b/AIMS/FormMainManage.designer.cs index b95ff82ed660b341f2421054e27d0bfd0ec19f39..99f57990f73a78058a15ad680a624e863334f295 100644 GIT binary patch delta 2721 zcmY*be{2-j5x$wb*l;sSvS@p;STv!%-o(3cu{Ce^gOhb>{8v zIr-<_d-G<$`R03Xzr7DnhYo!iN}rw!)mA3>0Kjrlv2OLuyy*`m-1C=cgR}u*sUiheIA3>;-7W;$!Nzs75_zzGIlMp z#x{O4&nn)&c`mhIh6a1$UHo&18?98e2Tg&A*w;V6sRu+S9qLqAV22ehL3(i={FEj> zgJSCVJqGNmgV^b3W`^Y1k;8Z=;E(xY^s6$cRH??0oji(pNRi`MNa>F;AkV*i;6k(#8gyEn?T5 z#Nc=FW9rf7rIa0DZ4M3KHjQ6M$+X*&Q)Gqp{URo{{s?rD68p{1vHbg;l-S2?dC5~Z^RYE=bx`W?& zj&)yqF4w%QX+s0PY;8`ZD(S#eaLq4=Ir9eeLAAaA39JX&x&{vEXxp2Rfof`d1^Vcv zI_Opt{g0?keb3XSPcW*I$MUS}ecgUARO|3nzIX;T6~hi?q@!S1H?KS`FDb{?0LesU zz8=+M+tpq@){g9;u@w+k*})C8`co)XMqh!o?ek!Ow<}!C3Zd2u%dPb%>e(Ua;tn{> z_E6EA;oq6wK1sD|N9M|2rV*c1#!ygYM+54Ep|I64dcKI`^WT6;9_~wzY&Gd;Bw1)N z#Klu*)d8!YXSE|;YT~Z}HF2$lxA%`TR_gC_cv(Wpa=ha1m8g!<26rB!j%7G*9lO!Y zfNJOPB$F{`H84F5IOb@;7Nj*W6>GpnZbosZBf<1ko|+nLWMdh)Tw(odN^1~vHHdi{ z+_<7OXp5m}F#5G<@a|R7fZuthpPFtK)OLru6`Z-Vg4da!pfIb{C^GSQRk|Y3%t|bx z@YC=I&gQuQvagJE(YJAs18?LynW<%Zsl~8)<2Z6!+@%NO(Z4uV|ozt6stdN@$AzsfQqi>tQoLI6v(F zp-NvbBpp1t3c_+)Hm{zSdob{8Ekut)Lt5K*e#UaH-j&{PM`P0(oS)}Zr_ebEY$ zfVS$^;YlzY;_TcGah^CgOT1h}mQh5OQI3z9HOoTCR?xn;A&;WFA#5k#hQb%rfrATZ z>uso`Q{xb$OJ}i+{&yQfI^J>zR#D3ZSS;~!I&%T8vn}1c3%}&yzZ38k4=e9M6AxYY zV7-2(;}SII(nGYU4A$Cv{sQAgbn1Q3rQV_6w7XUKi&IYPOJSkvxx84{b+Wi{i)2MV zybD>TrAx+~S}|SA$>UQ$UWkuCfo z7T2?RJB&yAOCnjc>acuNYx# z;%A@UzJ(dBbLQiY{dvjfuNvowQ5}&D!&P*KN}<_lD6?Tmvyl{&RfmN4ca>tWc1Uhm zHS04bqz7}ALn>G^cA1Blm(y2UmH~huNj!a z9;ns`&?qJ&b)@Dtx58c*->+trydz&oI?T!?GfNs~Ny99uAb+n?J}f%30q!+eU_bK; zxGk=i#%eOzH5rV|wLxCcC2KMWO@`Dg!B#qd4(f@mr8eL5@d|z>Aq}Dpb+gJaK+572 zk3mSI=^g5VwV|)L!!D*7rU@4`kann+x7iv)2-APc;2Rz$pT}nBa)Y;C6U)GfuI=hQ z@lz`Bw#~b+Lcb`sKkdcs=AviMnNDw~&T3bs?o^w7i!EjnDYB2~A}CLZeMGa56xl~~ zHS`(H-ut0>0395xrw8C%k)1L-T}-0@*;F~ipn#ME=O^sm+E z(e6i^ah-Bo^h7nT;I$z2H>2CQ&Q#+RXS#7&1&Md^x^69Q=Hb<~ zxKU&6t--Cg5DGOopJr09!S1fbPbwfHE|1-#XzXV5$FdsD!4+Z1ySKx=+H2N_v2GZCK)YOHd?H#BPeQ3S2kL#Y_wR} zsLhqVn}weC-N0q$ro4ObxQovi{m{m3Pd!*v5_M(`9MkKnd9~rRn^qM41QL|%52GO3P>9Mf4W{D1qzM}((OVqCj+)G#H#~OR3MXqWX+!^-^$3h{OI=>ZFVa=`BuDT8K_i{)|&A)zjHk2KdYenD>a#a*sTm zTD<5dj5jYh&p%JmoP4fMr1pB{w|i#p;)TXL7Se~xrRQJ(gOJjp0H$a;%T5l6$YeN{@b;%iOZ{tOdm93 zgUFrs$#%OE<%Pdox`n{MT*FNw{hlSiIQxuZ84&%?@=ZPBws(Gl?f0r5A-Xh+4~ULS fK^mUHla%@gR@)c;j&A*PL>Ioty#3i#{J7!&=UkFf diff --git a/AIMS/FormMainManage.resx b/AIMS/FormMainManage.resx index d8d297b..1ebcd4e 100644 --- a/AIMS/FormMainManage.resx +++ b/AIMS/FormMainManage.resx @@ -178,30 +178,6 @@ MwW6KkGb9Hmsq0MogxZksYGRWGdJ3RrGveY7/uufywXhBhmZbeQU/ileAAAAAElFTkSuQmCC - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6 @@ -274,6 +250,30 @@ MwW6KkGb9Hmsq0MogxZksYGRWGdJ3RrGveY7/uufywXhBhmZbeQU/ileAAAAAElFTkSuQmCC + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + True diff --git a/AIMS/OperationDoing/AnasRecordBill/DrawAnasReordBill.cs b/AIMS/OperationDoing/AnasRecordBill/DrawAnasReordBill.cs index fd05fa2..b500acf 100644 --- a/AIMS/OperationDoing/AnasRecordBill/DrawAnasReordBill.cs +++ b/AIMS/OperationDoing/AnasRecordBill/DrawAnasReordBill.cs @@ -286,7 +286,7 @@ namespace AIMS.OperationDoing.AnasRecordBill DrawGraph.Util.DrawText(" 麻 醉 记 录", 0.42, 0.065, Zgc2, DrawGraph.Util.Font14); templateManage2.ZedControl.Width = templateManage.ZedControl.Width; templateManage2.ZedControl.Height = templateManage.ZedControl.Height; - int LocationY = Convert.ToInt32(templateManage.ZedControl.Height * 0.065); + int LocationY = Convert.ToInt32(templateManage2.ZedControl.Height * 0.065); templateManage2.LocationY = LocationY; templateManage2.SetPYL(); templateManage2.ZedControl.AxisChange(); diff --git a/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBill2.cs b/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBill2.cs index 5cfdf36..5832e93 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBill2.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBill2.cs @@ -180,8 +180,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI Panel panel = zgcAnaesRecord.Parent as Panel; panel.VerticalScroll.Value = 0; Panel panel2 = zgcAnaesRecord2.Parent as Panel; - panel2.VerticalScroll.Value = 0; - //panel.HorizontalScroll.Value = 0; + panel2.VerticalScroll.Value = 0; + mPanes = new List(); UpPanes = new List(); PrintDocPage(null, null); @@ -252,12 +252,12 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI private void PrintDocPane(PrintPageEventArgs e, ZedGraphControl zedGraph, TemplateManage template, bool InitChart) { - //if (InitChart == false) - // foreach (AreaManageBase area in template.ManageList) - // { - // area.setPrint(false); - // area.BindTempData(); - // } + if (InitChart == false) + foreach (AreaManageBase area in template.ManageList) + { + area.setPrint(false); + area.BindTempData(); + } int zedGraphMainWidth = zedGraph.Size.Width; int zedGraphMainHeight = zedGraph.Size.Height; @@ -308,11 +308,22 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI pp.reSetCurveSpo2(); } } - //if (InitChart == false) - // foreach (AreaManageBase area in template.ManageList) - // { - // area.setPrint(true); - // } + if (InitChart == false) + { + int LocationY = Convert.ToInt32(templateManage2.ZedControl.Height * 0.065); + templateManage2.LocationY = LocationY; + templateManage2.SetPYL(); + foreach (AreaManageBase area in template.ManageList) + { + area.setPrint(true); + } + } + else + { + int LocationY = Convert.ToInt32(templateManage.ZedControl.Height * 0.04); + templateManage.LocationY = LocationY; + templateManage.SetPYL(); + } } private void plPrint_Click(object sender, EventArgs e) @@ -2101,18 +2112,18 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { //int LocationY = Convert.ToInt32(templateManage.ZedControl.Height * 0.08); //templateManage2.LocationY = 0; - if (superTabMain.SelectedTab.Name == "spTabQXQDD") - { - int LocationY = Convert.ToInt32(templateManage.ZedControl.Height * 0.04); - templateManage.LocationY = LocationY; - templateManage.SetPYL(); - } - else - { - int LocationY = Convert.ToInt32(templateManage.ZedControl.Height * 0.065); - templateManage2.LocationY = LocationY; - templateManage2.SetPYL(); - } + //if (superTabMain.SelectedTab.Name == "spTabQXQDD") + //{ + // int LocationY = Convert.ToInt32(templateManage.ZedControl.Height * 0.04); + // templateManage.LocationY = LocationY; + // templateManage.SetPYL(); + //} + //else + //{ + // int LocationY = Convert.ToInt32(templateManage.ZedControl.Height * 0.065); + // templateManage2.LocationY = LocationY; + // templateManage2.SetPYL(); + //} } } } diff --git a/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.cs b/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.cs index 46a751d..1e4d00b 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew2.cs @@ -10,6 +10,7 @@ using System.Text; using System.Windows.Forms; using AIMSModel; using AIMSBLL; +using DCSoftDotfuscate; namespace AIMS.OperationDoing.AnasRecordBill.UI { @@ -175,6 +176,26 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { if (State == "开始手术") { + OperationApply operA = BOperationApply.SelectSingle(applyId); + if (operA.State == 11) + { + MessageBox.Show("当前手术已停止 ,请确认后重新选择!", "系统提示"); + return; + } + //if (operA.OrderOperationTime.Value.Date != DateTime.Now.Date && operA.OrderOperationTime.Value.Hour < 18) + //{ + // MessageBox.Show("该手术预约时间不是当前日期 ,请确认后重新选择!", "系统提示"); + // return; + //} + DataTable dtOperationRecord = SelectPatient.GetTodayDoOpePatientDataTable(DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString())); + foreach (DataRow row in dtOperationRecord.Rows) + { + if (row["OperationRoomId"].ToString() == operA.OperationRoomId.ToString()) + { + MessageBox.Show("当前有未完成的手术占用手术间,请先选择解锁术中手术!", "系统提示"); + return; + } + } AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordBill2 frmAnasRecord = new frmAnasRecordBill2(); frmAnasRecord.PatientId = PatientId; frmAnasRecord.ApplyId = applyId; diff --git a/AIMS/OperationFront/frmOperationApplyDetail.Designer.cs b/AIMS/OperationFront/frmOperationApplyDetail.Designer.cs index e6d2baa..c660cc0 100644 --- a/AIMS/OperationFront/frmOperationApplyDetail.Designer.cs +++ b/AIMS/OperationFront/frmOperationApplyDetail.Designer.cs @@ -76,6 +76,7 @@ this.txtDiseaseRemark = new System.Windows.Forms.TextBox(); this.panel2 = new System.Windows.Forms.Panel(); this.rboZQ = new System.Windows.Forms.RadioButton(); + this.rboRJ = new System.Windows.Forms.RadioButton(); this.rboJZ = new System.Windows.Forms.RadioButton(); this.panel3 = new System.Windows.Forms.Panel(); this.rdbIsPlanReturnOperation = new System.Windows.Forms.RadioButton(); @@ -152,8 +153,7 @@ this.btnDR = new System.Windows.Forms.Button(); this.label3 = new System.Windows.Forms.Label(); this.txtMdrecNo = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.rboRJ = new System.Windows.Forms.RadioButton(); + this.cboPatientType = new System.Windows.Forms.ComboBox(); this.toolStrip1.SuspendLayout(); this.panel1.SuspendLayout(); this.groupBox3.SuspendLayout(); @@ -689,6 +689,18 @@ this.rboZQ.UseVisualStyleBackColor = true; this.rboZQ.CheckedChanged += new System.EventHandler(this.rboZQ_CheckedChanged); // + // rboRJ + // + this.rboRJ.AutoSize = true; + this.rboRJ.Location = new System.Drawing.Point(122, 5); + this.rboRJ.Name = "rboRJ"; + this.rboRJ.Size = new System.Drawing.Size(53, 18); + this.rboRJ.TabIndex = 13; + this.rboRJ.TabStop = true; + this.rboRJ.Text = "日间"; + this.rboRJ.UseVisualStyleBackColor = true; + this.rboRJ.CheckedChanged += new System.EventHandler(this.rboZQ_CheckedChanged); + // // rboJZ // this.rboJZ.AutoSize = true; @@ -1078,6 +1090,7 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.cboPatientType); this.groupBox1.Controls.Add(this.txtContactsPhone); this.groupBox1.Controls.Add(this.label16); this.groupBox1.Controls.Add(this.txtContacts); @@ -1112,7 +1125,6 @@ this.groupBox1.Controls.Add(this.btnDR); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.txtMdrecNo); - this.groupBox1.Controls.Add(this.label2); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Font = new System.Drawing.Font("宋体", 10.5F); this.groupBox1.Location = new System.Drawing.Point(0, 0); @@ -1289,7 +1301,7 @@ // this.txtIlldistrict.Location = new System.Drawing.Point(308, 65); this.txtIlldistrict.Name = "txtIlldistrict"; - this.txtIlldistrict.Size = new System.Drawing.Size(73, 23); + this.txtIlldistrict.Size = new System.Drawing.Size(84, 23); this.txtIlldistrict.TabIndex = 18; // // label10 @@ -1343,7 +1355,7 @@ // this.dtpBirthDay.CustomFormat = "yyyy-MM-dd"; this.dtpBirthDay.Format = System.Windows.Forms.DateTimePickerFormat.Custom; - this.dtpBirthDay.Location = new System.Drawing.Point(891, 30); + this.dtpBirthDay.Location = new System.Drawing.Point(847, 31); this.dtpBirthDay.Name = "dtpBirthDay"; this.dtpBirthDay.Size = new System.Drawing.Size(159, 23); this.dtpBirthDay.TabIndex = 12; @@ -1352,7 +1364,7 @@ // this.label6.AutoSize = true; this.label6.ForeColor = System.Drawing.Color.Red; - this.label6.Location = new System.Drawing.Point(819, 33); + this.label6.Location = new System.Drawing.Point(775, 34); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(63, 14); this.label6.TabIndex = 11; @@ -1366,7 +1378,7 @@ "男", "女", "不详"}); - this.cboSex.Location = new System.Drawing.Point(715, 30); + this.cboSex.Location = new System.Drawing.Point(671, 31); this.cboSex.Name = "cboSex"; this.cboSex.Size = new System.Drawing.Size(95, 22); this.cboSex.TabIndex = 10; @@ -1375,7 +1387,7 @@ // this.label5.AutoSize = true; this.label5.ForeColor = System.Drawing.Color.Red; - this.label5.Location = new System.Drawing.Point(671, 33); + this.label5.Location = new System.Drawing.Point(627, 34); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(35, 14); this.label5.TabIndex = 9; @@ -1383,7 +1395,7 @@ // // txtName // - this.txtName.Location = new System.Drawing.Point(503, 30); + this.txtName.Location = new System.Drawing.Point(448, 31); this.txtName.Name = "txtName"; this.txtName.Size = new System.Drawing.Size(159, 23); this.txtName.TabIndex = 8; @@ -1392,7 +1404,7 @@ // this.label4.AutoSize = true; this.label4.ForeColor = System.Drawing.Color.Red; - this.label4.Location = new System.Drawing.Point(459, 33); + this.label4.Location = new System.Drawing.Point(404, 34); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(35, 14); this.label4.TabIndex = 7; @@ -1402,7 +1414,7 @@ // this.txtArchivesNo.Location = new System.Drawing.Point(308, 30); this.txtArchivesNo.Name = "txtArchivesNo"; - this.txtArchivesNo.Size = new System.Drawing.Size(146, 23); + this.txtArchivesNo.Size = new System.Drawing.Size(89, 23); this.txtArchivesNo.TabIndex = 6; // // btnDR @@ -1434,27 +1446,18 @@ this.txtMdrecNo.Size = new System.Drawing.Size(109, 23); this.txtMdrecNo.TabIndex = 3; // - // label2 + // cboPatientType // - this.label2.AutoSize = true; - this.label2.ForeColor = System.Drawing.Color.Red; - this.label2.Location = new System.Drawing.Point(10, 33); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(63, 14); - this.label2.TabIndex = 1; - this.label2.Text = "住 院 号"; - // - // rboRJ - // - this.rboRJ.AutoSize = true; - this.rboRJ.Location = new System.Drawing.Point(122, 5); - this.rboRJ.Name = "rboRJ"; - this.rboRJ.Size = new System.Drawing.Size(53, 18); - this.rboRJ.TabIndex = 13; - this.rboRJ.TabStop = true; - this.rboRJ.Text = "日间"; - this.rboRJ.UseVisualStyleBackColor = true; - this.rboRJ.CheckedChanged += new System.EventHandler(this.rboZQ_CheckedChanged); + this.cboPatientType.Font = new System.Drawing.Font("微软雅黑", 10.5F); + this.cboPatientType.FormattingEnabled = true; + this.cboPatientType.Items.AddRange(new object[] { + "住院", + "门诊"}); + this.cboPatientType.Location = new System.Drawing.Point(6, 27); + this.cboPatientType.Name = "cboPatientType"; + this.cboPatientType.Size = new System.Drawing.Size(74, 28); + this.cboPatientType.TabIndex = 37; + this.cboPatientType.Text = "住院"; // // frmOperationApplyDetail // @@ -1563,7 +1566,6 @@ private System.Windows.Forms.TextBox txtArchivesNo; private System.Windows.Forms.Label label3; private System.Windows.Forms.TextBox txtMdrecNo; - private System.Windows.Forms.Label label2; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.Panel panel3; private System.Windows.Forms.Label label35; @@ -1615,5 +1617,6 @@ public System.Windows.Forms.ToolStripButton tsbExit; public System.Windows.Forms.ToolStripButton tsbCancel; private System.Windows.Forms.RadioButton rboRJ; + public System.Windows.Forms.ComboBox cboPatientType; } } \ No newline at end of file diff --git a/AIMS/OperationFront/frmOperationApplyDetail.cs b/AIMS/OperationFront/frmOperationApplyDetail.cs index 0d57e75..c8745e8 100644 --- a/AIMS/OperationFront/frmOperationApplyDetail.cs +++ b/AIMS/OperationFront/frmOperationApplyDetail.cs @@ -73,6 +73,7 @@ namespace AIMS.OperationFront.UI EditOperationApplyObj = BOperationApply.GetModel(EditApplyId); EditOris_PatientObj = BOrisPatient.GetModel(EditOperationApplyObj.OrisPatientId.Value); + cboPatientType.Text = EditOris_PatientObj.PatientType; txtMdrecNo.Text = EditOris_PatientObj.MdrecNo; txtArchivesNo.Text = EditOris_PatientObj.ArchivesNo; txtName.Text = EditOris_PatientObj.Name; @@ -877,6 +878,7 @@ namespace AIMS.OperationFront.UI { Oris_PatientObj = EditOris_PatientObj; } + Oris_PatientObj.PatientType = cboPatientType.Text.Trim(); Oris_PatientObj.MdrecNo = txtMdrecNo.Text.Trim(); Oris_PatientObj.ArchivesNo = txtArchivesNo.Text.Trim(); Oris_PatientObj.Name = txtName.Text.Trim(); diff --git a/AIMSEntity/BLL/Extension/BPerson.cs b/AIMSEntity/BLL/Extension/BPerson.cs index cbb30f7..4584632 100644 --- a/AIMSEntity/BLL/Extension/BPerson.cs +++ b/AIMSEntity/BLL/Extension/BPerson.cs @@ -34,9 +34,9 @@ namespace AIMSBLL { return DPerson.GetPersonDataTable(); } - public static DataTable GetPersonDataTable(string name, string DeptName) + public static DataTable GetPersonDataTable(string name, string DeptName, bool IsValid) { - return DPerson.GetPersonDataTable(name, DeptName); + return DPerson.GetPersonDataTable(name, DeptName,IsValid); } public static bool Login(string No, string PassWord) { diff --git a/AIMSEntity/DAL/AutoGenerate/DBasicDictionary.cs b/AIMSEntity/DAL/AutoGenerate/DBasicDictionary.cs index d301d0f..176636d 100644 --- a/AIMSEntity/DAL/AutoGenerate/DBasicDictionary.cs +++ b/AIMSEntity/DAL/AutoGenerate/DBasicDictionary.cs @@ -20,7 +20,7 @@ namespace AIMSDAL internal static int Insert(SqlCommand cmd, BasicDictionary basicDictionary) { cmd.Parameters.Clear(); - cmd.CommandText = "insert into BasicDictionary (Name,ParentId,HelpCode,Order,IsValid,OperatorNo,OperatorName,OperateDate,Remark) values (@Name,@ParentId,@HelpCode,@Order,@IsValid,@OperatorNo,@OperatorName,@OperateDate,@Remark);select @@identity"; + cmd.CommandText = "insert into BasicDictionary (Name,ParentId,HelpCode,[Order],IsValid,OperatorNo,OperatorName,OperateDate,Remark) values (@Name,@ParentId,@HelpCode,@Order,@IsValid,@OperatorNo,@OperatorName,@OperateDate,@Remark);select @@identity"; //从实体中取出值放入Command的参数列表 cmd.Parameters.Add(new SqlParameter("@Name",basicDictionary.Name==null?(object)DBNull.Value:(object)basicDictionary.Name)); cmd.Parameters.Add(new SqlParameter("@ParentId",basicDictionary.ParentId.HasValue?(object)basicDictionary.ParentId.Value:(object)DBNull.Value)); @@ -175,7 +175,7 @@ namespace AIMSDAL /// 影响的记录行数 internal static int ExcuteUpdateCommand(SqlCommand cmd, BasicDictionary basicDictionary) { - cmd.CommandText = "update BasicDictionary set Name=@Name,ParentId=@ParentId,HelpCode=@HelpCode,Order=@Order,IsValid=@IsValid,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,Remark=@Remark where Id=@Id"; + cmd.CommandText = "update BasicDictionary set Name=@Name,ParentId=@ParentId,HelpCode=@HelpCode,[Order]=@Order,IsValid=@IsValid,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,Remark=@Remark where Id=@Id"; //从实体中取出值放入Command的参数列表 cmd.Parameters.Add(new SqlParameter("@Name",basicDictionary.Name==null?(object)DBNull.Value:(object)basicDictionary.Name)); cmd.Parameters.Add(new SqlParameter("@ParentId",basicDictionary.ParentId.HasValue?(object)basicDictionary.ParentId.Value:(object)DBNull.Value)); diff --git a/AIMSEntity/DAL/AutoGenerate/DOperationRoom.cs b/AIMSEntity/DAL/AutoGenerate/DOperationRoom.cs index 04ff4d1..a8f7f60 100644 --- a/AIMSEntity/DAL/AutoGenerate/DOperationRoom.cs +++ b/AIMSEntity/DAL/AutoGenerate/DOperationRoom.cs @@ -9,75 +9,77 @@ using System.Collections.Generic; namespace AIMSDAL { internal partial class DOperationRoom - { - #region 插入实体操作部份 - /// + { + #region 插入实体操作部份 + /// /// 插入 /// - /// Command对象 + /// Command对象 /// 实体类对象 /// 标识列值或影响的记录行数 - internal static int Insert(SqlCommand cmd, OperationRoom operationRoom) - { - cmd.Parameters.Clear(); - cmd.CommandText = "insert into OperationRoom (Name,HelpCode,Ip,RoomOrder,IsValid,OperatorNo,OperatorName,OperateDate) values (@Name,@HelpCode,@Ip,@RoomOrder,@IsValid,@OperatorNo,@OperatorName,@OperateDate);select @@identity"; - //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@Name",operationRoom.Name==null?(object)DBNull.Value:(object)operationRoom.Name)); - cmd.Parameters.Add(new SqlParameter("@HelpCode",operationRoom.HelpCode==null?(object)DBNull.Value:(object)operationRoom.HelpCode)); - cmd.Parameters.Add(new SqlParameter("@Ip",operationRoom.Ip==null?(object)DBNull.Value:(object)operationRoom.Ip)); - cmd.Parameters.Add(new SqlParameter("@RoomOrder",operationRoom.RoomOrder.HasValue?(object)operationRoom.RoomOrder.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@IsValid",operationRoom.IsValid.HasValue?(object)operationRoom.IsValid.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@OperatorNo",operationRoom.OperatorNo==null?(object)DBNull.Value:(object)operationRoom.OperatorNo)); - cmd.Parameters.Add(new SqlParameter("@OperatorName",operationRoom.OperatorName==null?(object)DBNull.Value:(object)operationRoom.OperatorName)); - cmd.Parameters.Add(new SqlParameter("@OperateDate",operationRoom.OperateDate.HasValue?(object)operationRoom.OperateDate.Value:(object)DBNull.Value)); - return Convert.ToInt32(cmd.ExecuteScalar()); - } - /// + internal static int Insert(SqlCommand cmd, OperationRoom operationRoom) + { + cmd.Parameters.Clear(); + cmd.CommandText = "insert into OperationRoom (Name,HelpCode,Ip,RoomOrder,IsValid,OperatorNo,OperatorName,OperateDate,Site,PhysioSetting) values (@Name,@HelpCode,@Ip,@RoomOrder,@IsValid,@OperatorNo,@OperatorName,@OperateDate,@Site,@PhysioSetting);select @@identity"; + //从实体中取出值放入Command的参数列表 + cmd.Parameters.Add(new SqlParameter("@Name", operationRoom.Name == null ? (object)DBNull.Value : (object)operationRoom.Name)); + cmd.Parameters.Add(new SqlParameter("@HelpCode", operationRoom.HelpCode == null ? (object)DBNull.Value : (object)operationRoom.HelpCode)); + cmd.Parameters.Add(new SqlParameter("@Ip", operationRoom.Ip == null ? (object)DBNull.Value : (object)operationRoom.Ip)); + cmd.Parameters.Add(new SqlParameter("@RoomOrder", operationRoom.RoomOrder.HasValue ? (object)operationRoom.RoomOrder.Value : (object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@IsValid", operationRoom.IsValid.HasValue ? (object)operationRoom.IsValid.Value : (object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@OperatorNo", operationRoom.OperatorNo == null ? (object)DBNull.Value : (object)operationRoom.OperatorNo)); + cmd.Parameters.Add(new SqlParameter("@OperatorName", operationRoom.OperatorName == null ? (object)DBNull.Value : (object)operationRoom.OperatorName)); + cmd.Parameters.Add(new SqlParameter("@OperateDate", operationRoom.OperateDate.HasValue ? (object)operationRoom.OperateDate.Value : (object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@Site", operationRoom.Site == null ? (object)DBNull.Value : (object)operationRoom.Site)); + cmd.Parameters.Add(new SqlParameter("@PhysioSetting", operationRoom.PhysioSetting == null ? (object)DBNull.Value : (object)operationRoom.PhysioSetting)); + return Convert.ToInt32(cmd.ExecuteScalar()); + } + /// /// 不使用事务的插入方法 /// /// 实体类对象 /// 标识列值或影响的记录行数 - internal static int Insert(OperationRoom operationRoom) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); + internal static int Insert(OperationRoom operationRoom) + { + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) + { + conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) { return Insert(cmd, operationRoom); } - } - } - - /// + } + } + + /// /// 使用事务的插入方法 /// /// 实现共享Connection的对象 /// 实体类对象 /// 标识列值或影响的记录行数 - internal static int Insert(Connection connection,OperationRoom operationRoom) + internal static int Insert(Connection connection, OperationRoom operationRoom) { return Insert(connection.Command, operationRoom); } - #endregion - - #region 删除实体操作 - - /// + #endregion + + #region 删除实体操作 + + /// /// 删除 /// - /// Command对象 + /// Command对象 /// 实体类对象 /// 影响的记录行数 - internal static int ExcuteDeleteCommand(SqlCommand cmd, OperationRoom operationRoom) + internal static int ExcuteDeleteCommand(SqlCommand cmd, OperationRoom operationRoom) { - cmd.Parameters.Clear(); + cmd.Parameters.Clear(); cmd.CommandText = "delete from OperationRoom where Id=@Id"; //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@Id", operationRoom.Id)); + cmd.Parameters.Add(new SqlParameter("@Id", operationRoom.Id)); return cmd.ExecuteNonQuery(); } - /// + /// /// 不使用事务的删除方法 /// /// 实体类对象 @@ -93,18 +95,18 @@ namespace AIMSDAL } } } - /// + /// /// 使用事务的删除方法 /// /// 实现共享Connection的对象 /// 实体类对象 /// 影响的记录行数 - internal static int Delete(Connection connection,OperationRoom operationRoom) + internal static int Delete(Connection connection, OperationRoom operationRoom) { - return ExcuteDeleteCommand(connection.Command, operationRoom); - } - - /// + return ExcuteDeleteCommand(connection.Command, operationRoom); + } + + /// /// 执行删除命令 /// /// Command对象 @@ -131,8 +133,8 @@ namespace AIMSDAL } return cmd.ExecuteNonQuery(); } - - /// + + /// /// 不使用事务的删除方法 /// /// 对象查询语句 @@ -149,8 +151,8 @@ namespace AIMSDAL } } } - - /// + + /// /// 使用事务的删除方法 /// /// 实现共享Connection的对象 @@ -161,60 +163,62 @@ namespace AIMSDAL { return ExcuteDeleteCommand(connection.Command, oql, parameters); } - - #endregion - - #region 更新实体操作 - - /// + + #endregion + + #region 更新实体操作 + + /// /// 更新 /// - /// Command对象 + /// Command对象 /// 实体类对象 /// 影响的记录行数 - internal static int ExcuteUpdateCommand(SqlCommand cmd, OperationRoom operationRoom) - { - cmd.CommandText = "update OperationRoom set Name=@Name,HelpCode=@HelpCode,Ip=@Ip,RoomOrder=@RoomOrder,IsValid=@IsValid,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate where Id=@Id"; - //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@Name",operationRoom.Name==null?(object)DBNull.Value:(object)operationRoom.Name)); - cmd.Parameters.Add(new SqlParameter("@HelpCode",operationRoom.HelpCode==null?(object)DBNull.Value:(object)operationRoom.HelpCode)); - cmd.Parameters.Add(new SqlParameter("@Ip",operationRoom.Ip==null?(object)DBNull.Value:(object)operationRoom.Ip)); - cmd.Parameters.Add(new SqlParameter("@RoomOrder",operationRoom.RoomOrder.HasValue?(object)operationRoom.RoomOrder.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@IsValid",operationRoom.IsValid.HasValue?(object)operationRoom.IsValid.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@OperatorNo",operationRoom.OperatorNo==null?(object)DBNull.Value:(object)operationRoom.OperatorNo)); - cmd.Parameters.Add(new SqlParameter("@OperatorName",operationRoom.OperatorName==null?(object)DBNull.Value:(object)operationRoom.OperatorName)); - cmd.Parameters.Add(new SqlParameter("@OperateDate",operationRoom.OperateDate.HasValue?(object)operationRoom.OperateDate.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@Id", operationRoom.Id)); + internal static int ExcuteUpdateCommand(SqlCommand cmd, OperationRoom operationRoom) + { + cmd.CommandText = "update OperationRoom set Name=@Name,HelpCode=@HelpCode,Ip=@Ip,RoomOrder=@RoomOrder,IsValid=@IsValid,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,Site=@Site,PhysioSetting=@PhysioSetting where Id=@Id"; + //从实体中取出值放入Command的参数列表 + cmd.Parameters.Add(new SqlParameter("@Name", operationRoom.Name == null ? (object)DBNull.Value : (object)operationRoom.Name)); + cmd.Parameters.Add(new SqlParameter("@HelpCode", operationRoom.HelpCode == null ? (object)DBNull.Value : (object)operationRoom.HelpCode)); + cmd.Parameters.Add(new SqlParameter("@Ip", operationRoom.Ip == null ? (object)DBNull.Value : (object)operationRoom.Ip)); + cmd.Parameters.Add(new SqlParameter("@RoomOrder", operationRoom.RoomOrder.HasValue ? (object)operationRoom.RoomOrder.Value : (object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@IsValid", operationRoom.IsValid.HasValue ? (object)operationRoom.IsValid.Value : (object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@OperatorNo", operationRoom.OperatorNo == null ? (object)DBNull.Value : (object)operationRoom.OperatorNo)); + cmd.Parameters.Add(new SqlParameter("@OperatorName", operationRoom.OperatorName == null ? (object)DBNull.Value : (object)operationRoom.OperatorName)); + cmd.Parameters.Add(new SqlParameter("@OperateDate", operationRoom.OperateDate.HasValue ? (object)operationRoom.OperateDate.Value : (object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@Site", operationRoom.Site == null ? (object)DBNull.Value : (object)operationRoom.Site)); + cmd.Parameters.Add(new SqlParameter("@PhysioSetting", operationRoom.PhysioSetting == null ? (object)DBNull.Value : (object)operationRoom.PhysioSetting)); + cmd.Parameters.Add(new SqlParameter("@Id", operationRoom.Id)); return cmd.ExecuteNonQuery(); - } - - /// + } + + /// /// 不使用事务的更新方法 /// /// 实体类对象 /// 影响的记录行数 - internal static int Update(OperationRoom operationRoom) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); + internal static int Update(OperationRoom operationRoom) + { + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) + { + conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) { return ExcuteUpdateCommand(cmd, operationRoom); } - } - } - /// + } + } + /// /// 使用事务的更新方法 /// /// 实现共享Connection的对象 /// 实体类对象 /// 影响的记录行数 - internal static int Update(Connection connection,OperationRoom operationRoom) + internal static int Update(Connection connection, OperationRoom operationRoom) { return ExcuteUpdateCommand(connection.Command, operationRoom); - } - /// + } + /// /// 执行更新命令 /// /// Command对象 @@ -226,7 +230,7 @@ namespace AIMSDAL //解析过滤部份Sql语句 string updateString = SyntaxAnalyzer.ParseSql(oql, new OperationRoomMap()); cmd.CommandText = "update OperationRoom set " + updateString; - cmd.Parameters.Clear(); + cmd.Parameters.Clear(); //添加参数 if (parameters != null) { @@ -237,8 +241,8 @@ namespace AIMSDAL } return cmd.ExecuteNonQuery(); } - - /// + + /// /// 不使用事务的更新方法 /// /// 对象查询语句 @@ -255,8 +259,8 @@ namespace AIMSDAL } } } - - /// + + /// /// 使用事务的更新方法 /// /// 实现共享Connection的对象 @@ -267,17 +271,17 @@ namespace AIMSDAL { return ExcuteUpdateCommand(connection.Command, oql, parameters); } - #endregion - - #region 查询实体集合 - /// + #endregion + + #region 查询实体集合 + /// /// 执行Command获取对象列表 /// /// Command对象 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体类对象列表 - internal static List ExcuteSelectCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth) + internal static List ExcuteSelectCommand(SqlCommand cmd, RecursiveType recursiveType, int recursiveDepth) { List operationRoomList = new List(); using (SqlDataReader dr = cmd.ExecuteReader()) @@ -288,25 +292,25 @@ namespace AIMSDAL operationRoomList.Add(operationRoom); } } - return operationRoomList; + return operationRoomList; } - /// + /// /// 执行查询命令 /// /// Command对象 /// 对象查询语句 /// 参数列表 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体类对象集合 - internal static List ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth) + internal static List ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) { //解析过滤部份Sql语句 string filterString = SyntaxAnalyzer.ParseSql(oql, new OperationRoomMap()); if (filterString != string.Empty) { - if(filterString.Trim().ToLower().IndexOf("order ")!=0) - filterString = " where " + filterString; + if (filterString.Trim().ToLower().IndexOf("order ") != 0) + filterString = " where " + filterString; } cmd.Parameters.Clear(); cmd.CommandText = "select * from OperationRoom " + filterString; @@ -320,14 +324,14 @@ namespace AIMSDAL } return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth); } - - /// + + /// /// 根据对象查询语句查询实体集合 /// /// 实体类对象集合 internal static List Select() { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) { conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) @@ -337,15 +341,15 @@ namespace AIMSDAL } } } - /// + /// /// 根据对象查询语句查询实体集合 /// - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体类对象集合 internal static List Select(RecursiveType recursiveType, int recursiveDepth) { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) { conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) @@ -355,8 +359,8 @@ namespace AIMSDAL } } } - - /// + + /// /// 根据对象查询语句查询实体集合 /// /// 对象查询语句 @@ -364,7 +368,7 @@ namespace AIMSDAL /// 实体类对象集合 internal static List Select(string oql, ParameterList parameters) { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) { conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) @@ -373,18 +377,18 @@ namespace AIMSDAL } } } - - /// + + /// /// 根据对象查询语句查询实体集合 /// /// 对象查询语句 /// 参数列表 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体类对象集合 - internal static List Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth) + internal static List Select(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) { conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) @@ -393,62 +397,62 @@ namespace AIMSDAL } } } - - /// + + /// /// 根据对象查询语句查询实体集合(启用事务) /// /// 连接对象 /// 对象查询语句 /// 参数列表 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体类对象集合 internal static List Select(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) { - return ExcuteSelectCommand(connection.Command, oql, parameters,recursiveType, recursiveDepth); + return ExcuteSelectCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth); } - #endregion - - #region 查询单个实体 - - /// + #endregion + + #region 查询单个实体 + + /// /// 递归查询单个实体 /// /// Command对象 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体对象 - internal static OperationRoom ExcuteSelectSingleCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth) - { - OperationRoom operationRoom=null; - using (SqlDataReader dr = cmd.ExecuteReader()) + internal static OperationRoom ExcuteSelectSingleCommand(SqlCommand cmd, RecursiveType recursiveType, int recursiveDepth) + { + OperationRoom operationRoom = null; + using (SqlDataReader dr = cmd.ExecuteReader()) { - if(dr.Read()) - operationRoom = DataReaderToEntity(dr); - } - if(operationRoom==null) - return operationRoom; + if (dr.Read()) + operationRoom = DataReaderToEntity(dr); + } + if (operationRoom == null) + return operationRoom; return operationRoom; - } - /// + } + /// /// 更据对象查询语句递归查询单个实体 /// /// Command对象 /// 对象查询语句 /// 参数列表 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体对象 - internal static OperationRoom ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth) + internal static OperationRoom ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) { //解析过滤部份Sql语句 string filterString = SyntaxAnalyzer.ParseSql(oql, new OperationRoomMap()); - if(filterString!=string.Empty) - { - filterString=" where "+filterString; - } + if (filterString != string.Empty) + { + filterString = " where " + filterString; + } cmd.CommandText = "select * from OperationRoom " + filterString; - cmd.Parameters.Clear(); + cmd.Parameters.Clear(); //添加参数 if (parameters != null) { @@ -459,29 +463,29 @@ namespace AIMSDAL } return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth); } - - /// + + /// /// 更据对象查询语句递归查询单个实体 /// /// Command对象 /// 对象查询语句 /// 参数列表 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体对象 internal static OperationRoom SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) { conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) { return ExcuteSelectSingleCommand(cmd, oql, parameters, recursiveType, recursiveDepth); - } - } + } + } } - - /// + + /// /// 更据对象查询语句查询单个实体 /// /// Command对象 @@ -490,10 +494,10 @@ namespace AIMSDAL /// 实体对象 internal static OperationRoom SelectSingle(string oql, ParameterList parameters) { - return SelectSingle(oql,parameters,RecursiveType.Parent,1); + return SelectSingle(oql, parameters, RecursiveType.Parent, 1); } - - /// + + /// /// 更据对象查询语句并启用事务查询单个实体 /// /// 连接对象 @@ -504,124 +508,132 @@ namespace AIMSDAL { return ExcuteSelectSingleCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth); } - - /// + + /// /// 更据主键值递归查询单个实体 /// /// Command对象 /// 主键值 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体对象 - internal static OperationRoom SelectSingle(SqlCommand cmd, int? id,RecursiveType recursiveType,int recursiveDepth) - { - cmd.Parameters.Clear(); - if(id.HasValue) - { - cmd.CommandText = "select * from OperationRoom where Id=@pk"; - cmd.Parameters.Add(new SqlParameter("@pk",id.Value)); - } - else - { - cmd.CommandText = "select * from OperationRoom where Id is null"; - } - return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth); - } - - /// + internal static OperationRoom SelectSingle(SqlCommand cmd, int? id, RecursiveType recursiveType, int recursiveDepth) + { + cmd.Parameters.Clear(); + if (id.HasValue) + { + cmd.CommandText = "select * from OperationRoom where Id=@pk"; + cmd.Parameters.Add(new SqlParameter("@pk", id.Value)); + } + else + { + cmd.CommandText = "select * from OperationRoom where Id is null"; + } + return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth); + } + + /// /// 按主键字段查询特定实体 /// /// 主键值 /// 实体类对象 internal static OperationRoom SelectSingle(int? id) { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) { conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) { - return SelectSingle(cmd,id,RecursiveType.Parent,1); - } - } + return SelectSingle(cmd, id, RecursiveType.Parent, 1); + } + } } - /// + /// /// 按主键字段查询特定实体 /// /// 主键值 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体类对象 internal static OperationRoom SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth) { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) { conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) { - return SelectSingle(cmd,id, recursiveType, recursiveDepth); - } - } + return SelectSingle(cmd, id, recursiveType, recursiveDepth); + } + } } - - /// + + /// /// 使用事务并按主键字段查询特定实体 /// - /// 连接对象 + /// 连接对象 /// 主键值 /// 实体类对象 - internal static OperationRoom SelectSingle(Connection connection,int? id, RecursiveType recursiveType, int recursiveDepth) + internal static OperationRoom SelectSingle(Connection connection, int? id, RecursiveType recursiveType, int recursiveDepth) { - return SelectSingle(connection.Command, id, recursiveType, recursiveDepth); + return SelectSingle(connection.Command, id, recursiveType, recursiveDepth); } - #endregion - - - /// + #endregion + + + /// /// 从DataReader中取出值生成实体对象 /// /// 查询对象 /// 过滤条件字符串 - private static OperationRoom DataReaderToEntity(SqlDataReader dr) - { - OperationRoom entity = new OperationRoom (); - if(dr["Id"]!=System.DBNull.Value) - { - entity.Id=Convert.ToInt32(dr["Id"]); - } - if(dr["Name"]!=System.DBNull.Value) - { - entity.Name=dr["Name"].ToString(); - } - if(dr["HelpCode"]!=System.DBNull.Value) - { - entity.HelpCode=dr["HelpCode"].ToString(); - } - if(dr["Ip"]!=System.DBNull.Value) - { - entity.Ip=dr["Ip"].ToString(); - } - if(dr["RoomOrder"]!=System.DBNull.Value) - { - entity.RoomOrder=Convert.ToInt32(dr["RoomOrder"]); - } - if(dr["IsValid"]!=System.DBNull.Value) - { - entity.IsValid=Convert.ToInt32(dr["IsValid"]); - } - if(dr["OperatorNo"]!=System.DBNull.Value) - { - entity.OperatorNo=dr["OperatorNo"].ToString(); - } - if(dr["OperatorName"]!=System.DBNull.Value) - { - entity.OperatorName=dr["OperatorName"].ToString(); - } - if(dr["OperateDate"]!=System.DBNull.Value) - { - entity.OperateDate=Convert.ToDateTime(dr["OperateDate"]); - } - return entity; - } - } + private static OperationRoom DataReaderToEntity(SqlDataReader dr) + { + OperationRoom entity = new OperationRoom(); + if (dr["Id"] != System.DBNull.Value) + { + entity.Id = Convert.ToInt32(dr["Id"]); + } + if (dr["Name"] != System.DBNull.Value) + { + entity.Name = dr["Name"].ToString(); + } + if (dr["HelpCode"] != System.DBNull.Value) + { + entity.HelpCode = dr["HelpCode"].ToString(); + } + if (dr["Ip"] != System.DBNull.Value) + { + entity.Ip = dr["Ip"].ToString(); + } + if (dr["RoomOrder"] != System.DBNull.Value) + { + entity.RoomOrder = Convert.ToInt32(dr["RoomOrder"]); + } + if (dr["IsValid"] != System.DBNull.Value) + { + entity.IsValid = Convert.ToInt32(dr["IsValid"]); + } + if (dr["OperatorNo"] != System.DBNull.Value) + { + entity.OperatorNo = dr["OperatorNo"].ToString(); + } + if (dr["OperatorName"] != System.DBNull.Value) + { + entity.OperatorName = dr["OperatorName"].ToString(); + } + if (dr["OperateDate"] != System.DBNull.Value) + { + entity.OperateDate = Convert.ToDateTime(dr["OperateDate"]); + } + if (dr["Site"] != System.DBNull.Value) + { + entity.Site = dr["Site"].ToString(); + } + if (dr["PhysioSetting"] != System.DBNull.Value) + { + entity.PhysioSetting = dr["PhysioSetting"].ToString(); + } + return entity; + } + } } diff --git a/AIMSEntity/DAL/AutoGenerate/DOrisPatient.cs b/AIMSEntity/DAL/AutoGenerate/DOrisPatient.cs index 146511f..67b547b 100644 --- a/AIMSEntity/DAL/AutoGenerate/DOrisPatient.cs +++ b/AIMSEntity/DAL/AutoGenerate/DOrisPatient.cs @@ -9,87 +9,97 @@ using System.Collections.Generic; namespace AIMSDAL { internal partial class DOrisPatient - { - #region 插入实体操作部份 - /// + { + #region 插入实体操作部份 + /// /// 插入 /// - /// Command对象 + /// Command对象 /// 实体类对象 /// 标识列值或影响的记录行数 - internal static int Insert(SqlCommand cmd, OrisPatient orisPatient) - { - cmd.Parameters.Clear(); - cmd.CommandText = "insert into Oris_Patient (MdrecNo,ArchivesNo,Name,Sex,BirthDay,Height,Weight,DepId,Illdistrict,SickBed,BloodType,RHBloodType,PatientKind,InHosDate,IdentityCard,Contacts,ContactsPhone,OperatorNo,OperatorName,OperateDate) values (@MdrecNo,@ArchivesNo,@Name,@Sex,@BirthDay,@Height,@Weight,@DepId,@Illdistrict,@SickBed,@BloodType,@RHBloodType,@PatientKind,@InHosDate,@IdentityCard,@Contacts,@ContactsPhone,@OperatorNo,@OperatorName,@OperateDate);select @@identity"; - //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@MdrecNo",orisPatient.MdrecNo==null?(object)DBNull.Value:(object)orisPatient.MdrecNo)); - cmd.Parameters.Add(new SqlParameter("@ArchivesNo",orisPatient.ArchivesNo==null?(object)DBNull.Value:(object)orisPatient.ArchivesNo)); - cmd.Parameters.Add(new SqlParameter("@Name",orisPatient.Name==null?(object)DBNull.Value:(object)orisPatient.Name)); - cmd.Parameters.Add(new SqlParameter("@Sex",orisPatient.Sex==null?(object)DBNull.Value:(object)orisPatient.Sex)); - cmd.Parameters.Add(new SqlParameter("@BirthDay",orisPatient.BirthDay.HasValue?(object)orisPatient.BirthDay.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@Height",orisPatient.Height==null?(object)DBNull.Value:(object)orisPatient.Height)); - cmd.Parameters.Add(new SqlParameter("@Weight",orisPatient.Weight==null?(object)DBNull.Value:(object)orisPatient.Weight)); - cmd.Parameters.Add(new SqlParameter("@DepId",orisPatient.DepId.HasValue?(object)orisPatient.DepId.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@Illdistrict",orisPatient.Illdistrict==null?(object)DBNull.Value:(object)orisPatient.Illdistrict)); - cmd.Parameters.Add(new SqlParameter("@SickBed",orisPatient.SickBed==null?(object)DBNull.Value:(object)orisPatient.SickBed)); - cmd.Parameters.Add(new SqlParameter("@BloodType",orisPatient.BloodType==null?(object)DBNull.Value:(object)orisPatient.BloodType)); - cmd.Parameters.Add(new SqlParameter("@RHBloodType",orisPatient.RHBloodType==null?(object)DBNull.Value:(object)orisPatient.RHBloodType)); - cmd.Parameters.Add(new SqlParameter("@PatientKind",orisPatient.PatientKind==null?(object)DBNull.Value:(object)orisPatient.PatientKind)); - cmd.Parameters.Add(new SqlParameter("@InHosDate",orisPatient.InHosDate.HasValue?(object)orisPatient.InHosDate.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@IdentityCard",orisPatient.IdentityCard==null?(object)DBNull.Value:(object)orisPatient.IdentityCard)); - cmd.Parameters.Add(new SqlParameter("@Contacts",orisPatient.Contacts==null?(object)DBNull.Value:(object)orisPatient.Contacts)); - cmd.Parameters.Add(new SqlParameter("@ContactsPhone",orisPatient.ContactsPhone==null?(object)DBNull.Value:(object)orisPatient.ContactsPhone)); - cmd.Parameters.Add(new SqlParameter("@OperatorNo",orisPatient.OperatorNo==null?(object)DBNull.Value:(object)orisPatient.OperatorNo)); - cmd.Parameters.Add(new SqlParameter("@OperatorName",orisPatient.OperatorName==null?(object)DBNull.Value:(object)orisPatient.OperatorName)); - cmd.Parameters.Add(new SqlParameter("@OperateDate",orisPatient.OperateDate.HasValue?(object)orisPatient.OperateDate.Value:(object)DBNull.Value)); - return Convert.ToInt32(cmd.ExecuteScalar()); - } - /// + internal static int Insert(SqlCommand cmd, OrisPatient orisPatient) + { + cmd.Parameters.Clear(); + cmd.CommandText = "insert into Oris_Patient (MdrecNo,ArchivesNo,Name,Sex,BirthDay,Height,Weight,DepId,Illdistrict,SickBed,BloodType,RHBloodType,PatientKind,InHosDate,IdentityCard,Contacts,ContactsPhone,OperatorNo,OperatorName,OperateDate,PatientType,HisPatientId,VisitTimes,Address,Nation,Extend1,Extend2,Extend3,Extend4,Extend5) values (@MdrecNo,@ArchivesNo,@Name,@Sex,@BirthDay,@Height,@Weight,@DepId,@Illdistrict,@SickBed,@BloodType,@RHBloodType,@PatientKind,@InHosDate,@IdentityCard,@Contacts,@ContactsPhone,@OperatorNo,@OperatorName,@OperateDate,@PatientType,@HisPatientId,@VisitTimes,@Address,@Nation,@Extend1,@Extend2,@Extend3,@Extend4,@Extend5);select @@identity"; + //从实体中取出值放入Command的参数列表 + cmd.Parameters.Add(new SqlParameter("@MdrecNo", orisPatient.MdrecNo == null ? (object)DBNull.Value : (object)orisPatient.MdrecNo)); + cmd.Parameters.Add(new SqlParameter("@ArchivesNo", orisPatient.ArchivesNo == null ? (object)DBNull.Value : (object)orisPatient.ArchivesNo)); + cmd.Parameters.Add(new SqlParameter("@Name", orisPatient.Name == null ? (object)DBNull.Value : (object)orisPatient.Name)); + cmd.Parameters.Add(new SqlParameter("@Sex", orisPatient.Sex == null ? (object)DBNull.Value : (object)orisPatient.Sex)); + cmd.Parameters.Add(new SqlParameter("@BirthDay", orisPatient.BirthDay.HasValue ? (object)orisPatient.BirthDay.Value : (object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@Height", orisPatient.Height == null ? (object)DBNull.Value : (object)orisPatient.Height)); + cmd.Parameters.Add(new SqlParameter("@Weight", orisPatient.Weight == null ? (object)DBNull.Value : (object)orisPatient.Weight)); + cmd.Parameters.Add(new SqlParameter("@DepId", orisPatient.DepId.HasValue ? (object)orisPatient.DepId.Value : (object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@Illdistrict", orisPatient.Illdistrict == null ? (object)DBNull.Value : (object)orisPatient.Illdistrict)); + cmd.Parameters.Add(new SqlParameter("@SickBed", orisPatient.SickBed == null ? (object)DBNull.Value : (object)orisPatient.SickBed)); + cmd.Parameters.Add(new SqlParameter("@BloodType", orisPatient.BloodType == null ? (object)DBNull.Value : (object)orisPatient.BloodType)); + cmd.Parameters.Add(new SqlParameter("@RHBloodType", orisPatient.RHBloodType == null ? (object)DBNull.Value : (object)orisPatient.RHBloodType)); + cmd.Parameters.Add(new SqlParameter("@PatientKind", orisPatient.PatientKind == null ? (object)DBNull.Value : (object)orisPatient.PatientKind)); + cmd.Parameters.Add(new SqlParameter("@InHosDate", orisPatient.InHosDate.HasValue ? (object)orisPatient.InHosDate.Value : (object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@IdentityCard", orisPatient.IdentityCard == null ? (object)DBNull.Value : (object)orisPatient.IdentityCard)); + cmd.Parameters.Add(new SqlParameter("@Contacts", orisPatient.Contacts == null ? (object)DBNull.Value : (object)orisPatient.Contacts)); + cmd.Parameters.Add(new SqlParameter("@ContactsPhone", orisPatient.ContactsPhone == null ? (object)DBNull.Value : (object)orisPatient.ContactsPhone)); + cmd.Parameters.Add(new SqlParameter("@OperatorNo", orisPatient.OperatorNo == null ? (object)DBNull.Value : (object)orisPatient.OperatorNo)); + cmd.Parameters.Add(new SqlParameter("@OperatorName", orisPatient.OperatorName == null ? (object)DBNull.Value : (object)orisPatient.OperatorName)); + cmd.Parameters.Add(new SqlParameter("@OperateDate", orisPatient.OperateDate.HasValue ? (object)orisPatient.OperateDate.Value : (object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@PatientType", orisPatient.PatientType == null ? (object)DBNull.Value : (object)orisPatient.PatientType)); + cmd.Parameters.Add(new SqlParameter("@HisPatientId", orisPatient.HisPatientId == null ? (object)DBNull.Value : (object)orisPatient.HisPatientId)); + cmd.Parameters.Add(new SqlParameter("@VisitTimes", orisPatient.VisitTimes == null ? (object)DBNull.Value : (object)orisPatient.VisitTimes)); + cmd.Parameters.Add(new SqlParameter("@Address", orisPatient.Address == null ? (object)DBNull.Value : (object)orisPatient.Address)); + cmd.Parameters.Add(new SqlParameter("@Nation", orisPatient.Nation == null ? (object)DBNull.Value : (object)orisPatient.Nation)); + cmd.Parameters.Add(new SqlParameter("@Extend1", orisPatient.Extend1 == null ? (object)DBNull.Value : (object)orisPatient.Extend1)); + cmd.Parameters.Add(new SqlParameter("@Extend2", orisPatient.Extend2 == null ? (object)DBNull.Value : (object)orisPatient.Extend2)); + cmd.Parameters.Add(new SqlParameter("@Extend3", orisPatient.Extend3 == null ? (object)DBNull.Value : (object)orisPatient.Extend3)); + cmd.Parameters.Add(new SqlParameter("@Extend4", orisPatient.Extend4 == null ? (object)DBNull.Value : (object)orisPatient.Extend4)); + cmd.Parameters.Add(new SqlParameter("@Extend5", orisPatient.Extend5 == null ? (object)DBNull.Value : (object)orisPatient.Extend5)); + return Convert.ToInt32(cmd.ExecuteScalar()); + } + /// /// 不使用事务的插入方法 /// /// 实体类对象 /// 标识列值或影响的记录行数 - internal static int Insert(OrisPatient orisPatient) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); + internal static int Insert(OrisPatient orisPatient) + { + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) + { + conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) { return Insert(cmd, orisPatient); } - } - } - - /// + } + } + + /// /// 使用事务的插入方法 /// /// 实现共享Connection的对象 /// 实体类对象 /// 标识列值或影响的记录行数 - internal static int Insert(Connection connection,OrisPatient orisPatient) + internal static int Insert(Connection connection, OrisPatient orisPatient) { return Insert(connection.Command, orisPatient); } - #endregion - - #region 删除实体操作 - - /// + #endregion + + #region 删除实体操作 + + /// /// 删除 /// - /// Command对象 + /// Command对象 /// 实体类对象 /// 影响的记录行数 - internal static int ExcuteDeleteCommand(SqlCommand cmd, OrisPatient orisPatient) + internal static int ExcuteDeleteCommand(SqlCommand cmd, OrisPatient orisPatient) { - cmd.Parameters.Clear(); + cmd.Parameters.Clear(); cmd.CommandText = "delete from Oris_Patient where Id=@Id"; //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@Id", orisPatient.Id)); + cmd.Parameters.Add(new SqlParameter("@Id", orisPatient.Id)); return cmd.ExecuteNonQuery(); } - /// + /// /// 不使用事务的删除方法 /// /// 实体类对象 @@ -105,18 +115,18 @@ namespace AIMSDAL } } } - /// + /// /// 使用事务的删除方法 /// /// 实现共享Connection的对象 /// 实体类对象 /// 影响的记录行数 - internal static int Delete(Connection connection,OrisPatient orisPatient) + internal static int Delete(Connection connection, OrisPatient orisPatient) { - return ExcuteDeleteCommand(connection.Command, orisPatient); - } - - /// + return ExcuteDeleteCommand(connection.Command, orisPatient); + } + + /// /// 执行删除命令 /// /// Command对象 @@ -143,8 +153,8 @@ namespace AIMSDAL } return cmd.ExecuteNonQuery(); } - - /// + + /// /// 不使用事务的删除方法 /// /// 对象查询语句 @@ -161,8 +171,8 @@ namespace AIMSDAL } } } - - /// + + /// /// 使用事务的删除方法 /// /// 实现共享Connection的对象 @@ -173,72 +183,82 @@ namespace AIMSDAL { return ExcuteDeleteCommand(connection.Command, oql, parameters); } - - #endregion - - #region 更新实体操作 - - /// + + #endregion + + #region 更新实体操作 + + /// /// 更新 /// - /// Command对象 + /// Command对象 /// 实体类对象 /// 影响的记录行数 - internal static int ExcuteUpdateCommand(SqlCommand cmd, OrisPatient orisPatient) - { - cmd.CommandText = "update Oris_Patient set MdrecNo=@MdrecNo,ArchivesNo=@ArchivesNo,Name=@Name,Sex=@Sex,BirthDay=@BirthDay,Height=@Height,Weight=@Weight,DepId=@DepId,Illdistrict=@Illdistrict,SickBed=@SickBed,BloodType=@BloodType,RHBloodType=@RHBloodType,PatientKind=@PatientKind,InHosDate=@InHosDate,IdentityCard=@IdentityCard,Contacts=@Contacts,ContactsPhone=@ContactsPhone,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate where Id=@Id"; - //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@MdrecNo",orisPatient.MdrecNo==null?(object)DBNull.Value:(object)orisPatient.MdrecNo)); - cmd.Parameters.Add(new SqlParameter("@ArchivesNo",orisPatient.ArchivesNo==null?(object)DBNull.Value:(object)orisPatient.ArchivesNo)); - cmd.Parameters.Add(new SqlParameter("@Name",orisPatient.Name==null?(object)DBNull.Value:(object)orisPatient.Name)); - cmd.Parameters.Add(new SqlParameter("@Sex",orisPatient.Sex==null?(object)DBNull.Value:(object)orisPatient.Sex)); - cmd.Parameters.Add(new SqlParameter("@BirthDay",orisPatient.BirthDay.HasValue?(object)orisPatient.BirthDay.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@Height",orisPatient.Height==null?(object)DBNull.Value:(object)orisPatient.Height)); - cmd.Parameters.Add(new SqlParameter("@Weight",orisPatient.Weight==null?(object)DBNull.Value:(object)orisPatient.Weight)); - cmd.Parameters.Add(new SqlParameter("@DepId",orisPatient.DepId.HasValue?(object)orisPatient.DepId.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@Illdistrict",orisPatient.Illdistrict==null?(object)DBNull.Value:(object)orisPatient.Illdistrict)); - cmd.Parameters.Add(new SqlParameter("@SickBed",orisPatient.SickBed==null?(object)DBNull.Value:(object)orisPatient.SickBed)); - cmd.Parameters.Add(new SqlParameter("@BloodType",orisPatient.BloodType==null?(object)DBNull.Value:(object)orisPatient.BloodType)); - cmd.Parameters.Add(new SqlParameter("@RHBloodType",orisPatient.RHBloodType==null?(object)DBNull.Value:(object)orisPatient.RHBloodType)); - cmd.Parameters.Add(new SqlParameter("@PatientKind",orisPatient.PatientKind==null?(object)DBNull.Value:(object)orisPatient.PatientKind)); - cmd.Parameters.Add(new SqlParameter("@InHosDate",orisPatient.InHosDate.HasValue?(object)orisPatient.InHosDate.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@IdentityCard",orisPatient.IdentityCard==null?(object)DBNull.Value:(object)orisPatient.IdentityCard)); - cmd.Parameters.Add(new SqlParameter("@Contacts",orisPatient.Contacts==null?(object)DBNull.Value:(object)orisPatient.Contacts)); - cmd.Parameters.Add(new SqlParameter("@ContactsPhone",orisPatient.ContactsPhone==null?(object)DBNull.Value:(object)orisPatient.ContactsPhone)); - cmd.Parameters.Add(new SqlParameter("@OperatorNo",orisPatient.OperatorNo==null?(object)DBNull.Value:(object)orisPatient.OperatorNo)); - cmd.Parameters.Add(new SqlParameter("@OperatorName",orisPatient.OperatorName==null?(object)DBNull.Value:(object)orisPatient.OperatorName)); - cmd.Parameters.Add(new SqlParameter("@OperateDate",orisPatient.OperateDate.HasValue?(object)orisPatient.OperateDate.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@Id", orisPatient.Id)); + internal static int ExcuteUpdateCommand(SqlCommand cmd, OrisPatient orisPatient) + { + cmd.CommandText = "update Oris_Patient set MdrecNo=@MdrecNo,ArchivesNo=@ArchivesNo,Name=@Name,Sex=@Sex,BirthDay=@BirthDay,Height=@Height,Weight=@Weight,DepId=@DepId,Illdistrict=@Illdistrict,SickBed=@SickBed,BloodType=@BloodType,RHBloodType=@RHBloodType,PatientKind=@PatientKind,InHosDate=@InHosDate,IdentityCard=@IdentityCard,Contacts=@Contacts,ContactsPhone=@ContactsPhone,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,PatientType=@PatientType,HisPatientId=@HisPatientId,VisitTimes=@VisitTimes,Address=@Address,Nation=@Nation,Extend1=@Extend1,Extend2=@Extend2,Extend3=@Extend3,Extend4=@Extend4,Extend5=@Extend5 where Id=@Id"; + //从实体中取出值放入Command的参数列表 + cmd.Parameters.Add(new SqlParameter("@MdrecNo", orisPatient.MdrecNo == null ? (object)DBNull.Value : (object)orisPatient.MdrecNo)); + cmd.Parameters.Add(new SqlParameter("@ArchivesNo", orisPatient.ArchivesNo == null ? (object)DBNull.Value : (object)orisPatient.ArchivesNo)); + cmd.Parameters.Add(new SqlParameter("@Name", orisPatient.Name == null ? (object)DBNull.Value : (object)orisPatient.Name)); + cmd.Parameters.Add(new SqlParameter("@Sex", orisPatient.Sex == null ? (object)DBNull.Value : (object)orisPatient.Sex)); + cmd.Parameters.Add(new SqlParameter("@BirthDay", orisPatient.BirthDay.HasValue ? (object)orisPatient.BirthDay.Value : (object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@Height", orisPatient.Height == null ? (object)DBNull.Value : (object)orisPatient.Height)); + cmd.Parameters.Add(new SqlParameter("@Weight", orisPatient.Weight == null ? (object)DBNull.Value : (object)orisPatient.Weight)); + cmd.Parameters.Add(new SqlParameter("@DepId", orisPatient.DepId.HasValue ? (object)orisPatient.DepId.Value : (object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@Illdistrict", orisPatient.Illdistrict == null ? (object)DBNull.Value : (object)orisPatient.Illdistrict)); + cmd.Parameters.Add(new SqlParameter("@SickBed", orisPatient.SickBed == null ? (object)DBNull.Value : (object)orisPatient.SickBed)); + cmd.Parameters.Add(new SqlParameter("@BloodType", orisPatient.BloodType == null ? (object)DBNull.Value : (object)orisPatient.BloodType)); + cmd.Parameters.Add(new SqlParameter("@RHBloodType", orisPatient.RHBloodType == null ? (object)DBNull.Value : (object)orisPatient.RHBloodType)); + cmd.Parameters.Add(new SqlParameter("@PatientKind", orisPatient.PatientKind == null ? (object)DBNull.Value : (object)orisPatient.PatientKind)); + cmd.Parameters.Add(new SqlParameter("@InHosDate", orisPatient.InHosDate.HasValue ? (object)orisPatient.InHosDate.Value : (object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@IdentityCard", orisPatient.IdentityCard == null ? (object)DBNull.Value : (object)orisPatient.IdentityCard)); + cmd.Parameters.Add(new SqlParameter("@Contacts", orisPatient.Contacts == null ? (object)DBNull.Value : (object)orisPatient.Contacts)); + cmd.Parameters.Add(new SqlParameter("@ContactsPhone", orisPatient.ContactsPhone == null ? (object)DBNull.Value : (object)orisPatient.ContactsPhone)); + cmd.Parameters.Add(new SqlParameter("@OperatorNo", orisPatient.OperatorNo == null ? (object)DBNull.Value : (object)orisPatient.OperatorNo)); + cmd.Parameters.Add(new SqlParameter("@OperatorName", orisPatient.OperatorName == null ? (object)DBNull.Value : (object)orisPatient.OperatorName)); + cmd.Parameters.Add(new SqlParameter("@OperateDate", orisPatient.OperateDate.HasValue ? (object)orisPatient.OperateDate.Value : (object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@PatientType", orisPatient.PatientType == null ? (object)DBNull.Value : (object)orisPatient.PatientType)); + cmd.Parameters.Add(new SqlParameter("@HisPatientId", orisPatient.HisPatientId == null ? (object)DBNull.Value : (object)orisPatient.HisPatientId)); + cmd.Parameters.Add(new SqlParameter("@VisitTimes", orisPatient.VisitTimes == null ? (object)DBNull.Value : (object)orisPatient.VisitTimes)); + cmd.Parameters.Add(new SqlParameter("@Address", orisPatient.Address == null ? (object)DBNull.Value : (object)orisPatient.Address)); + cmd.Parameters.Add(new SqlParameter("@Nation", orisPatient.Nation == null ? (object)DBNull.Value : (object)orisPatient.Nation)); + cmd.Parameters.Add(new SqlParameter("@Extend1", orisPatient.Extend1 == null ? (object)DBNull.Value : (object)orisPatient.Extend1)); + cmd.Parameters.Add(new SqlParameter("@Extend2", orisPatient.Extend2 == null ? (object)DBNull.Value : (object)orisPatient.Extend2)); + cmd.Parameters.Add(new SqlParameter("@Extend3", orisPatient.Extend3 == null ? (object)DBNull.Value : (object)orisPatient.Extend3)); + cmd.Parameters.Add(new SqlParameter("@Extend4", orisPatient.Extend4 == null ? (object)DBNull.Value : (object)orisPatient.Extend4)); + cmd.Parameters.Add(new SqlParameter("@Extend5", orisPatient.Extend5 == null ? (object)DBNull.Value : (object)orisPatient.Extend5)); + cmd.Parameters.Add(new SqlParameter("@Id", orisPatient.Id)); return cmd.ExecuteNonQuery(); - } - - /// + } + + /// /// 不使用事务的更新方法 /// /// 实体类对象 /// 影响的记录行数 - internal static int Update(OrisPatient orisPatient) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); + internal static int Update(OrisPatient orisPatient) + { + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) + { + conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) { return ExcuteUpdateCommand(cmd, orisPatient); } - } - } - /// + } + } + /// /// 使用事务的更新方法 /// /// 实现共享Connection的对象 /// 实体类对象 /// 影响的记录行数 - internal static int Update(Connection connection,OrisPatient orisPatient) + internal static int Update(Connection connection, OrisPatient orisPatient) { return ExcuteUpdateCommand(connection.Command, orisPatient); - } - /// + } + /// /// 执行更新命令 /// /// Command对象 @@ -250,7 +270,7 @@ namespace AIMSDAL //解析过滤部份Sql语句 string updateString = SyntaxAnalyzer.ParseSql(oql, new OrisPatientMap()); cmd.CommandText = "update Oris_Patient set " + updateString; - cmd.Parameters.Clear(); + cmd.Parameters.Clear(); //添加参数 if (parameters != null) { @@ -261,8 +281,8 @@ namespace AIMSDAL } return cmd.ExecuteNonQuery(); } - - /// + + /// /// 不使用事务的更新方法 /// /// 对象查询语句 @@ -279,8 +299,8 @@ namespace AIMSDAL } } } - - /// + + /// /// 使用事务的更新方法 /// /// 实现共享Connection的对象 @@ -291,17 +311,17 @@ namespace AIMSDAL { return ExcuteUpdateCommand(connection.Command, oql, parameters); } - #endregion - - #region 查询实体集合 - /// + #endregion + + #region 查询实体集合 + /// /// 执行Command获取对象列表 /// /// Command对象 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体类对象列表 - internal static List ExcuteSelectCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth) + internal static List ExcuteSelectCommand(SqlCommand cmd, RecursiveType recursiveType, int recursiveDepth) { List orisPatientList = new List(); using (SqlDataReader dr = cmd.ExecuteReader()) @@ -312,25 +332,25 @@ namespace AIMSDAL orisPatientList.Add(orisPatient); } } - return orisPatientList; + return orisPatientList; } - /// + /// /// 执行查询命令 /// /// Command对象 /// 对象查询语句 /// 参数列表 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体类对象集合 - internal static List ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth) + internal static List ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) { //解析过滤部份Sql语句 string filterString = SyntaxAnalyzer.ParseSql(oql, new OrisPatientMap()); if (filterString != string.Empty) { - if(filterString.Trim().ToLower().IndexOf("order ")!=0) - filterString = " where " + filterString; + if (filterString.Trim().ToLower().IndexOf("order ") != 0) + filterString = " where " + filterString; } cmd.Parameters.Clear(); cmd.CommandText = "select * from Oris_Patient " + filterString; @@ -344,14 +364,14 @@ namespace AIMSDAL } return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth); } - - /// + + /// /// 根据对象查询语句查询实体集合 /// /// 实体类对象集合 internal static List Select() { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) { conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) @@ -361,15 +381,15 @@ namespace AIMSDAL } } } - /// + /// /// 根据对象查询语句查询实体集合 /// - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体类对象集合 internal static List Select(RecursiveType recursiveType, int recursiveDepth) { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) { conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) @@ -379,8 +399,8 @@ namespace AIMSDAL } } } - - /// + + /// /// 根据对象查询语句查询实体集合 /// /// 对象查询语句 @@ -388,7 +408,7 @@ namespace AIMSDAL /// 实体类对象集合 internal static List Select(string oql, ParameterList parameters) { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) { conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) @@ -397,18 +417,18 @@ namespace AIMSDAL } } } - - /// + + /// /// 根据对象查询语句查询实体集合 /// /// 对象查询语句 /// 参数列表 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体类对象集合 - internal static List Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth) + internal static List Select(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) { conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) @@ -417,62 +437,62 @@ namespace AIMSDAL } } } - - /// + + /// /// 根据对象查询语句查询实体集合(启用事务) /// /// 连接对象 /// 对象查询语句 /// 参数列表 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体类对象集合 internal static List Select(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) { - return ExcuteSelectCommand(connection.Command, oql, parameters,recursiveType, recursiveDepth); + return ExcuteSelectCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth); } - #endregion - - #region 查询单个实体 - - /// + #endregion + + #region 查询单个实体 + + /// /// 递归查询单个实体 /// /// Command对象 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体对象 - internal static OrisPatient ExcuteSelectSingleCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth) - { - OrisPatient orisPatient=null; - using (SqlDataReader dr = cmd.ExecuteReader()) + internal static OrisPatient ExcuteSelectSingleCommand(SqlCommand cmd, RecursiveType recursiveType, int recursiveDepth) + { + OrisPatient orisPatient = null; + using (SqlDataReader dr = cmd.ExecuteReader()) { - if(dr.Read()) - orisPatient = DataReaderToEntity(dr); - } - if(orisPatient==null) - return orisPatient; + if (dr.Read()) + orisPatient = DataReaderToEntity(dr); + } + if (orisPatient == null) + return orisPatient; return orisPatient; - } - /// + } + /// /// 更据对象查询语句递归查询单个实体 /// /// Command对象 /// 对象查询语句 /// 参数列表 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体对象 - internal static OrisPatient ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth) + internal static OrisPatient ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) { //解析过滤部份Sql语句 string filterString = SyntaxAnalyzer.ParseSql(oql, new OrisPatientMap()); - if(filterString!=string.Empty) - { - filterString=" where "+filterString; - } + if (filterString != string.Empty) + { + filterString = " where " + filterString; + } cmd.CommandText = "select * from Oris_Patient " + filterString; - cmd.Parameters.Clear(); + cmd.Parameters.Clear(); //添加参数 if (parameters != null) { @@ -483,29 +503,29 @@ namespace AIMSDAL } return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth); } - - /// + + /// /// 更据对象查询语句递归查询单个实体 /// /// Command对象 /// 对象查询语句 /// 参数列表 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体对象 internal static OrisPatient SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) { conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) { return ExcuteSelectSingleCommand(cmd, oql, parameters, recursiveType, recursiveDepth); - } - } + } + } } - - /// + + /// /// 更据对象查询语句查询单个实体 /// /// Command对象 @@ -514,10 +534,10 @@ namespace AIMSDAL /// 实体对象 internal static OrisPatient SelectSingle(string oql, ParameterList parameters) { - return SelectSingle(oql,parameters,RecursiveType.Parent,1); + return SelectSingle(oql, parameters, RecursiveType.Parent, 1); } - - /// + + /// /// 更据对象查询语句并启用事务查询单个实体 /// /// 连接对象 @@ -528,172 +548,212 @@ namespace AIMSDAL { return ExcuteSelectSingleCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth); } - - /// + + /// /// 更据主键值递归查询单个实体 /// /// Command对象 /// 主键值 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体对象 - internal static OrisPatient SelectSingle(SqlCommand cmd, int? id,RecursiveType recursiveType,int recursiveDepth) - { - cmd.Parameters.Clear(); - if(id.HasValue) - { - cmd.CommandText = "select * from Oris_Patient where Id=@pk"; - cmd.Parameters.Add(new SqlParameter("@pk",id.Value)); - } - else - { - cmd.CommandText = "select * from Oris_Patient where Id is null"; - } - return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth); - } - - /// + internal static OrisPatient SelectSingle(SqlCommand cmd, int? id, RecursiveType recursiveType, int recursiveDepth) + { + cmd.Parameters.Clear(); + if (id.HasValue) + { + cmd.CommandText = "select * from Oris_Patient where Id=@pk"; + cmd.Parameters.Add(new SqlParameter("@pk", id.Value)); + } + else + { + cmd.CommandText = "select * from Oris_Patient where Id is null"; + } + return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth); + } + + /// /// 按主键字段查询特定实体 /// /// 主键值 /// 实体类对象 internal static OrisPatient SelectSingle(int? id) { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) { conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) { - return SelectSingle(cmd,id,RecursiveType.Parent,1); - } - } + return SelectSingle(cmd, id, RecursiveType.Parent, 1); + } + } } - /// + /// /// 按主键字段查询特定实体 /// /// 主键值 - /// 递归类型 + /// 递归类型 /// 递归深度 /// 实体类对象 internal static OrisPatient SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth) { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) + using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) { conn.Open(); using (SqlCommand cmd = conn.CreateCommand()) { - return SelectSingle(cmd,id, recursiveType, recursiveDepth); - } - } + return SelectSingle(cmd, id, recursiveType, recursiveDepth); + } + } } - - /// + + /// /// 使用事务并按主键字段查询特定实体 /// - /// 连接对象 + /// 连接对象 /// 主键值 /// 实体类对象 - internal static OrisPatient SelectSingle(Connection connection,int? id, RecursiveType recursiveType, int recursiveDepth) + internal static OrisPatient SelectSingle(Connection connection, int? id, RecursiveType recursiveType, int recursiveDepth) { - return SelectSingle(connection.Command, id, recursiveType, recursiveDepth); + return SelectSingle(connection.Command, id, recursiveType, recursiveDepth); } - #endregion - - - /// + #endregion + + + /// /// 从DataReader中取出值生成实体对象 /// /// 查询对象 /// 过滤条件字符串 - private static OrisPatient DataReaderToEntity(SqlDataReader dr) - { - OrisPatient entity = new OrisPatient (); - if(dr["Id"]!=System.DBNull.Value) - { - entity.Id=Convert.ToInt32(dr["Id"]); - } - if(dr["MdrecNo"]!=System.DBNull.Value) - { - entity.MdrecNo=dr["MdrecNo"].ToString(); - } - if(dr["ArchivesNo"]!=System.DBNull.Value) - { - entity.ArchivesNo=dr["ArchivesNo"].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["BirthDay"]!=System.DBNull.Value) - { - entity.BirthDay=Convert.ToDateTime(dr["BirthDay"]); - } - if(dr["Height"]!=System.DBNull.Value) - { - entity.Height=dr["Height"].ToString(); - } - if(dr["Weight"]!=System.DBNull.Value) - { - entity.Weight=dr["Weight"].ToString(); - } - if(dr["DepId"]!=System.DBNull.Value) - { - entity.DepId=Convert.ToInt32(dr["DepId"]); - } - if(dr["Illdistrict"]!=System.DBNull.Value) - { - entity.Illdistrict=dr["Illdistrict"].ToString(); - } - if(dr["SickBed"]!=System.DBNull.Value) - { - entity.SickBed=dr["SickBed"].ToString(); - } - if(dr["BloodType"]!=System.DBNull.Value) - { - entity.BloodType=dr["BloodType"].ToString(); - } - if(dr["RHBloodType"]!=System.DBNull.Value) - { - entity.RHBloodType=dr["RHBloodType"].ToString(); - } - if(dr["PatientKind"]!=System.DBNull.Value) - { - entity.PatientKind=dr["PatientKind"].ToString(); - } - if(dr["InHosDate"]!=System.DBNull.Value) - { - entity.InHosDate=Convert.ToDateTime(dr["InHosDate"]); - } - if(dr["IdentityCard"]!=System.DBNull.Value) - { - entity.IdentityCard=dr["IdentityCard"].ToString(); - } - if(dr["Contacts"]!=System.DBNull.Value) - { - entity.Contacts=dr["Contacts"].ToString(); - } - if(dr["ContactsPhone"]!=System.DBNull.Value) - { - entity.ContactsPhone=dr["ContactsPhone"].ToString(); - } - if(dr["OperatorNo"]!=System.DBNull.Value) - { - entity.OperatorNo=dr["OperatorNo"].ToString(); - } - if(dr["OperatorName"]!=System.DBNull.Value) - { - entity.OperatorName=dr["OperatorName"].ToString(); - } - if(dr["OperateDate"]!=System.DBNull.Value) - { - entity.OperateDate=Convert.ToDateTime(dr["OperateDate"]); - } - return entity; - } - } + private static OrisPatient DataReaderToEntity(SqlDataReader dr) + { + OrisPatient entity = new OrisPatient(); + if (dr["Id"] != System.DBNull.Value) + { + entity.Id = Convert.ToInt32(dr["Id"]); + } + if (dr["MdrecNo"] != System.DBNull.Value) + { + entity.MdrecNo = dr["MdrecNo"].ToString(); + } + if (dr["ArchivesNo"] != System.DBNull.Value) + { + entity.ArchivesNo = dr["ArchivesNo"].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["BirthDay"] != System.DBNull.Value) + { + entity.BirthDay = Convert.ToDateTime(dr["BirthDay"]); + } + if (dr["Height"] != System.DBNull.Value) + { + entity.Height = dr["Height"].ToString(); + } + if (dr["Weight"] != System.DBNull.Value) + { + entity.Weight = dr["Weight"].ToString(); + } + if (dr["DepId"] != System.DBNull.Value) + { + entity.DepId = Convert.ToInt32(dr["DepId"]); + } + if (dr["Illdistrict"] != System.DBNull.Value) + { + entity.Illdistrict = dr["Illdistrict"].ToString(); + } + if (dr["SickBed"] != System.DBNull.Value) + { + entity.SickBed = dr["SickBed"].ToString(); + } + if (dr["BloodType"] != System.DBNull.Value) + { + entity.BloodType = dr["BloodType"].ToString(); + } + if (dr["RHBloodType"] != System.DBNull.Value) + { + entity.RHBloodType = dr["RHBloodType"].ToString(); + } + if (dr["PatientKind"] != System.DBNull.Value) + { + entity.PatientKind = dr["PatientKind"].ToString(); + } + if (dr["InHosDate"] != System.DBNull.Value) + { + entity.InHosDate = Convert.ToDateTime(dr["InHosDate"]); + } + if (dr["IdentityCard"] != System.DBNull.Value) + { + entity.IdentityCard = dr["IdentityCard"].ToString(); + } + if (dr["Contacts"] != System.DBNull.Value) + { + entity.Contacts = dr["Contacts"].ToString(); + } + if (dr["ContactsPhone"] != System.DBNull.Value) + { + entity.ContactsPhone = dr["ContactsPhone"].ToString(); + } + if (dr["OperatorNo"] != System.DBNull.Value) + { + entity.OperatorNo = dr["OperatorNo"].ToString(); + } + if (dr["OperatorName"] != System.DBNull.Value) + { + entity.OperatorName = dr["OperatorName"].ToString(); + } + if (dr["OperateDate"] != System.DBNull.Value) + { + entity.OperateDate = Convert.ToDateTime(dr["OperateDate"]); + } + if (dr["PatientType"] != System.DBNull.Value) + { + entity.PatientType = dr["PatientType"].ToString(); + } + if (dr["HisPatientId"] != System.DBNull.Value) + { + entity.HisPatientId = dr["HisPatientId"].ToString(); + } + if (dr["VisitTimes"] != System.DBNull.Value) + { + entity.VisitTimes = dr["VisitTimes"].ToString(); + } + if (dr["Address"] != System.DBNull.Value) + { + entity.Address = dr["Address"].ToString(); + } + if (dr["Nation"] != System.DBNull.Value) + { + entity.Nation = dr["Nation"].ToString(); + } + if (dr["Extend1"] != System.DBNull.Value) + { + entity.Extend1 = dr["Extend1"].ToString(); + } + if (dr["Extend2"] != System.DBNull.Value) + { + entity.Extend2 = dr["Extend2"].ToString(); + } + if (dr["Extend3"] != System.DBNull.Value) + { + entity.Extend3 = dr["Extend3"].ToString(); + } + if (dr["Extend4"] != System.DBNull.Value) + { + entity.Extend4 = dr["Extend4"].ToString(); + } + if (dr["Extend5"] != System.DBNull.Value) + { + entity.Extend5 = dr["Extend5"].ToString(); + } + return entity; + } + } } diff --git a/AIMSEntity/DAL/Extension/DPerson.cs b/AIMSEntity/DAL/Extension/DPerson.cs index 2ed874c..f483565 100644 --- a/AIMSEntity/DAL/Extension/DPerson.cs +++ b/AIMSEntity/DAL/Extension/DPerson.cs @@ -11,7 +11,7 @@ using System.Text; namespace AIMSDAL { internal partial class DPerson - { + { public static void Add(Person PersonObj) { StringBuilder strSql = new StringBuilder(); @@ -39,7 +39,7 @@ namespace AIMSDAL strSql.Append(")"); HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); } - + public static Person GetModel(int Id) { Person PersonObj = new Person(); @@ -107,7 +107,7 @@ namespace AIMSDAL return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } - public static DataTable GetPersonDataTable(string name,string DeptName) + public static DataTable GetPersonDataTable(string name, string DeptName, bool IsValid) { StringBuilder strSql = new StringBuilder(); strSql.Append("SELECT p.Id,p.No,p.Name,p.HelpCode,p.Sex,p.PassWord,d.Name AS DepName,r.RoleName,p.BirthDay,p.TimeToWork,"); @@ -116,10 +116,12 @@ namespace AIMSDAL strSql.Append("LEFT JOIN [Role] r ON r.Id = p.RoleId "); if (name.Length > 0) strSql.Append(" WHERE p.No like '%" + name + "%' Or p.Name like '%" + name + "%' Or p.HelpCode like '%" + name + "%' "); - if (DeptName.Length > 0 && name.Length==0) - strSql.Append(" WHERE d.Name = '" + DeptName + "' "); - else if (DeptName.Length > 0 && name.Length>0) - strSql.Append(" and d.Name = '" + DeptName + "' "); + if (DeptName.Length > 0 && name.Length == 0) + strSql.Append(" WHERE d.Name = '" + DeptName + "' "); + else if (DeptName.Length > 0 && name.Length > 0) + strSql.Append(" and d.Name = '" + DeptName + "' "); + else if (IsValid == true) + strSql.Append(" WHERE p.IsValid=1 "); return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } diff --git a/AIMSEntity/Extensions/SelectPatient.cs b/AIMSEntity/Extensions/SelectPatient.cs index d644649..089fca3 100644 --- a/AIMSEntity/Extensions/SelectPatient.cs +++ b/AIMSEntity/Extensions/SelectPatient.cs @@ -42,6 +42,12 @@ namespace AIMSBLL strSql += " order by [StateId] asc"; return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); } + public static DataTable GetTodayDoOpePatientDataTable(DateTime BeginDate) + { + string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.InRoomTime PlanOperationTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom ,of1.Contagion FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '手术中') and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=1"; + strSql += " order by [StateId] asc"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } public static DataTable GetRecoverPatientDataTable(DateTime BeginDate) { string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.OutRoomTime ,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom,of2.Whereabouts FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of1.State in( '手术结束') and of2.Whereabouts='恢复室' and of2.OutRoomTime >= '" + BeginDate + "' AND of2.OutRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=1 and of2.Id not in (select iD from OperationRecord where RecoverId<>1)"; diff --git a/AIMSEntity/Model/AutoGenerate/OperationRoom.cs b/AIMSEntity/Model/AutoGenerate/OperationRoom.cs index 6e29998..f5b80dc 100644 --- a/AIMSEntity/Model/AutoGenerate/OperationRoom.cs +++ b/AIMSEntity/Model/AutoGenerate/OperationRoom.cs @@ -16,13 +16,15 @@ namespace AIMSModel private int? isValid; private string operatorNo; private string operatorName; - private DateTime? operateDate; - - - /// + private DateTime? operateDate; + private string site; + private string physioSetting; + + + /// /// /// - public int? Id + public int? Id { get{ return id; } set{ id=value; } @@ -90,6 +92,22 @@ namespace AIMSModel { get{ return operateDate; } set{ operateDate=value; } - } - } + } + /// + /// + /// + public string Site + { + get { return site; } + set { site = value; } + } + /// + /// + /// + public string PhysioSetting + { + get { return physioSetting; } + set { physioSetting = value; } + } + } } diff --git a/AIMSEntity/Model/AutoGenerate/OrisPatient.cs b/AIMSEntity/Model/AutoGenerate/OrisPatient.cs index 926804b..82d75bc 100644 --- a/AIMSEntity/Model/AutoGenerate/OrisPatient.cs +++ b/AIMSEntity/Model/AutoGenerate/OrisPatient.cs @@ -28,13 +28,23 @@ namespace AIMSModel private string contactsPhone; private string operatorNo; private string operatorName; - private DateTime? operateDate; - - - /// + private DateTime? operateDate; + private string patientType; + private string hisPatientId; + private string visitTimes; + private string address; + private string nation; + private string extend1; + private string extend2; + private string extend3; + private string extend4; + private string extend5; + + + /// /// /// - public int? Id + public int? Id { get{ return id; } set{ id=value; } @@ -198,6 +208,86 @@ namespace AIMSModel { get{ return operateDate; } set{ operateDate=value; } - } - } + } + /// + /// + /// + public string PatientType + { + get { return patientType; } + set { patientType = value; } + } + /// + /// + /// + public string HisPatientId + { + get { return hisPatientId; } + set { hisPatientId = value; } + } + /// + /// + /// + public string VisitTimes + { + get { return visitTimes; } + set { visitTimes = value; } + } + /// + /// + /// + public string Address + { + get { return address; } + set { address = value; } + } + /// + /// + /// + public string Nation + { + get { return nation; } + set { nation = value; } + } + /// + /// + /// + public string Extend1 + { + get { return extend1; } + set { extend1 = value; } + } + /// + /// + /// + public string Extend2 + { + get { return extend2; } + set { extend2 = value; } + } + /// + /// + /// + public string Extend3 + { + get { return extend3; } + set { extend3 = value; } + } + /// + /// + /// + public string Extend4 + { + get { return extend4; } + set { extend4 = value; } + } + /// + /// + /// + public string Extend5 + { + get { return extend5; } + set { extend5 = value; } + } + } } diff --git a/AIMSEntity/ObjectQuery/OperationRoomMap.cs b/AIMSEntity/ObjectQuery/OperationRoomMap.cs index 2f1588e..f262e3e 100644 --- a/AIMSEntity/ObjectQuery/OperationRoomMap.cs +++ b/AIMSEntity/ObjectQuery/OperationRoomMap.cs @@ -19,6 +19,7 @@ namespace AIMSObjectQuery dictionary.Add("operatorname", "OperatorName"); dictionary.Add("operatedate", "OperateDate"); dictionary.Add("site", "Site"); + dictionary.Add("physiosetting", "PhysioSetting"); } #region IMap 成员 diff --git a/AIMSEntity/ObjectQuery/OrisPatientMap.cs b/AIMSEntity/ObjectQuery/OrisPatientMap.cs index e6122e1..fe61bf1 100644 --- a/AIMSEntity/ObjectQuery/OrisPatientMap.cs +++ b/AIMSEntity/ObjectQuery/OrisPatientMap.cs @@ -30,6 +30,16 @@ namespace AIMSObjectQuery dictionary.Add("operatorno", "OperatorNo"); dictionary.Add("operatorname", "OperatorName"); dictionary.Add("operatedate", "OperateDate"); + dictionary.Add("patienttype", "PatientType"); + dictionary.Add("hispatientid", "HisPatientId"); + dictionary.Add("visittimes", "VisitTimes"); + dictionary.Add("address", "Address"); + dictionary.Add("nation", "Nation"); + dictionary.Add("extend1", "Extend1"); + dictionary.Add("extend2", "Extend2"); + dictionary.Add("extend3", "Extend3"); + dictionary.Add("extend4", "Extend4"); + dictionary.Add("extend5", "Extend5"); } #region IMap 成员