diff --git a/AIMS/AIMS.csproj b/AIMS/AIMS.csproj index b87ed20..60434d1 100644 --- a/AIMS/AIMS.csproj +++ b/AIMS/AIMS.csproj @@ -207,12 +207,6 @@ FormLogin.cs - - Form - - - frmCommonLargeScreen.cs - Form @@ -825,9 +819,6 @@ FormLogin.cs Designer - - frmCommonLargeScreen.cs - frmOperationManage.cs diff --git a/AIMS/AIMS.xml b/AIMS/AIMS.xml index a1d6e41..d3fc59a 100644 --- a/AIMS/AIMS.xml +++ b/AIMS/AIMS.xml @@ -1,6 +1,6 @@  - Data Source=.;Initial Catalog=AIMSDB_QHDSGRYY;User ID=sa;Password=Test2020; + Data Source=tx.wulvshi.cn;Initial Catalog=AIMSDB_QHDSGRYY;User ID=sa;Password=Test2020; Data Source=.;Initial Catalog=AIMSDB_DATA;User ID=sa;Password=Test2020; Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.7)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl2))));Persist Security Info=True;User ID=smview;Password=i39; diff --git a/AIMS/DataDictionary/frmAnaesthesiaEvents.cs b/AIMS/DataDictionary/frmAnaesthesiaEvents.cs index 41e677c..48c2dbe 100644 --- a/AIMS/DataDictionary/frmAnaesthesiaEvents.cs +++ b/AIMS/DataDictionary/frmAnaesthesiaEvents.cs @@ -1,14 +1,10 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; -using AIMSBLL; -using AIMSModel; +using AIMSBLL; using AIMSExtension; +using AIMSModel; +using DataDictionary; +using System; +using System.Collections.Generic; +using System.Windows.Forms; namespace AIMS.PublicUI.UI { @@ -33,7 +29,7 @@ namespace AIMS.PublicUI.UI private void frmApplianceUseType_Load(object sender, EventArgs e) { - PublicMethod.EnabledControl(panel1, false); + ControlExtension.EnabledControl(panel1, false); txtName.Enabled = true; chkAll.Enabled = true; BindDgv(); @@ -89,8 +85,8 @@ namespace AIMS.PublicUI.UI _state = EditState.ADD; txtName.TextChanged -= new EventHandler(txtName_TextChanged); txtName.TextChanged += new EventHandler(txtName_TextChanged_1); - PublicMethod.EnabledControl(panel1, true); - PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); chkIsValid.Checked = true; } int autid; @@ -111,7 +107,7 @@ namespace AIMS.PublicUI.UI txtName.TextChanged -= new EventHandler(txtName_TextChanged); txtName.TextChanged -= new EventHandler(txtName_TextChanged); txtName.TextChanged += new EventHandler(txtName_TextChanged_1); - PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); autid = Convert.ToInt32(dgvApplianceUseType.SelectedRows[0].Cells["Id"].Value); txtName.Text = dgvApplianceUseType.SelectedRows[0].Cells["oName"].Value.ToString(); txtHCode.Text = dgvApplianceUseType.SelectedRows[0].Cells["HCode"].Value.ToString(); @@ -124,8 +120,8 @@ namespace AIMS.PublicUI.UI /// private void tsbCancel_Click(object sender, EventArgs e) { - PublicMethod.ClearControl(panel1); - PublicMethod.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); txtName.Enabled = true; chkAll.Enabled = true; txtName.TextChanged -= new EventHandler(txtName_TextChanged_1); @@ -144,7 +140,7 @@ namespace AIMS.PublicUI.UI { return; } - if (_state == EditState.ADD && dgvApplianceUseType.Rows.Count > 0 && PublicMethod.ValidDataGridViewExistsItemName(dgvApplianceUseType, "oName", txtName.Text.Trim())) + if (_state == EditState.ADD && dgvApplianceUseType.Rows.Count > 0 && ControlExtension.ValidDataGridViewExistsItemName(dgvApplianceUseType, "oName", txtName.Text.Trim())) { MessageBox.Show("该级别名称已存在,请重新输入!"); txtName.Focus(); @@ -171,7 +167,7 @@ namespace AIMS.PublicUI.UI } if (num > 0) { - new frmMessageBox().Show(); + MessageBox.Show("保存成功!"); tsbCancel_Click(null, null); } } diff --git a/AIMS/DataDictionary/frmAnaesthesiaMethod.cs b/AIMS/DataDictionary/frmAnaesthesiaMethod.cs index f1642c3..9bcd37e 100644 --- a/AIMS/DataDictionary/frmAnaesthesiaMethod.cs +++ b/AIMS/DataDictionary/frmAnaesthesiaMethod.cs @@ -1,4 +1,5 @@ -using AIMSBLL; +using AIMS; +using AIMSBLL; using AIMSExtension; using AIMSModel; using System; @@ -32,7 +33,7 @@ namespace DataDictionary.UI { Initial(); //FullTreeView(list); - PublicMethod.EnabledControl(panel1, false); + ControlExtension.EnabledControl(panel1, false); } /// /// 初始化TreeView @@ -105,13 +106,13 @@ namespace DataDictionary.UI if (tvDictionary.SelectedNode.Level == 0) { lblts.Text = "当前状态为:添加新麻醉类型"; - PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); cboDict.Enabled = false; } else { lblts.Text = "当前状态为:为" + tvDictionary.SelectedNode.Text + "添加新麻醉方式"; - PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); cboDict.Enabled = false; } } @@ -140,8 +141,8 @@ namespace DataDictionary.UI private void tsbCancel_Click(object sender, EventArgs e) { - PublicMethod.EnabledControl(panel1, false); - PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); lblts.Text = ""; state = EditState.BROWSE; } @@ -198,8 +199,8 @@ namespace DataDictionary.UI if (n > 0) { MessageBox.Show("保存成功!"); - PublicMethod.EnabledControl(panel1, false); - PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); } Initial(); state = EditState.BROWSE; diff --git a/AIMS/DataDictionary/frmAppliance.cs b/AIMS/DataDictionary/frmAppliance.cs index 8e8bdf1..7ef9c76 100644 --- a/AIMS/DataDictionary/frmAppliance.cs +++ b/AIMS/DataDictionary/frmAppliance.cs @@ -44,7 +44,7 @@ namespace AIMS.PublicUI.UI } private void Initial() { - PublicMethod.EnabledControl(panel1, false); + ControlExtension.EnabledControl(panel1, false); chkAll.Enabled = true; list = BAppliance.Select(); } @@ -133,8 +133,8 @@ namespace AIMS.PublicUI.UI _state = EditState.ADD; txtName.TextChanged -= new EventHandler(txtName_TextChanged); txtName.TextChanged += new EventHandler(txtName_TextChanged_1); - PublicMethod.ClearControl(panel1); - PublicMethod.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); chkIsValid.Checked = true; cboType.Text = "器械"; } @@ -155,8 +155,8 @@ namespace AIMS.PublicUI.UI txtName.TextChanged -= new EventHandler(txtName_TextChanged); txtName.TextChanged -= new EventHandler(txtName_TextChanged); txtName.TextChanged += new EventHandler(txtName_TextChanged_1); - //PublicMethod.ClearControl(panel1); - PublicMethod.EnabledControl(panel1, true); + //ControlExtension.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); numberId = Convert.ToInt32(dgvAppliance.SelectedRows[0].Cells["Id"].Value); txtName.Text = dgvAppliance.SelectedRows[0].Cells["oName"].Value.ToString(); txtHCode.Text = dgvAppliance.SelectedRows[0].Cells["HCode"].Value.ToString(); @@ -170,8 +170,8 @@ namespace AIMS.PublicUI.UI /// private void tsbCancel_Click(object sender, EventArgs e) { - PublicMethod.ClearControl(panel1); - PublicMethod.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); txtName.Enabled = true; chkAll.Enabled = true; txtName.TextChanged -= new EventHandler(txtName_TextChanged_1); @@ -190,7 +190,7 @@ namespace AIMS.PublicUI.UI { return; } - if (_state == EditState.ADD && dgvAppliance.Rows.Count > 0 && PublicMethod.ValidDataGridViewExistsItemName(dgvAppliance, "oName", txtName.Text.Trim())) + if (_state == EditState.ADD && dgvAppliance.Rows.Count > 0 && ControlExtension.ValidDataGridViewExistsItemName(dgvAppliance, "oName", txtName.Text.Trim())) { MessageBox.Show("该器械名称已存在,请重新输入!/r/n或选择器械使用类型后保存!"); txtName.Focus(); @@ -210,7 +210,7 @@ namespace AIMS.PublicUI.UI num = BAppliance.Insert(app); if (num > 0) { - new frmMessageBox().Show(); + MessageBox.Show("保存成功!"); tsbCancel_Click(null, null); } } @@ -227,8 +227,8 @@ namespace AIMS.PublicUI.UI dgvAppliance.SelectedRows[0].Cells["HCode"].Value = txtHCode.Text.ToString(); dgvAppliance.SelectedRows[0].Cells["Type"].Value = cboType.Text.ToString(); dgvAppliance.SelectedRows[0].Cells["IsValid"].Value = chkIsValid.Checked == true ? "有效" : "无效"; - PublicMethod.ClearControl(panel1); - PublicMethod.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); txtName.Enabled = true; chkAll.Enabled = true; txtName.TextChanged -= new EventHandler(txtName_TextChanged_1); diff --git a/AIMS/DataDictionary/frmApplianceSelect.cs b/AIMS/DataDictionary/frmApplianceSelect.cs index 1885108..be2c236 100644 --- a/AIMS/DataDictionary/frmApplianceSelect.cs +++ b/AIMS/DataDictionary/frmApplianceSelect.cs @@ -284,7 +284,7 @@ namespace AIMS.PublicUI.UI int num = BApplianceUseType.Update(_applianceUseType); if (num > 0) { - new frmMessageBox().Show(); + MessageBox.Show("保存成功!"); //this.Close(); } } diff --git a/AIMS/DataDictionary/frmApplianceUseType.cs b/AIMS/DataDictionary/frmApplianceUseType.cs index 93ae395..aa56ce8 100644 --- a/AIMS/DataDictionary/frmApplianceUseType.cs +++ b/AIMS/DataDictionary/frmApplianceUseType.cs @@ -29,7 +29,7 @@ namespace AIMS.PublicUI.UI private void frmApplianceUseType_Load(object sender, EventArgs e) { - PublicMethod.EnabledControl(panel1, false); + ControlExtension.EnabledControl(panel1, false); txtName.Enabled = true; chkAll.Enabled = true; BindDgv(); @@ -111,8 +111,8 @@ namespace AIMS.PublicUI.UI _state = EditState.ADD; txtName.TextChanged -= new EventHandler(txtName_TextChanged); txtName.TextChanged += new EventHandler(txtName_TextChanged_1); - PublicMethod.EnabledControl(panel1, true); - PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); chkIsValid.Checked = true; } int autid; @@ -133,7 +133,7 @@ namespace AIMS.PublicUI.UI txtName.TextChanged -= new EventHandler(txtName_TextChanged); txtName.TextChanged -= new EventHandler(txtName_TextChanged); txtName.TextChanged += new EventHandler(txtName_TextChanged_1); - PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); autid = Convert.ToInt32(dgvApplianceUseType.SelectedRows[0].Cells["Id"].Value); txtName.Text = dgvApplianceUseType.SelectedRows[0].Cells["oName"].Value.ToString(); txtHCode.Text = dgvApplianceUseType.SelectedRows[0].Cells["HCode"].Value.ToString(); @@ -146,8 +146,8 @@ namespace AIMS.PublicUI.UI /// private void tsbCancel_Click(object sender, EventArgs e) { - PublicMethod.ClearControl(panel1); - PublicMethod.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); txtName.Enabled = true; chkAll.Enabled = true; txtName.TextChanged -= new EventHandler(txtName_TextChanged_1); @@ -166,7 +166,7 @@ namespace AIMS.PublicUI.UI { return; } - if (_state == EditState.ADD && dgvApplianceUseType.Rows.Count > 0 && PublicMethod.ValidDataGridViewExistsItemName(dgvApplianceUseType, "oName", txtName.Text.Trim())) + if (_state == EditState.ADD && dgvApplianceUseType.Rows.Count > 0 && ControlExtension.ValidDataGridViewExistsItemName(dgvApplianceUseType, "oName", txtName.Text.Trim())) { MessageBox.Show("该级别名称已存在,请重新输入!"); txtName.Focus(); @@ -192,7 +192,7 @@ namespace AIMS.PublicUI.UI } if (num > 0) { - new frmMessageBox().Show(); + MessageBox.Show("保存成功!"); tsbCancel_Click(null, null); } } diff --git a/AIMS/DataDictionary/frmBasicDictionary.cs b/AIMS/DataDictionary/frmBasicDictionary.cs index 0db7e91..d9d7483 100644 --- a/AIMS/DataDictionary/frmBasicDictionary.cs +++ b/AIMS/DataDictionary/frmBasicDictionary.cs @@ -1,12 +1,8 @@ -using AIMSBLL; +using AIMS; +using AIMSBLL; using AIMSModel; using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; namespace DataDictionary.UI @@ -30,8 +26,8 @@ namespace DataDictionary.UI this.cboParent.ValueMember = "Id"; this.treeView1.BackColor = System.Drawing.Color.Snow; - //AIMSExtension.PublicMethod.SetDgvAttribute(dgvBasicDictionary); - AIMSExtension.PublicMethod.EnabledControl(panel4, false); + //ControlExtension.SetDgvAttribute(dgvBasicDictionary); + ControlExtension.EnabledControl(panel4, false); _state = AIMSExtension.EditState.BROWSE; InitTreeView(); @@ -66,8 +62,8 @@ namespace DataDictionary.UI private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel4, true); - AIMSExtension.PublicMethod.ClearControl(panel4); + ControlExtension.EnabledControl(panel4, true); + ControlExtension.ClearControl(panel4); //cboParent.Text = "无"; intOrder.Text = "0"; chkIsValid.Checked = true; @@ -77,7 +73,7 @@ namespace DataDictionary.UI private void tsbModify_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.EDIT; - AIMSExtension.PublicMethod.EnabledControl(panel4, true); + ControlExtension.EnabledControl(panel4, true); if (dgvBasicDictionary.Rows.Count > 0) { txtName.Text = dgvBasicDictionary.CurrentRow.Cells["ColumeName"].Value.ToString(); @@ -109,8 +105,8 @@ namespace DataDictionary.UI private void tsbCancel_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel4, false); - AIMSExtension.PublicMethod.ClearControl(panel4); + ControlExtension.EnabledControl(panel4, false); + ControlExtension.ClearControl(panel4); intOrder.Text = "0"; } @@ -151,8 +147,8 @@ namespace DataDictionary.UI } } _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel4, false); - AIMSExtension.PublicMethod.ClearControl(panel4); + ControlExtension.EnabledControl(panel4, false); + ControlExtension.ClearControl(panel4); intOrder.Text = "0"; dgvBasicDictionary.DataSource = BBasicDictionary.GetDataDictionaryDataTable(BasicDictionaryObj.ParentId.Value); diff --git a/AIMS/DataDictionary/frmBloodGasAnalysisDict.cs b/AIMS/DataDictionary/frmBloodGasAnalysisDict.cs index 6aab678..5f8048e 100644 --- a/AIMS/DataDictionary/frmBloodGasAnalysisDict.cs +++ b/AIMS/DataDictionary/frmBloodGasAnalysisDict.cs @@ -31,8 +31,8 @@ namespace AIMS.PublicUI.UI private void frmBloodGasAnalysisDict_Load(object sender, EventArgs e) { CurrentState = EditState.BROWSE; - PublicMethod.ClearControl(panel2); - PublicMethod.EnabledControl(panel2, false); + ControlExtension.ClearControl(panel2); + ControlExtension.EnabledControl(panel2, false); chkAll.Enabled = true; chkAll.Checked = isChecked; txtOrderBy.Text = "0"; @@ -57,8 +57,8 @@ namespace AIMS.PublicUI.UI txtName.TextChanged -= new EventHandler(txtName_TextChanged); chkAll.CheckedChanged -= new EventHandler(chkAll_CheckedChanged); txtName.TextChanged += new EventHandler(txtName_TextChanged_1); - PublicMethod.ClearControl(panel2); - PublicMethod.EnabledControl(panel2, true); + ControlExtension.ClearControl(panel2); + ControlExtension.EnabledControl(panel2, true); chkIsValid.Checked = true; chkAll.Enabled = true; chkAll.Checked = isChecked; @@ -78,8 +78,8 @@ namespace AIMS.PublicUI.UI txtName.TextChanged -= new EventHandler(txtName_TextChanged); chkAll.CheckedChanged -= new EventHandler(chkAll_CheckedChanged); txtName.TextChanged += new EventHandler(txtName_TextChanged_1); - PublicMethod.ClearControl(panel2); - PublicMethod.EnabledControl(panel2, true); + ControlExtension.ClearControl(panel2); + ControlExtension.EnabledControl(panel2, true); chkAll.Enabled = true; chkAll.Checked = isChecked; @@ -129,8 +129,8 @@ namespace AIMS.PublicUI.UI { CurrentState = EditState.BROWSE; - PublicMethod.ClearControl(panel2); - PublicMethod.EnabledControl(panel2, false); + ControlExtension.ClearControl(panel2); + ControlExtension.EnabledControl(panel2, false); txtName.TextChanged -= new EventHandler(txtName_TextChanged_1); txtName.TextChanged -= new EventHandler(txtName_TextChanged); txtName.TextChanged += new EventHandler(txtName_TextChanged); diff --git a/AIMS/DataDictionary/frmDepartment.cs b/AIMS/DataDictionary/frmDepartment.cs index 7fa64a8..757e3e4 100644 --- a/AIMS/DataDictionary/frmDepartment.cs +++ b/AIMS/DataDictionary/frmDepartment.cs @@ -23,23 +23,23 @@ namespace AIMS.PublicUI.UI private void frmDepartment_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvDepartment); - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.SetDgvAttribute(dgvDepartment); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); intDepOrder.Text = "0"; GetDepartmentDataTable(); } private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); } private void tsbModify_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.EDIT; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); if (dgvDepartment.Rows.Count > 0) { SelectDepartmentRow.Id = int.Parse(dgvDepartment.CurrentRow.Cells["Id"].Value.ToString()); @@ -86,8 +86,8 @@ namespace AIMS.PublicUI.UI private void tsbCancel_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); } private void tsbSava_Click(object sender, EventArgs e) @@ -118,8 +118,8 @@ namespace AIMS.PublicUI.UI } } _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); // dgvDepartment.DataSource = BLL.Department.GetDepartmentDataTable(""); GetDepartmentDataTable(); } diff --git a/AIMS/DataDictionary/frmDisease.cs b/AIMS/DataDictionary/frmDisease.cs index 105c903..147fa88 100644 --- a/AIMS/DataDictionary/frmDisease.cs +++ b/AIMS/DataDictionary/frmDisease.cs @@ -6,6 +6,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using AIMS; using AIMSBLL; using AIMSModel; using HelperDB; @@ -23,9 +24,9 @@ namespace DataDictionary.UI private void frmDisease_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvDisease); - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.SetDgvAttribute(dgvDisease); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; dgvDisease.DataSource = BDisease.GetDataTable(); @@ -33,14 +34,14 @@ namespace DataDictionary.UI private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); chkIsValid.Checked = true; } private void tsbModify_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.EDIT; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); txtName.Enabled = false; txtICDcode.Enabled = false; if (dgvDisease.Rows.Count > 0) @@ -78,8 +79,8 @@ namespace DataDictionary.UI private void tsbCancel_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); } private void tsbSava_Click(object sender, EventArgs e) @@ -110,8 +111,8 @@ namespace DataDictionary.UI } } _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); dgvDisease.DataSource = BDisease.GetDataTable(); } diff --git a/AIMS/DataDictionary/frmDrugs.cs b/AIMS/DataDictionary/frmDrugs.cs index 268c9c7..9368e51 100644 --- a/AIMS/DataDictionary/frmDrugs.cs +++ b/AIMS/DataDictionary/frmDrugs.cs @@ -1,4 +1,5 @@ -using AIMSBLL; +using AIMS; +using AIMSBLL; using AIMSModel; using System; using System.Collections.Generic; @@ -21,8 +22,8 @@ namespace DataDictionary.UI private void frmDrugs_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgv); - AIMSExtension.PublicMethod.EnabledControl(panel4, false); + ControlExtension.SetDgvAttribute(dgv); + ControlExtension.EnabledControl(panel4, false); txtName.Enabled = true; List _dUnitList = BBasicDictionary.GetBasicDictionaryByName("给药单位").SubItem; _dUnitList.Insert(0, new BasicDictionary() { Id = -1, Name = "" }); @@ -43,15 +44,15 @@ namespace DataDictionary.UI private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel4, true); - AIMSExtension.PublicMethod.ClearControl(panel4); + ControlExtension.EnabledControl(panel4, true); + ControlExtension.ClearControl(panel4); txtName.Enabled = true; } private void tsbModify_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.EDIT; - AIMSExtension.PublicMethod.EnabledControl(panel4, true); + ControlExtension.EnabledControl(panel4, true); txtName.Enabled = true; if (dgv.Rows.Count > 0) { @@ -83,8 +84,8 @@ namespace DataDictionary.UI private void tsbCancel_Click(object sender, EventArgs e) { - AIMSExtension.PublicMethod.EnabledControl(panel4, false); - AIMSExtension.PublicMethod.ClearControl(panel4); + ControlExtension.EnabledControl(panel4, false); + ControlExtension.ClearControl(panel4); _state = AIMSExtension.EditState.BROWSE; txtName.Enabled = true; GetDrugsDataTable(""); @@ -149,8 +150,8 @@ namespace DataDictionary.UI dgv.CurrentRow.Cells["Comment"].Value = txtComment.Text; dgv.CurrentRow.Cells["Channel"].Value = txtChannel.Text; dgv.CurrentRow.Cells["IsValidColumn"].Value = chkIsValid.Checked == true ? "有效" : "无效"; - AIMSExtension.PublicMethod.EnabledControl(panel4, false); - AIMSExtension.PublicMethod.ClearControl(panel4); + ControlExtension.EnabledControl(panel4, false); + ControlExtension.ClearControl(panel4); _state = AIMSExtension.EditState.BROWSE; txtName.Enabled = true; } diff --git a/AIMS/DataDictionary/frmEvents.cs b/AIMS/DataDictionary/frmEvents.cs index 345a6db..4315630 100644 --- a/AIMS/DataDictionary/frmEvents.cs +++ b/AIMS/DataDictionary/frmEvents.cs @@ -1,14 +1,8 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; +using AIMS; using AIMSBLL; using AIMSModel; -using HelperDB; +using System; +using System.Windows.Forms; namespace DataDictionary.UI { @@ -24,9 +18,9 @@ namespace DataDictionary.UI private void frmEvents_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvEventsKind); - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.SetDgvAttribute(dgvEventsKind); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; txtName.Enabled = true; chkIsValid.Enabled = true; @@ -36,8 +30,8 @@ namespace DataDictionary.UI private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); } private void tsbExit_Click(object sender, EventArgs e) { @@ -46,8 +40,8 @@ namespace DataDictionary.UI private void tsbCancel_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); txtName.Enabled = true; chkIsValid.Enabled = true; dgvEventsKind.DataSource = BEvents.GetDataTable(txtName.Text, chkIsValid.Checked); @@ -73,7 +67,7 @@ namespace DataDictionary.UI private void tsbModify_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.EDIT; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); if (dgvEventsKind.Rows.Count > 0) { @@ -130,8 +124,8 @@ namespace DataDictionary.UI dgvEventsKind.CurrentRow.Cells["UseRate"].Value = txtUseRate.Text; dgvEventsKind.CurrentRow.Cells["Remark"].Value = txtRemark.Text; dgvEventsKind.CurrentRow.Cells["IsValid"].Value = chkIsValid.Checked == true ? "有效" : "无效"; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; txtName.Enabled = true; chkIsValid.Enabled = true; diff --git a/AIMS/DataDictionary/frmMenu.cs b/AIMS/DataDictionary/frmMenu.cs index c010146..c47d20c 100644 --- a/AIMS/DataDictionary/frmMenu.cs +++ b/AIMS/DataDictionary/frmMenu.cs @@ -32,9 +32,9 @@ namespace AIMS.PublicUI.UI private void frmMenu_Load(object sender, EventArgs e) { Initial(); - AIMSExtension.PublicMethod.SetDgvAttribute(dgvMenu); + ControlExtension.SetDgvAttribute(dgvMenu); this.treeView1.BackColor = System.Drawing.Color.Snow; - AIMSExtension.PublicMethod.EnabledControl(panel4, false); + ControlExtension.EnabledControl(panel4, false); intMenuOrder.Text = "0"; //资源图片映射 @@ -115,8 +115,8 @@ namespace AIMS.PublicUI.UI private void tsbAdd_Click(object sender, EventArgs e) { _state = EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel4,true); - AIMSExtension.PublicMethod.ClearControl(panel4); + ControlExtension.EnabledControl(panel4,true); + ControlExtension.ClearControl(panel4); foreach (ButtonItem fite in this.galleryContainer2.SubItems) { fite.Checked = false; @@ -126,8 +126,8 @@ namespace AIMS.PublicUI.UI private void tsbCancel_Click(object sender, EventArgs e) { - AIMSExtension.PublicMethod.EnabledControl(panel4, false); - AIMSExtension.PublicMethod.ClearControl(panel4); + ControlExtension.EnabledControl(panel4, false); + ControlExtension.ClearControl(panel4); foreach (ButtonItem fite in this.galleryContainer2.SubItems) { fite.Checked = false; @@ -137,8 +137,8 @@ namespace AIMS.PublicUI.UI private void tsbModify_Click(object sender, EventArgs e) { - AIMSExtension.PublicMethod.ClearControl(panel4); - AIMSExtension.PublicMethod.EnabledControl(panel4, true); + ControlExtension.ClearControl(panel4); + ControlExtension.EnabledControl(panel4, true); this._state = EditState.EDIT; if (dgvMenu.Rows.Count > 0) @@ -192,7 +192,7 @@ namespace AIMS.PublicUI.UI private void tsbSava_Click(object sender, EventArgs e) { - AIMSExtension.PublicMethod.EnabledControl(panel4, false); + ControlExtension.EnabledControl(panel4, false); if (this.ValidInput()) { AIMSModel.Menu MenuObj = new AIMSModel.Menu(); @@ -218,7 +218,7 @@ namespace AIMS.PublicUI.UI { BMenu.Add(MenuObj); - AIMSExtension.PublicMethod.ClearControl(panel4); + ControlExtension.ClearControl(panel4); } if (this._state == EditState.EDIT) @@ -227,7 +227,7 @@ namespace AIMS.PublicUI.UI { MenuObj.Id = MenuRowData.Id; BMenu.Update(MenuObj); - AIMSExtension.PublicMethod.ClearControl(panel4); + ControlExtension.ClearControl(panel4); this._state = EditState.BROWSE; } } diff --git a/AIMS/DataDictionary/frmOperation.cs b/AIMS/DataDictionary/frmOperation.cs index d981d83..609fed2 100644 --- a/AIMS/DataDictionary/frmOperation.cs +++ b/AIMS/DataDictionary/frmOperation.cs @@ -6,6 +6,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using AIMS; using AIMSBLL; using AIMSModel; using HelperDB; @@ -22,17 +23,17 @@ namespace DataDictionary.UI } private void frmOperation_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvOperation); - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.SetDgvAttribute(dgvOperation); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; dgvOperation.DataSource = BOperation.GetDataTable(); } private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); chkIsValid.Checked = true; } @@ -40,7 +41,7 @@ namespace DataDictionary.UI private void tsbModify_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.EDIT; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); txtICDcode.Enabled = false; txtName.Enabled = false; if (dgvOperation.Rows.Count > 0) @@ -101,16 +102,16 @@ namespace DataDictionary.UI } } _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); dgvOperation.DataSource = BOperation.GetDataTable(); } private void tsbCancel_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); } private void tsbExit_Click(object sender, EventArgs e) diff --git a/AIMS/DataDictionary/frmOperationBodyPosition.cs b/AIMS/DataDictionary/frmOperationBodyPosition.cs index 2696fed..c084109 100644 --- a/AIMS/DataDictionary/frmOperationBodyPosition.cs +++ b/AIMS/DataDictionary/frmOperationBodyPosition.cs @@ -1,4 +1,5 @@ -using AIMSBLL; +using AIMS; +using AIMSBLL; using AIMSModel; using System; using System.Windows.Forms; @@ -15,17 +16,17 @@ namespace DataDictionary.UI } private void frmOperationBodyPosition_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvOperation); - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.SetDgvAttribute(dgvOperation); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; dgvOperation.DataSource = BOperationBodyPosition.GetDataTable(); } private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); chkIsValid.Checked = true; intMenuOrder.Value = 0; } @@ -33,7 +34,7 @@ namespace DataDictionary.UI private void tsbModify_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.EDIT; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); //txtName.Enabled = false; if (dgvOperation.Rows.Count > 0) { @@ -95,16 +96,16 @@ namespace DataDictionary.UI } } _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); dgvOperation.DataSource = BOperationBodyPosition.GetDataTable(); } private void tsbCancel_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); } private void tsbExit_Click(object sender, EventArgs e) diff --git a/AIMS/DataDictionary/frmOperationPosition.cs b/AIMS/DataDictionary/frmOperationPosition.cs index a89edd0..3e44570 100644 --- a/AIMS/DataDictionary/frmOperationPosition.cs +++ b/AIMS/DataDictionary/frmOperationPosition.cs @@ -1,4 +1,5 @@ -using AIMSBLL; +using AIMS; +using AIMSBLL; using AIMSModel; using System; using System.Windows.Forms; @@ -15,17 +16,17 @@ namespace DataDictionary.UI } private void frmOperationPosition_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvOperation); - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.SetDgvAttribute(dgvOperation); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; dgvOperation.DataSource = BOperationPosition.GetDataTable(); } private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); chkIsValid.Checked = true; intMenuOrder.Value = 0; } @@ -33,7 +34,7 @@ namespace DataDictionary.UI private void tsbModify_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.EDIT; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); //txtName.Enabled = false; if (dgvOperation.Rows.Count > 0) { @@ -95,16 +96,16 @@ namespace DataDictionary.UI } } _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); dgvOperation.DataSource = BOperationPosition.GetDataTable(); } private void tsbCancel_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); } private void tsbExit_Click(object sender, EventArgs e) diff --git a/AIMS/DataDictionary/frmOperationRoom.cs b/AIMS/DataDictionary/frmOperationRoom.cs index a868a51..4176de1 100644 --- a/AIMS/DataDictionary/frmOperationRoom.cs +++ b/AIMS/DataDictionary/frmOperationRoom.cs @@ -1,10 +1,10 @@ -using AIMSBLL; +using AIMS; +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; @@ -32,7 +32,7 @@ namespace DataDictionary.UI 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); + ControlExtension.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 = "" }); @@ -91,8 +91,8 @@ namespace DataDictionary.UI { //设置状态为新增 _state = EditState.ADD; - PublicMethod.EnabledControl(panel1, true); - PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); } /// /// 修改事件 @@ -108,7 +108,7 @@ namespace DataDictionary.UI MessageBox.Show("请选择列表中的一项!"); return; } - PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); txtName.Text = dgvOperationsRoom.SelectedRows[0].Cells["oName"].Value.ToString(); if (dgvOperationsRoom.SelectedRows[0].Cells["Ip1"].EditedFormattedValue.ToString() != "") { @@ -141,8 +141,8 @@ namespace DataDictionary.UI /// private void tsbCancel_Click(object sender, EventArgs e) { - PublicMethod.ClearControl(panel1); - PublicMethod.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); cboDepartment.SelectedIndex = -1; cboDepartment.Text = ""; } @@ -157,7 +157,7 @@ namespace DataDictionary.UI { return; } - if (_state == EditState.ADD && dgvOperationsRoom.Rows.Count > 0 && PublicMethod.ValidDataGridViewExistsItemName(dgvOperationsRoom, "oName", txtName.Text.Trim())) + if (_state == EditState.ADD && dgvOperationsRoom.Rows.Count > 0 && ControlExtension.ValidDataGridViewExistsItemName(dgvOperationsRoom, "oName", txtName.Text.Trim())) { MessageBox.Show("该手术间已存在,请重新输入!"); txtName.Focus(); @@ -187,9 +187,9 @@ namespace DataDictionary.UI } if (num > 0) { - new frmMessageBox().Show(); - PublicMethod.EnabledControl(panel1, false); - PublicMethod.ClearControl(panel1); + MessageBox.Show("保存成功!"); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); list = BOperationRoom.Select(" order by Site,[RoomOrder] asc", new ParameterList(), RecursiveType.None, 0); ; BindDgv(list); } diff --git a/AIMS/DataDictionary/frmOutputLiquids.cs b/AIMS/DataDictionary/frmOutputLiquids.cs index ff08fd4..5693904 100644 --- a/AIMS/DataDictionary/frmOutputLiquids.cs +++ b/AIMS/DataDictionary/frmOutputLiquids.cs @@ -6,6 +6,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using AIMS; using AIMSBLL; using AIMSModel; using HelperDB; @@ -22,9 +23,9 @@ namespace DataDictionary.UI } private void frmOutputLiquids_Load_1(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvOutputLiquids); - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.SetDgvAttribute(dgvOutputLiquids); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; dgvOutputLiquids.DataSource = BOutputLiquids.GetDataTable(); } @@ -32,8 +33,8 @@ namespace DataDictionary.UI private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); chkIsValid.Checked = true; if (BOutputLiquids.IsExit(txtName.Text.Trim())) { @@ -45,7 +46,7 @@ namespace DataDictionary.UI private void tsbModify_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.EDIT; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); txtName.Enabled = false; if (dgvOutputLiquids.Rows.Count > 0) { @@ -66,8 +67,8 @@ namespace DataDictionary.UI private void tsbCancel_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); } private void tsbSava_Click(object sender, EventArgs e) @@ -97,8 +98,8 @@ namespace DataDictionary.UI } } _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); dgvOutputLiquids.DataSource = BOutputLiquids.GetDataTable(); } private bool ValidInput() diff --git a/AIMS/DataDictionary/frmPatientKind.cs b/AIMS/DataDictionary/frmPatientKind.cs index f3131d8..505d7d8 100644 --- a/AIMS/DataDictionary/frmPatientKind.cs +++ b/AIMS/DataDictionary/frmPatientKind.cs @@ -1,14 +1,8 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; +using AIMS; using AIMSBLL; using AIMSModel; -using HelperDB; +using System; +using System.Windows.Forms; namespace DataDictionary.UI { @@ -23,9 +17,9 @@ namespace DataDictionary.UI private void frmPatientKind_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvPatientKind); - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.SetDgvAttribute(dgvPatientKind); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; dgvPatientKind.DataSource = BPatientKind.GetDataTable(); } @@ -33,14 +27,14 @@ namespace DataDictionary.UI { _state = AIMSExtension.EditState.ADD; PatientKind PatientKindObj = new PatientKind(); - AIMSExtension.PublicMethod.EnabledControl(panel1, true); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); chkIsValid.Checked = true; } private void tsbModify_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.EDIT; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); + ControlExtension.EnabledControl(panel1, false); txtHelpCode.Enabled = true; chkIsValid.Enabled = true; if (dgvPatientKind.Rows.Count > 0) @@ -62,8 +56,8 @@ namespace DataDictionary.UI private void tsbCancel_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); } private void tsbSava_Click(object sender, EventArgs e) { @@ -121,8 +115,8 @@ namespace DataDictionary.UI private void tsbExit_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); } private void tsbExit_Click_1(object sender, EventArgs e) { diff --git a/AIMS/DataDictionary/frmPerson.cs b/AIMS/DataDictionary/frmPerson.cs index 58328d5..965d4d3 100644 --- a/AIMS/DataDictionary/frmPerson.cs +++ b/AIMS/DataDictionary/frmPerson.cs @@ -1,5 +1,6 @@ using AIMSBLL; using AIMSModel; +using DataDictionary; using System; using System.Collections.Generic; using System.Data; @@ -20,8 +21,8 @@ namespace AIMS.PublicUI.UI private void frmPerson_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvPerson); - AIMSExtension.PublicMethod.EnabledControl(panel1, false); + ControlExtension.SetDgvAttribute(dgvPerson); + ControlExtension.EnabledControl(panel1, false); Initial(); intPersonOrder.Text = "0"; GetPersonDataTable("", ""); @@ -75,8 +76,8 @@ namespace AIMS.PublicUI.UI _state = AIMSExtension.EditState.ADD; this.txtName.TextChanged -= new System.EventHandler(this.txtName_TextChanged); this.cboDepartment.SelectedIndexChanged -= new System.EventHandler(this.cboDepartment_SelectedIndexChanged); - AIMSExtension.PublicMethod.EnabledControl(panel1, true); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); } private void tsbModify_Click(object sender, EventArgs e) @@ -84,7 +85,7 @@ namespace AIMS.PublicUI.UI _state = AIMSExtension.EditState.EDIT; this.txtName.TextChanged -= new System.EventHandler(this.txtName_TextChanged); this.cboDepartment.SelectedIndexChanged -= new System.EventHandler(this.cboDepartment_SelectedIndexChanged); - AIMSExtension.PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); if (dgvPerson.Rows.Count > 0) { SelectPerson.Id = int.Parse(dgvPerson.CurrentRow.Cells["Id"].Value.ToString()); @@ -118,8 +119,8 @@ namespace AIMS.PublicUI.UI private void tsbCancel_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); this.txtName.Enabled = true; this.txtName.TextChanged += new System.EventHandler(this.txtName_TextChanged); @@ -205,8 +206,8 @@ namespace AIMS.PublicUI.UI dgvPerson.CurrentRow.Cells["PersonOrderColumn"].Value = intPersonOrder.Text; } _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); this.txtName.Enabled = true; this.txtName.TextChanged += new System.EventHandler(this.txtName_TextChanged); diff --git a/AIMS/DataDictionary/frmSysConfig.cs b/AIMS/DataDictionary/frmSysConfig.cs index 331025c..358795e 100644 --- a/AIMS/DataDictionary/frmSysConfig.cs +++ b/AIMS/DataDictionary/frmSysConfig.cs @@ -6,6 +6,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using AIMS; using AIMSBLL; using AIMSModel; using HelperDB; @@ -22,17 +23,17 @@ namespace DataDictionary.UI } private void frmSysConfig_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvSysConfig); - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.SetDgvAttribute(dgvSysConfig); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; dgvSysConfig.DataSource = BSysConfig.GetDataTable(); } private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); chkIsValid.Checked = true; if (BSysConfig.IsExit(txtName.Text.Trim())) { @@ -44,7 +45,7 @@ namespace DataDictionary.UI private void tsbModify_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.EDIT; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); txtName.Enabled = false; if (dgvSysConfig.Rows.Count > 0) { @@ -66,8 +67,8 @@ namespace DataDictionary.UI private void tsbCancel_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); } private bool ValidInput() @@ -112,8 +113,8 @@ namespace DataDictionary.UI } } _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); dgvSysConfig.DataSource = BSysConfig.GetDataTable(); } diff --git a/AIMS/DataDictionary/frmUserPurview.cs b/AIMS/DataDictionary/frmUserPurview.cs index 9a8ebfc..f4dff94 100644 --- a/AIMS/DataDictionary/frmUserPurview.cs +++ b/AIMS/DataDictionary/frmUserPurview.cs @@ -1,5 +1,6 @@ using AIMSBLL; using AIMSModel; +using DataDictionary; using System; using System.Collections.Generic; using System.ComponentModel; @@ -27,8 +28,8 @@ namespace AIMS.PublicUI.UI private void frmUserPurview_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvUserPurview); - AIMSExtension.PublicMethod.EnabledControl(panel2, false); + ControlExtension.SetDgvAttribute(dgvUserPurview); + ControlExtension.EnabledControl(panel2, false); _state = AIMSExtension.EditState.BROWSE; dgvUserPurview.DataSource = BRole.GetDataTable(); @@ -36,15 +37,15 @@ namespace AIMS.PublicUI.UI private void tsbAdd_Click(object sender, EventArgs e) { - AIMSExtension.PublicMethod.EnabledControl(panel2, true); - AIMSExtension.PublicMethod.ClearControl(panel2); + ControlExtension.EnabledControl(panel2, true); + ControlExtension.ClearControl(panel2); _state = AIMSExtension.EditState.ADD; } private void tsbCancel_Click(object sender, EventArgs e) { - AIMSExtension.PublicMethod.EnabledControl(panel2, false); - AIMSExtension.PublicMethod.ClearControl(panel2); + ControlExtension.EnabledControl(panel2, false); + ControlExtension.ClearControl(panel2); _state = AIMSExtension.EditState.BROWSE; } @@ -52,7 +53,7 @@ namespace AIMS.PublicUI.UI { if (dgvUserPurview.Rows.Count > 0) { - AIMSExtension.PublicMethod.EnabledControl(panel2, true); + ControlExtension.EnabledControl(panel2, true); _state = AIMSExtension.EditState.EDIT; RoleRowData = BRole.GetModel(int.Parse(dgvUserPurview.CurrentRow.Cells["Id"].Value.ToString())); @@ -90,14 +91,14 @@ namespace AIMS.PublicUI.UI { RoleObj.Id= RoleRowData.Id; BRole.Update(RoleObj); - AIMSExtension.PublicMethod.ClearControl(panel2); + ControlExtension.ClearControl(panel2); this._state = AIMSExtension.EditState.BROWSE; } } } - AIMSExtension.PublicMethod.EnabledControl(panel2, false); - AIMSExtension.PublicMethod.ClearControl(panel2); + ControlExtension.EnabledControl(panel2, false); + ControlExtension.ClearControl(panel2); dgvUserPurview.DataSource = BRole.GetDataTable(); } private bool ValidInput() diff --git a/AIMS/DocManager/frmDocument3.cs b/AIMS/DocManager/frmDocument3.cs index 4d126af..5d6d0b0 100644 --- a/AIMS/DocManager/frmDocument3.cs +++ b/AIMS/DocManager/frmDocument3.cs @@ -77,6 +77,9 @@ namespace AIMS.OperationAfter.UI ucClassify.RefreshTree(Patient.PatientId); tsbDoc.TabItemClose += new TabStrip.UserActionEventHandler(tsbDoc_TabItemClose); + + if (PublicMethod.OperatorNo=="admin") + buttonX2.Visible= true; } /// /// 手术间信息加载到treeview @@ -453,5 +456,10 @@ namespace AIMS.OperationAfter.UI } } } + + private void buttonX2_Click(object sender, EventArgs e) + { + BOperationReview.SetDocumentXmlStatic("不计费耗材使用清单"); + } } } diff --git a/AIMS/DocManager/frmDocument3.designer.cs b/AIMS/DocManager/frmDocument3.designer.cs index 57f7791..12c2c55 100644 --- a/AIMS/DocManager/frmDocument3.designer.cs +++ b/AIMS/DocManager/frmDocument3.designer.cs @@ -42,10 +42,11 @@ this.expandableSplitter2 = new DevComponents.DotNetBar.ExpandableSplitter(); this.panel5 = new System.Windows.Forms.Panel(); this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); + this.buttonX2 = new DevComponents.DotNetBar.ButtonX(); + this.buttonX1 = new DevComponents.DotNetBar.ButtonX(); this.btnSel = new DevComponents.DotNetBar.ButtonX(); this.lblPatient = new DevComponents.DotNetBar.LabelX(); this.expandablePanel1 = new DevComponents.DotNetBar.ExpandablePanel(); - this.buttonX1 = new DevComponents.DotNetBar.ButtonX(); this.panel2.SuspendLayout(); this.groupBox2.SuspendLayout(); this.panel3.SuspendLayout(); @@ -266,6 +267,7 @@ // panelEx1 // this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; + this.panelEx1.Controls.Add(this.buttonX2); this.panelEx1.Controls.Add(this.buttonX1); this.panelEx1.Controls.Add(this.btnSel); this.panelEx1.Controls.Add(this.lblPatient); @@ -285,6 +287,32 @@ this.panelEx1.Style.GradientAngle = 90; this.panelEx1.TabIndex = 0; // + // buttonX2 + // + this.buttonX2.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.buttonX2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonX2.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.buttonX2.Location = new System.Drawing.Point(613, 11); + this.buttonX2.Margin = new System.Windows.Forms.Padding(2); + this.buttonX2.Name = "buttonX2"; + this.buttonX2.Size = new System.Drawing.Size(76, 23); + this.buttonX2.TabIndex = 6; + this.buttonX2.Text = "同步数据"; + this.buttonX2.Visible = false; + this.buttonX2.Click += new System.EventHandler(this.buttonX2_Click); + // + // buttonX1 + // + this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.buttonX1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.buttonX1.Location = new System.Drawing.Point(86, 11); + this.buttonX1.Margin = new System.Windows.Forms.Padding(2); + this.buttonX1.Name = "buttonX1"; + this.buttonX1.Size = new System.Drawing.Size(76, 23); + this.buttonX1.TabIndex = 6; + this.buttonX1.Text = "数据中心"; + this.buttonX1.Click += new System.EventHandler(this.buttonX1_Click); + // // btnSel // this.btnSel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -339,18 +367,6 @@ this.expandablePanel1.TitleStyle.GradientAngle = 90; this.expandablePanel1.TitleText = "文档目录"; // - // buttonX1 - // - this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.buttonX1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.buttonX1.Location = new System.Drawing.Point(86, 11); - this.buttonX1.Margin = new System.Windows.Forms.Padding(2); - this.buttonX1.Name = "buttonX1"; - this.buttonX1.Size = new System.Drawing.Size(76, 23); - this.buttonX1.TabIndex = 6; - this.buttonX1.Text = "数据中心"; - this.buttonX1.Click += new System.EventHandler(this.buttonX1_Click); - // // frmDocument3 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -396,5 +412,6 @@ private DevComponents.DotNetBar.ExpandablePanel expandablePanel1; private DevComponents.DotNetBar.ButtonX btnSel; private DevComponents.DotNetBar.ButtonX buttonX1; + private DevComponents.DotNetBar.ButtonX buttonX2; } } \ No newline at end of file diff --git a/AIMS/DrugManagement/frmDosageKind.cs b/AIMS/DrugManagement/frmDosageKind.cs index baec61b..2d2119a 100644 --- a/AIMS/DrugManagement/frmDosageKind.cs +++ b/AIMS/DrugManagement/frmDosageKind.cs @@ -1,5 +1,7 @@ -using AIMSBLL; +using AIMS; +using AIMSBLL; using AIMSModel; +using DataDictionary; using System; using System.Collections.Generic; using System.ComponentModel; @@ -22,8 +24,8 @@ namespace DrugManagement.UI private void frmDosageKind_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvDosageKind); - AIMSExtension.PublicMethod.EnabledControl(panel2, false); + ControlExtension.SetDgvAttribute(dgvDosageKind); + ControlExtension.EnabledControl(panel2, false); GetDosageKindDataTable(); } @@ -50,15 +52,15 @@ namespace DrugManagement.UI private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel2, true); - AIMSExtension.PublicMethod.ClearControl(panel2); + ControlExtension.EnabledControl(panel2, true); + ControlExtension.ClearControl(panel2); chkIsValid.Checked = true; } private void tsbModify_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.EDIT; - AIMSExtension.PublicMethod.EnabledControl(panel2, true); + ControlExtension.EnabledControl(panel2, true); txtName.Enabled = false; if (dgvDosageKind.Rows.Count > 0) { @@ -79,8 +81,8 @@ namespace DrugManagement.UI private void tsbCancel_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel2, false); - AIMSExtension.PublicMethod.ClearControl(panel2); + ControlExtension.EnabledControl(panel2, false); + ControlExtension.ClearControl(panel2); } private void tsbSava_Click(object sender, EventArgs e) @@ -107,7 +109,7 @@ namespace DrugManagement.UI DosageKindObj.Id = SelectDosageKindId; BDosageKind.Update(DosageKindObj); } - AIMSExtension.PublicMethod.EnabledControl(panel2, false); + ControlExtension.EnabledControl(panel2, false); _state = AIMSExtension.EditState.BROWSE; GetDosageKindDataTable(); diff --git a/AIMS/DrugManagement/frmDosageUnit.cs b/AIMS/DrugManagement/frmDosageUnit.cs index f1a0a83..02807f7 100644 --- a/AIMS/DrugManagement/frmDosageUnit.cs +++ b/AIMS/DrugManagement/frmDosageUnit.cs @@ -1,12 +1,8 @@ -using AIMSBLL; +using AIMS; +using AIMSBLL; using AIMSModel; using System; -using System.Collections.Generic; -using System.ComponentModel; using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; namespace DrugManagement.UI @@ -22,8 +18,8 @@ namespace DrugManagement.UI private void frmDosageUnit_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvDosageUnit); - AIMSExtension.PublicMethod.EnabledControl(panel2, false); + ControlExtension.SetDgvAttribute(dgvDosageUnit); + ControlExtension.EnabledControl(panel2, false); GetDosageUnitDataTable(); } @@ -51,15 +47,15 @@ namespace DrugManagement.UI private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel2, true); - AIMSExtension.PublicMethod.ClearControl(panel2); + ControlExtension.EnabledControl(panel2, true); + ControlExtension.ClearControl(panel2); chkIsValid.Checked = true; } private void tsbModify_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.EDIT; - AIMSExtension.PublicMethod.EnabledControl(panel2, true); + ControlExtension.EnabledControl(panel2, true); txtName.Enabled = false; if (dgvDosageUnit.Rows.Count > 0) { @@ -81,8 +77,8 @@ namespace DrugManagement.UI private void tsbCancel_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel2, false); - AIMSExtension.PublicMethod.ClearControl(panel2); + ControlExtension.EnabledControl(panel2, false); + ControlExtension.ClearControl(panel2); } private void tsbSava_Click(object sender, EventArgs e) @@ -123,7 +119,7 @@ namespace DrugManagement.UI DosageUnitObj.Id = SelectDosageUnitId; BDosageUnit.Update(DosageUnitObj); } - AIMSExtension.PublicMethod.EnabledControl(panel2, false); + ControlExtension.EnabledControl(panel2, false); _state = AIMSExtension.EditState.BROWSE; GetDosageUnitDataTable(); diff --git a/AIMS/DrugManagement/frmPharmaCology.cs b/AIMS/DrugManagement/frmPharmaCology.cs index 70f838a..9c8909f 100644 --- a/AIMS/DrugManagement/frmPharmaCology.cs +++ b/AIMS/DrugManagement/frmPharmaCology.cs @@ -1,5 +1,7 @@ -using AIMSBLL; +using AIMS; +using AIMSBLL; using AIMSModel; +using DataDictionary; using System; using System.Collections.Generic; using System.ComponentModel; @@ -22,8 +24,8 @@ namespace DrugManagement.UI private void frmPharmaCology_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvPharmaCology); - AIMSExtension.PublicMethod.EnabledControl(panel2, false); + ControlExtension.SetDgvAttribute(dgvPharmaCology); + ControlExtension.EnabledControl(panel2, false); GetPharmaCologyDataTable(); @@ -32,15 +34,15 @@ namespace DrugManagement.UI private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel2, true); - AIMSExtension.PublicMethod.ClearControl(panel2); + ControlExtension.EnabledControl(panel2, true); + ControlExtension.ClearControl(panel2); chkIsValid.Checked = true; } private void tsbModify_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.EDIT; - AIMSExtension.PublicMethod.EnabledControl(panel2, true); + ControlExtension.EnabledControl(panel2, true); txtName.Enabled = false; if (dgvPharmaCology.Rows.Count > 0) { @@ -61,8 +63,8 @@ namespace DrugManagement.UI private void tsbCancel_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel2, false); - AIMSExtension.PublicMethod.ClearControl(panel2); + ControlExtension.EnabledControl(panel2, false); + ControlExtension.ClearControl(panel2); } private void tsbSava_Click(object sender, EventArgs e) @@ -89,7 +91,7 @@ namespace DrugManagement.UI PharmaCologyObj.Id = SelectPharmaCologyId; BPharmaCology.Update(PharmaCologyObj); } - AIMSExtension.PublicMethod.EnabledControl(panel2, false); + ControlExtension.EnabledControl(panel2, false); _state = AIMSExtension.EditState.BROWSE; GetPharmaCologyDataTable(); diff --git a/AIMS/FormMainManage.cs b/AIMS/FormMainManage.cs index 45df9fa..cf55c5e 100644 --- a/AIMS/FormMainManage.cs +++ b/AIMS/FormMainManage.cs @@ -313,7 +313,7 @@ namespace AIMS selsideNavItem = sideNavItem; sideNavItem.Text = sideNavItem.Text + " "; AIMSModel.Menu menu = sideNavItem.Tag as AIMSModel.Menu; - if (menu.Name == "ͳ") + if (menu.Name == "ͳ" || menu.Name == "") { BrowserHelper.OpenBrowserUrlChrome(menu.Path); } diff --git a/AIMS/OperationAfter/frmCommonLargeScreen.cs b/AIMS/OperationAfter/frmCommonLargeScreen.cs deleted file mode 100644 index 0d640b8..0000000 --- a/AIMS/OperationAfter/frmCommonLargeScreen.cs +++ /dev/null @@ -1,399 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; - -namespace AIMS.OperationAfter.UI -{ - public partial class frmCommonLargeScreen : Form - { - - private DateTime dtpBeginDate; - private DateTime dtpEndDate; - private int dSum = 0; //数据表的总记录 - private int startRecond; //起始记录 - private int endRecond = 0; //结束记录 - private int PageSum = 10; //每页显示的记录数 - private int countPage = 0; //总页数 - private int currentPage = 0; //当前页 - private DataTable dts; - - #region 配置文件的属性 - - private string fontSize = "24px"; - private string fontFamily = "黑体"; - private string bodyBgColor = "#000000"; - private string titleBgColor = "#62D377"; - private string titleColBgColor = "#2D9131"; - private string rowOddBgColor = "#000000"; - private string rowEvenBgColor = "#000000"; - private string opeBeforColor = "DodgerBlue"; - //private string opeInColor = "red"; - private string opeInColor = "yellow"; - private string opeAfterColor = "rgb(32, 218, 112)"; - private string opeInColor1 = "Orange"; - private string opeAfterColor1 = "Wheat"; - private string defaultColor = "LightSkyBlue"; //1 - private string PatientNames = ""; - - #endregion - protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData) - { - int WM_KEYDOWN = 256; - int WM_SYSKEYDOWN = 260; - if (msg.Msg == WM_KEYDOWN | msg.Msg == WM_SYSKEYDOWN) - { - switch (keyData) - { - case Keys.Escape: - timer1.Stop(); - timer1.Dispose(); - timer1.Enabled = false; - this.Close();//esc关闭窗体 - break; - } - } - return false; - } - private string body = ""; - public frmCommonLargeScreen() - { - InitializeComponent(); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - } - - private void frmCommonLargeScreen_Load(object sender, EventArgs e) - { - //设置显示信息的开始和结束时间 - setViewTeim(); - //启动时钟 - setButton(false); - - #region 加载配置文件 - - try - { - //OpeTime = "5"; - //fontFamily = xmlOpe.GetNode(0, path, "fontFamily"); - //PageSum = int.Parse(xmlOpe.GetNode(0, path, "pageSum").ToString()); - //fontSize = xmlOpe.GetNode(0, path, "fontSize"); - //bodyBgColor = xmlOpe.GetNode(0, path, "bodyBgColor"); - //titleBgColor = xmlOpe.GetNode(0, path, "titleBgColor"); - //titleColBgColor = xmlOpe.GetNode(0, path, "titleColBgColor"); - //bottomBgColor = xmlOpe.GetNode(0, path, "bottomBgColor"); - //rowOddBgColor = xmlOpe.GetNode(0, path, "rowOddBgColor"); - //rowEvenBgColor = xmlOpe.GetNode(0, path, "rowEvenBgColor"); - //opeBeforColor = xmlOpe.GetNode(0, path, "opeBeforColor"); - //opeInColor = xmlOpe.GetNode(0, path, "opeInColor"); - //opeAfterColor = xmlOpe.GetNode(0, path, "opeAfterColor"); - //defaultColor = xmlOpe.GetNode(0, path, "defaultColor"); - //PatientNames = xmlOpe.GetNode(0, path, "PatientName"); - } - catch (Exception ) - { - MessageBox.Show("加载配置文件失败,使用默认配置"); - } - - #endregion - - GetPageSum(); - } - - /// - /// 获取通知档的内容 - /// - private void GetT_Inform() - { - string messige = "";// PublicMethod.getMessige(); - if (messige.Trim() == "") return; - body += ""; - body += "
"; - body += ""; - body += messige + "
"; - } - - /// - /// 获取每页显示的内容 - /// - private void GetPageSum() - { - try - { - dts =new DataTable (); //PublicMethod.GetPlanNoticeNew(dtpBeginDate, dtpEndDate, OpeTime == "" ? "5" : OpeTime); - //总记录数 - dSum = dts.Rows.Count; - countPage = GetPageCount(); - currentPage = 1; - - //首先判断数据库中的记录数是否大于每一屏显示的数 chengxg@yahoo.cn; - - LoadWaitNurseOpe(currentPage); - - } - catch (Exception ) - { - //MessageBox.Show("加载大屏公告信息失败"); - } - } - - /// - /// 加载所有手术状态为“术前、术中、”的申请信息 - /// - /// - /// - private void LoadWaitNurseOpe(int curPage) - { - - //每次去查询时,要更新一下记录总数,RecondSum,每一页显示的记录数为,PageSum , - body = ""; - ///创建表 - createTable(); - //创建表头 - insertTitle(); - ///创建列名 - string[] colsName = { "科室", "姓名", "手术间", "手术时间", "状态" }; - string[] colsWidth = { "20%", "20%", "15%", "20%", "25%" }; - insertCols(colsName, colsWidth); - - curPage -= 1; - startRecond = curPage * PageSum; - endRecond = startRecond + PageSum; - try - { - //状态vchrOpeStatus 手术间vchrOperatingRoomName 时间BeginTime 姓名vchrPatientName - //手术名称vchrOperationName术者 麻醉者 器械 巡回 - string tdRows = ""; - for (int i = startRecond; i < endRecond; i++) - { - string tdRow = ""; - if (i >= dSum) - { - tdRow += " "; - } - else - { - string intApplyID = dts.Rows[i]["OperationApplyId"].ToString(); - string vchrOpeStatus = "";// PublicMethod.GetOpeStatus(dts.Rows[i]); - if (vchrOpeStatus == "") continue; - string OperationRoom = dts.Rows[i]["SqOperationRoom"].ToString();// dts.Rows[i]["SZOperationRoom"].ToString() == "" ? dts.Rows[i]["SqOperationRoom"].ToString() : dts.Rows[i]["SZOperationRoom"].ToString(); - string vchrFactBeginTime = ""; - #region 内容的着色设置 - - string rowStyle = ""; - if (i % 2 == 0) - { - rowStyle = "bgcolor='" + rowEvenBgColor + "' align=left valie=middle style='border-bottom:1px solid #629069;font-size:" + fontSize + ";font-weight:bold; vertical-align: middle;font-family:\"" + fontFamily + "\"; "; - } - else - { - rowStyle = "bgcolor='" + rowOddBgColor + "' align=left valie=middle style='border-bottom:1px solid #629069;font-size:" + fontSize + ";font-weight:bold; vertical-align: middle;font-family:\"" + fontFamily + "\"; "; - } - switch (vchrOpeStatus) - { - case "等待手术": - rowStyle += " color:" + defaultColor + ";'"; - break; - case "术前准备": - rowStyle += " color:" + opeBeforColor + ";'"; //2 - break; - case "手术进行中": - rowStyle += " color:" + opeInColor + ";'"; //3 - break; - case "术后恢复": - rowStyle += " color:" + opeAfterColor + ";'"; //4 - break; - case "转入复苏室": - OperationRoom = dts.Rows[i]["PACUBed"].ToString(); - rowStyle += " color:" + opeInColor1 + ";'"; //6 - break; - case "离开手术室": - rowStyle += " color:" + opeAfterColor1 + ";'"; //57 - break; - case "离开恢复室": - OperationRoom = dts.Rows[i]["PACUBed"].ToString(); - rowStyle += " color:" + opeAfterColor1 + ";'"; //57 - break; - default: - break; - } - - #endregion - - vchrFactBeginTime = dts.Rows[i]["OperationBeginTime"].ToString();// == "" ? dts.Rows[i]["OrderOperationTime"].ToString() : dts.Rows[i]["InRoomTime"].ToString(); - if (vchrFactBeginTime.Trim().ToString() != "") - { - vchrFactBeginTime = Convert.ToDateTime(vchrFactBeginTime).ToString("HH:mm"); - } - else vchrFactBeginTime = "- -"; - tdRow += "" + dts.Rows[i]["DepartmentName"] + ""; - string PatientName = ""; - if (PatientNames == "") - { - PatientName = dts.Rows[i]["PatientName"].ToString(); - } - else - { - string name = dts.Rows[i]["PatientName"].ToString().Length < 2 ? "" : dts.Rows[i]["PatientName"].ToString().Substring(2); - PatientName = dts.Rows[i]["PatientName"].ToString().Substring(0, 1) + PatientNames + name; - } - tdRow += " " + PatientName + ""; - tdRow += " " + OperationRoom + ""; - tdRow += " " + vchrFactBeginTime + " "; - tdRow += "" + vchrOpeStatus + ""; - } - tdRow += ""; - tdRows += tdRow; - } - viewRemark(); - body = tdRows == "" ? body : body.Replace("{rows}", tdRows); - //插入底部 - insertBottom(); - webBrowser1.DocumentText = body; - } - catch (Exception ) - { - } - } - - #region 创建大屏公告列表 - - private void createTable() - { - - body = ""; - body += ""; - body += "{title}"; - body += "{columens}"; - body += "{rows}"; - body += "
"; - - } - - - /// - /// 插入表头 - /// - private void insertTitle() - { - string titleStr = ""; - titleStr += ""; - titleStr += ""; - titleStr += "
"; - titleStr += "
患者家属等候区
" +DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "
(第" + currentPage + "屏/共" + countPage + "屏)
"; - body = body.Replace("{title}", titleStr); - } - - - /// - /// 显示备注 - /// - private void viewRemark() - { - GetT_Inform(); - } - - private void insertCols(string[] colNames, string[] colWidths) - { - string colString = ""; - string colContent = ""; - colString += "{td}"; - for (int i = 0; i < colNames.Length; i++) - { - colContent += "" + colNames[i] + - ""; - } - colString = colString.Replace("{td}", colContent); - body = body.Replace("{columens}", colString); - } - - #endregion - - #region //计算总页数 - - public int GetPageCount() - { - if (PageSum == 0) - PageSum = 10; //每页显示的记录条数为"0",则默认为"20" - if (dSum % PageSum == 0) - return (dSum / PageSum); - else - return (dSum / PageSum) + 1; - } - - /// - /// 插入表底部 - /// - private void insertBottom() - { - string bottomStr = ""; - bottomStr += ""; - bottomStr += ""; - bottomStr += ""; - body = body.Replace("{Bootom}", bottomStr); - } - - #endregion - - private void timer1_Tick(object sender, EventArgs e) - { - //下一页 - button2_Click(null, null); - } - - /// - /// 下一页 - /// - /// - /// - private void button2_Click(object sender, EventArgs e) - { - if (currentPage >= countPage) - { - setViewTeim(); - GetPageSum(); - } - else - { - currentPage += 1; - LoadWaitNurseOpe(currentPage); - } - } - - - private void frmOpeRoomPlanNotice_Resize(object sender, EventArgs e) - { - //内容的控件的高度 - webBrowser1.Height = this.ClientRectangle.Height; - } - - private void setButton(bool b) - { - if (b) - { - timer1.Stop(); - } - else - { - timer1.Start(); - } - } - - private void frmOpeRoomPlanNotice_FormClosing(object sender, FormClosingEventArgs e) - { - setButton(true); - } - - private void setViewTeim() - { - - dtpBeginDate = DateTime.Now.Date.AddSeconds(1); - dtpEndDate = DateTime.Now.Date.AddHours(23).AddMinutes(59).AddSeconds(59); - } - } -} diff --git a/AIMS/OperationAfter/frmCommonLargeScreen.designer.cs b/AIMS/OperationAfter/frmCommonLargeScreen.designer.cs deleted file mode 100644 index 36bcfd2..0000000 --- a/AIMS/OperationAfter/frmCommonLargeScreen.designer.cs +++ /dev/null @@ -1,73 +0,0 @@ -namespace AIMS.OperationAfter.UI -{ - partial class frmCommonLargeScreen - { - /// - /// 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() - { - this.components = new System.ComponentModel.Container(); - this.timer1 = new System.Windows.Forms.Timer(this.components); - this.webBrowser1 = new System.Windows.Forms.WebBrowser(); - this.SuspendLayout(); - // - // timer1 - // - this.timer1.Enabled = true; - this.timer1.Interval = 10000; - this.timer1.Tick += new System.EventHandler(this.timer1_Tick); - // - // webBrowser1 - // - this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; - this.webBrowser1.IsWebBrowserContextMenuEnabled = false; - this.webBrowser1.Location = new System.Drawing.Point(0, 0); - this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); - this.webBrowser1.Name = "webBrowser1"; - this.webBrowser1.ScrollBarsEnabled = false; - this.webBrowser1.Size = new System.Drawing.Size(852, 440); - this.webBrowser1.TabIndex = 1; - // - // frmCommonLargeScreen - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(852, 440); - this.Controls.Add(this.webBrowser1); - this.Name = "frmCommonLargeScreen"; - this.Text = "患者等候区"; - this.WindowState = System.Windows.Forms.FormWindowState.Maximized; - this.Load += new System.EventHandler(this.frmCommonLargeScreen_Load); - this.Resize += new System.EventHandler(this.frmOpeRoomPlanNotice_Resize); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Timer timer1; - private System.Windows.Forms.WebBrowser webBrowser1; - } -} \ No newline at end of file diff --git a/AIMS/OperationAfter/frmCommonLargeScreen.resx b/AIMS/OperationAfter/frmCommonLargeScreen.resx deleted file mode 100644 index 1f666f2..0000000 --- a/AIMS/OperationAfter/frmCommonLargeScreen.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - \ No newline at end of file diff --git a/AIMS/OperationAfter/frmOperationManage.cs b/AIMS/OperationAfter/frmOperationManage.cs index 14aecd5..10ca76f 100644 --- a/AIMS/OperationAfter/frmOperationManage.cs +++ b/AIMS/OperationAfter/frmOperationManage.cs @@ -1,5 +1,6 @@ using AIMSBLL; using AIMSModel; +using DataDictionary; using System; using System.Collections.Generic; using System.ComponentModel; @@ -29,7 +30,7 @@ namespace AIMS.OperationAfter.UI } dgv.AutoGenerateColumns = false; - AIMSExtension.PublicMethod.SetDgvAttribute(dgv); + ControlExtension.SetDgvAttribute(dgv); dgv.BackgroundColor = System.Drawing.Color.Snow; List list = new List(); @@ -238,52 +239,13 @@ namespace AIMS.OperationAfter.UI private void tsbExportExcel_Click(object sender, EventArgs e) { - AIMSExtension.PublicMethod.DataToExcel(dgv); - } - - private void tsbStopOperation_Click(object sender, EventArgs e) - { - if (dgv.Rows.Count > 0) - { - OperationFront.UI.frmStopOperation frmStopOperation = new OperationFront.UI.frmStopOperation(); - frmStopOperation.ApplyIdList.Add(int.Parse(dgv.CurrentRow.Cells["ApplyId"].EditedFormattedValue.ToString())); - frmStopOperation.FormClosed += new FormClosedEventHandler(frmStopOperation_FormClosed); - frmStopOperation.ShowDialog(); - } - } - - void frmStopOperation_FormClosed(object sender, FormClosedEventArgs e) - { - btnFind_Click(null, null); - } - - private void tsbReviewApply_Click(object sender, EventArgs e) - { - if (dgv.Rows.Count > 0) - { - OperationFront.UI.frmOperationApplyDetail frmOperationApplyDetail = new OperationFront.UI.frmOperationApplyDetail(); - frmOperationApplyDetail.State = AIMSExtension.EditState.EDIT; - frmOperationApplyDetail.EditApplyId = int.Parse(dgv.CurrentRow.Cells["ApplyId"].Value.ToString()); - frmOperationApplyDetail.FormClosed += new FormClosedEventHandler(frmOperationApplyDetail_FormClosed); - frmOperationApplyDetail.ShowDialog(); - - } - } - - void frmOperationApplyDetail_FormClosed(object sender, FormClosedEventArgs e) - { - btnFind_Click(null, null); - } - - private void tsbPrint_Click(object sender, EventArgs e) - { - if (dgv.Rows.Count < 1 || dgv.Rows.Count < 1) - { - MessageBox.Show("没有记录,请查询到数据后再导出数据到Excel"); - return; - } DataToExcel(dgv); } + + /// + /// DataGridView转Excel + /// + /// public static void DataToExcel(DataGridView m_DataView) { SaveFileDialog kk = new SaveFileDialog(); @@ -292,7 +254,7 @@ namespace AIMS.OperationAfter.UI kk.FilterIndex = 1; if (kk.ShowDialog() == DialogResult.OK) { - string FileName = kk.FileName; + string FileName = kk.FileName + ".xls"; if (File.Exists(FileName)) File.Delete(FileName); FileStream objFileStream; @@ -342,9 +304,52 @@ namespace AIMS.OperationAfter.UI } objStreamWriter.Close(); objFileStream.Close(); - MessageBox.Show("保存成功!", "系统提示"); + MessageBox.Show("保存EXCEL成功"); } } + private void tsbStopOperation_Click(object sender, EventArgs e) + { + if (dgv.Rows.Count > 0) + { + OperationFront.UI.frmStopOperation frmStopOperation = new OperationFront.UI.frmStopOperation(); + frmStopOperation.ApplyIdList.Add(int.Parse(dgv.CurrentRow.Cells["ApplyId"].EditedFormattedValue.ToString())); + frmStopOperation.FormClosed += new FormClosedEventHandler(frmStopOperation_FormClosed); + frmStopOperation.ShowDialog(); + } + } + + void frmStopOperation_FormClosed(object sender, FormClosedEventArgs e) + { + btnFind_Click(null, null); + } + + private void tsbReviewApply_Click(object sender, EventArgs e) + { + if (dgv.Rows.Count > 0) + { + OperationFront.UI.frmOperationApplyDetail frmOperationApplyDetail = new OperationFront.UI.frmOperationApplyDetail(); + frmOperationApplyDetail.State = AIMSExtension.EditState.EDIT; + frmOperationApplyDetail.EditApplyId = int.Parse(dgv.CurrentRow.Cells["ApplyId"].Value.ToString()); + frmOperationApplyDetail.FormClosed += new FormClosedEventHandler(frmOperationApplyDetail_FormClosed); + frmOperationApplyDetail.ShowDialog(); + + } + } + + void frmOperationApplyDetail_FormClosed(object sender, FormClosedEventArgs e) + { + btnFind_Click(null, null); + } + + private void tsbPrint_Click(object sender, EventArgs e) + { + if (dgv.Rows.Count < 1 || dgv.Rows.Count < 1) + { + MessageBox.Show("没有记录,请查询到数据后再导出数据到Excel"); + return; + } + DataToExcel(dgv); + } private void dgv_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { diff --git a/AIMS/OperationAfter/frmQualityControlViewParent.cs b/AIMS/OperationAfter/frmQualityControlViewParent.cs index b541e38..fdb4bde 100644 --- a/AIMS/OperationAfter/frmQualityControlViewParent.cs +++ b/AIMS/OperationAfter/frmQualityControlViewParent.cs @@ -13,6 +13,7 @@ using System.Threading.Tasks; using AIMSModel; using AIMSExtension; using AIMSBLL; +using DataDictionary; namespace AIMS.OperationAfter.UI { @@ -214,7 +215,7 @@ namespace AIMS.OperationAfter.UI labHospitalNum.Text = vPatient["MdrecNo"].ToString(); } - PublicMethod.ClearControl(panel5); + ControlExtension.ClearControl(panel5); panel4.Controls.Clear(); panel1.Visible = true; diff --git a/AIMS/OperationDoing/AnasRecordBill/frmAanesthesiaRecord.cs b/AIMS/OperationDoing/AnasRecordBill/frmAanesthesiaRecord.cs index 4e52f07..63f9812 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmAanesthesiaRecord.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmAanesthesiaRecord.cs @@ -111,6 +111,14 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI SelectDictValue.Hidden(); SelectDictText.Hidden(); + if (_record.SelPhysioConfig != null) + { + _record.SelPhysioConfig.IsClick = false; + _record.SelPhysioConfig.onClick(e); + _record.SelPhysioConfig = null; + } + + Panel panel = zgcAnaesRecord.Parent as Panel; panel.VerticalScroll.Value = 0; Panel panel2 = zgcAnaesRecord2.Parent as Panel; @@ -186,6 +194,13 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI SelectDictValue.Hidden(); SelectDictText.Hidden(); + if (_record.SelPhysioConfig != null) + { + _record.SelPhysioConfig.IsClick = false; + _record.SelPhysioConfig.onClick(e); + _record.SelPhysioConfig = null; + } + templateManage2.BindOperationRecordValueAll(templateManage2.OpeRecord); templateManage2.Bind(); zgcAnaesRecord2.Refresh(); @@ -1411,7 +1426,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI foreach (var pdTemp in physioDatas) { if (pdTemp.Value < 0) continue; - PhysioDataConfig addPP = _record.PhysioConfigList.Where(a => pdTemp.PhysioDataConfigId == a.Id).ToList()[0]; + PhysioDataConfig addPP = _record.PhysioConfigList.Where(a => pdTemp.PhysioDataConfigId == a.Id).ToList()[0]; addPP.AddPointItem(pdTemp); date++; } @@ -1852,7 +1867,6 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI templateManage2.zedControl_MouseDoubleClick(send, e); } } - //public ucStripMenuItem menuItem = new ucStripMenuItem(); private void zgcAnaesRecord2_ContextMenuBuilder(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState) { @@ -2081,7 +2095,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI if (_record.OperationDoctor == null || _record.OperationDoctor.Trim() == "") { - message = "请添加术者!"; + message = "请添加手术医师!"; isTrue = false; } diff --git a/AIMS/OperationDoing/AnasRecordBill/frmBloodGasAnalysisNew.cs b/AIMS/OperationDoing/AnasRecordBill/frmBloodGasAnalysisNew.cs index baba315..c2428d3 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmBloodGasAnalysisNew.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmBloodGasAnalysisNew.cs @@ -9,6 +9,7 @@ using System.Data; using System.Drawing; using System.Linq; using System.Windows.Forms; +using DataDictionary; namespace AIMS.OperationDoing.AnasRecordBill.UI { @@ -38,8 +39,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI /// private void frmAnalysis_Load(object sender, EventArgs e) { - PublicMethod.ClearControl(panel1); - //PublicMethod.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); + //ControlExtension.EnabledControl(panel1, false); radioButton1.Checked = true; this.Text = "血气分析"; dgvAnalysis.AutoGenerateColumns = false; @@ -173,7 +174,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { CurrentState = EditState.ADD; //tsbCancel_Click(null, null); - PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); AnalysisBeginTime.Value = DateTime.Now; } /// @@ -204,7 +205,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } CurrentState = EditState.EDIT; - PublicMethod.EnabledControl(panel1, true); + ControlExtension.EnabledControl(panel1, true); this.Text = "修改血气分析"; Analysis = _record.FactBloodGasAnalysisList.Where(c => c.Id == Convert.ToInt32(dgvAnalysis.SelectedRows[0].Cells["Id"].Value)).ToList()[0]; if (Analysis.BloodGasType == "动脉血气") { radioButton1.Checked = true; } else { radioButton2.Checked = true; } @@ -242,8 +243,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI private void tsbCancel_Click(object sender, EventArgs e) { CurrentState = EditState.BROWSE; - PublicMethod.ClearControl(panel1); - PublicMethod.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); } /// /// 关闭 @@ -317,8 +318,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI // MessageBox.Show(message + "请注意!", "系统提示"); //} CurrentState = EditState.BROWSE; - PublicMethod.ClearControl(panel1); - //PublicMethod.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); + //ControlExtension.EnabledControl(panel1, false); Analysis = null; BindDgv(); } @@ -381,7 +382,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI BFactBloodGasAnalysis.Delete(Blood); Blood.clearAddObj(zgcAnaesRecord); _record.FactBloodGasAnalysisList.Remove(Blood); - PublicMethod.ClearControl(panel1); + ControlExtension.ClearControl(panel1); CurrentState = EditState.BROWSE; } catch (Exception exp) diff --git a/AIMS/OperationDoing/AnasRecordBill/frmInstrumentRecord.Designer.cs b/AIMS/OperationDoing/AnasRecordBill/frmInstrumentRecord.Designer.cs index df3ef6d..54242ef 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmInstrumentRecord.Designer.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmInstrumentRecord.Designer.cs @@ -78,8 +78,10 @@ this.txtRemark = new DevComponents.DotNetBar.Controls.TextBoxX(); this.label18 = new System.Windows.Forms.Label(); this.label26 = new System.Windows.Forms.Label(); + this.label20 = new System.Windows.Forms.Label(); this.label27 = new System.Windows.Forms.Label(); this.txtTourNurse = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.txtOperationDoctor = new DevComponents.DotNetBar.Controls.TextBoxX(); this.txtInstrumentNurse = new DevComponents.DotNetBar.Controls.TextBoxX(); this.panelQXList = new System.Windows.Forms.Panel(); this.plTital = new System.Windows.Forms.Panel(); @@ -889,8 +891,10 @@ this.panelButton.Controls.Add(this.txtRemark); this.panelButton.Controls.Add(this.label18); this.panelButton.Controls.Add(this.label26); + this.panelButton.Controls.Add(this.label20); this.panelButton.Controls.Add(this.label27); this.panelButton.Controls.Add(this.txtTourNurse); + this.panelButton.Controls.Add(this.txtOperationDoctor); this.panelButton.Controls.Add(this.txtInstrumentNurse); this.panelButton.Dock = System.Windows.Forms.DockStyle.Top; this.panelButton.Location = new System.Drawing.Point(0, 425); @@ -939,12 +943,22 @@ // this.label26.AutoSize = true; this.label26.Font = new System.Drawing.Font("微软雅黑", 12F); - this.label26.Location = new System.Drawing.Point(414, 106); + this.label26.Location = new System.Drawing.Point(353, 108); this.label26.Name = "label26"; this.label26.Size = new System.Drawing.Size(74, 21); this.label26.TabIndex = 851; this.label26.Text = "巡回护士"; // + // label20 + // + this.label20.AutoSize = true; + this.label20.Font = new System.Drawing.Font("微软雅黑", 12F); + this.label20.Location = new System.Drawing.Point(586, 107); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(74, 21); + this.label20.TabIndex = 850; + this.label20.Text = "手术医师"; + // // label27 // this.label27.AutoSize = true; @@ -975,12 +989,38 @@ this.txtTourNurse.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.txtTourNurse.DisabledBackColor = System.Drawing.Color.White; this.txtTourNurse.ForeColor = System.Drawing.Color.Black; - this.txtTourNurse.Location = new System.Drawing.Point(506, 107); + this.txtTourNurse.Location = new System.Drawing.Point(445, 109); this.txtTourNurse.Name = "txtTourNurse"; this.txtTourNurse.Size = new System.Drawing.Size(120, 22); this.txtTourNurse.TabIndex = 847; this.txtTourNurse.DoubleClick += new System.EventHandler(this.txtTourNurse_Click); // + // txtOperationDoctor + // + this.txtOperationDoctor.BackColor = System.Drawing.Color.White; + // + // + // + this.txtOperationDoctor.Border.BackColor = System.Drawing.SystemColors.Desktop; + this.txtOperationDoctor.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.txtOperationDoctor.Border.BorderBottomColor = System.Drawing.Color.FromArgb(((int)(((byte)(231)))), ((int)(((byte)(227)))), ((int)(((byte)(231))))); + this.txtOperationDoctor.Border.BorderBottomWidth = 1; + this.txtOperationDoctor.Border.BorderColor = System.Drawing.SystemColors.Desktop; + this.txtOperationDoctor.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.txtOperationDoctor.Border.BorderLeftWidth = 1; + this.txtOperationDoctor.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.txtOperationDoctor.Border.BorderRightWidth = 1; + this.txtOperationDoctor.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.txtOperationDoctor.Border.BorderTopWidth = 1; + this.txtOperationDoctor.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.txtOperationDoctor.DisabledBackColor = System.Drawing.Color.White; + this.txtOperationDoctor.ForeColor = System.Drawing.Color.Black; + this.txtOperationDoctor.Location = new System.Drawing.Point(666, 108); + this.txtOperationDoctor.Name = "txtOperationDoctor"; + this.txtOperationDoctor.Size = new System.Drawing.Size(120, 22); + this.txtOperationDoctor.TabIndex = 848; + this.txtOperationDoctor.DoubleClick += new System.EventHandler(this.txtOperationDoctor_DoubleClick); + // // txtInstrumentNurse // this.txtInstrumentNurse.BackColor = System.Drawing.Color.White; @@ -1753,13 +1793,13 @@ this.flowLayoutPanel1.Size = new System.Drawing.Size(147, 71); this.flowLayoutPanel1.TabIndex = 0; // - // frmAnasRecordInstrument + // frmInstrumentRecord // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(1711, 941); this.Controls.Add(this.panel1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "frmAnasRecordInstrument"; + this.Name = "frmInstrumentRecord"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "器械清点单"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; @@ -1907,5 +1947,7 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label1; private System.Windows.Forms.ToolTip toolTip1; + public System.Windows.Forms.Label label20; + private DevComponents.DotNetBar.Controls.TextBoxX txtOperationDoctor; } } \ No newline at end of file diff --git a/AIMS/OperationDoing/AnasRecordBill/frmInstrumentRecord.cs b/AIMS/OperationDoing/AnasRecordBill/frmInstrumentRecord.cs index 3defb0d..0035df1 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmInstrumentRecord.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmInstrumentRecord.cs @@ -7,6 +7,7 @@ using AIMSExtension; using AIMSModel; using AxNsoOfficeLib; using DCSoftDotfuscate; +using DevComponents.DotNetBar; using DevComponents.Editors.DateTimeAdv; using DocumentManagement; using DrawGraph; @@ -422,6 +423,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { OperationDoing.AnasRecordBill.UI.frmSelectPatientGoodsBill frmSelectPatient = new UI.frmSelectPatientGoodsBill(); frmSelectPatient.isMainOpen = true; + frmSelectPatient.frmAnasRecord = this; frmSelectPatient.FormClosed += new FormClosedEventHandler(frmSelectPatient_FormClosed); frmSelectPatient.ShowDialog(); @@ -962,6 +964,19 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { FirstbtnEnter(); } + + SelectOperationDoctorData = BFactPersonDuty.GetPersonIdList(_record.PatientId.Value, 1); + if (SelectOperationDoctorData.Count > 0) + { + txtOperationDoctor.Text = ""; + + foreach (int RowId in SelectOperationDoctorData) + { + txtOperationDoctor.Text += BPerson.SelectSingle(RowId).Name + ","; + } + txtOperationDoctor.Text = txtOperationDoctor.Text.Substring(0, txtOperationDoctor.Text.LastIndexOf(",")); + } + SelectInstrumentNurseData = BFactPersonDuty.GetPersonIdList(_record.PatientId.Value, 6); if (SelectInstrumentNurseData.Count > 0) { @@ -1135,8 +1150,37 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI message = "请与手术信息选择手术切口!"; isTrue = false; } + if (_record.OperationDoctor == null || _record.OperationDoctor.Trim() == "") + { + message = "请添加手术医师!"; + isTrue = false; + } + return isTrue; } + public void ClearRecordDate() + { + panel8.VerticalScroll.Value = 0; + //清空记录点并重新加载 + ClearTimeText(); + //关闭采集的服务 + DisposeTimer(); + lblHR.Text = "--"; + lblRESP.Text = "--"; + lblSpo2.Text = "--"; + lblPR.Text = "--"; + lblDia.Text = "---/---"; + lblHR.ForeColor = Color.Green; + lblRESP.ForeColor = Color.Yellow; + lblSpo2.ForeColor = Color.Cyan; + lblPR.ForeColor = Color.Green; + lblDia.ForeColor = Color.Red; + if (templateManage != null) + { + templateManage.ControlClear(); + } + _record = null; + } #endregion #region 右侧按钮 @@ -1470,8 +1514,9 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } _record.InstrumentList.ApplianceRecordList = GetApplianceRecord(); BApplianceRecord.InsertListData(_record.InstrumentList.ApplianceRecordList); + DBManage.AddPerson(_record, SelectOperationDoctorData, 1); DBManage.AddPerson(_record, SelectInstrumentNurseData, 6); - DBManage.AddPerson(_record, SelectTourNurseData, 7); + DBManage.AddPerson(_record, SelectTourNurseData, 7); } @@ -1784,6 +1829,33 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } } + private PublicUI.UI.frmSelectPerson frmOperationDoctor; + private List SelectOperationDoctorData = new List(); //一助 + private void txtOperationDoctor_DoubleClick(object sender, EventArgs e) + { + frmOperationDoctor = new PublicUI.UI.frmSelectPerson(); + frmOperationDoctor.PersonType = "医生"; + frmOperationDoctor.SelectDepartmentName = _record.ApplyDepartmentName; + frmOperationDoctor.SelectPersonData = SelectOperationDoctorData; + frmOperationDoctor.FormClosed += new FormClosedEventHandler(frmOperationDoctor_FormClosed); + frmOperationDoctor.ShowDialog(); + } + + void frmOperationDoctor_FormClosed(object sender, FormClosedEventArgs e) + { + txtOperationDoctor.Text = ""; + if (frmOperationDoctor.SelectPersonData.Count > 0) + { + SelectOperationDoctorData = frmOperationDoctor.SelectPersonData; + foreach (int RowId in frmOperationDoctor.SelectPersonData) + { + txtOperationDoctor.Text += BPerson.SelectSingle(RowId).Name + ","; + } + int idxStart = txtOperationDoctor.Text.LastIndexOf(","); + txtOperationDoctor.Text = txtOperationDoctor.Text.Substring(0, idxStart); + } + } + /// /// 根据工作类型 选择医生术者赋值TextBox /// @@ -1861,6 +1933,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } } + private void plPrint_Click(object sender, EventArgs e) { if (_record == null || _record.Id == 0) return; diff --git a/AIMS/OperationDoing/AnasRecordBill/frmSeleteRoom.cs b/AIMS/OperationDoing/AnasRecordBill/frmSeleteRoom.cs index 4d2b5c1..3a7a40e 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmSeleteRoom.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmSeleteRoom.cs @@ -15,6 +15,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI public partial class frmSeleteRoom : Form { public string RoomId; + public string RoomName; public string NowRoomId; public frmSeleteRoom() { @@ -50,6 +51,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI if (((RadioButton)sender).Checked) { RoomId = (((RadioButton)sender).Tag as OperationRoom).Id.ToString(); + RoomName = (((RadioButton)sender).Tag as OperationRoom).Name.ToString(); } } diff --git a/AIMS/OperationDoing/oldSystemCode/frmInstrumentRegistration.cs b/AIMS/OperationDoing/oldSystemCode/frmInstrumentRegistration.cs index cc2432c..006fe26 100644 --- a/AIMS/OperationDoing/oldSystemCode/frmInstrumentRegistration.cs +++ b/AIMS/OperationDoing/oldSystemCode/frmInstrumentRegistration.cs @@ -102,7 +102,7 @@ namespace AIMS.OperationDoing.AnasRecordBill num = BInstrumentRegistration.Insert(ir); if (num > 0) { - new frmMessageBox().Show(); + MessageBox.Show("保存成功!"); if (selname != "" && selNumbers != "" && selname == ir.Name && selNumbers == ir.Numbers) { BinddgvInstrument(); diff --git a/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.Designer.cs b/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.Designer.cs index 4f7d069..fb78569 100644 --- a/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.Designer.cs +++ b/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.Designer.cs @@ -30,6 +30,9 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSelectPatientGoodsBill)); this.panel1 = new System.Windows.Forms.Panel(); + this.txtquery = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btnQuery = new DevComponents.DotNetBar.ButtonX(); + this.label4 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.cboRoom = new System.Windows.Forms.ComboBox(); @@ -66,9 +69,7 @@ this.label3 = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.panel3 = new System.Windows.Forms.Panel(); - this.txtquery = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.btnQuery = new DevComponents.DotNetBar.ButtonX(); - this.label4 = new System.Windows.Forms.Label(); + this.buttonX2 = new DevComponents.DotNetBar.ButtonX(); this.panel1.SuspendLayout(); this.groupBox1.SuspendLayout(); this.panel2.SuspendLayout(); @@ -91,9 +92,45 @@ this.panel1.Font = new System.Drawing.Font("宋体", 10.5F); this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(999, 39); + this.panel1.Size = new System.Drawing.Size(1054, 39); this.panel1.TabIndex = 0; // + // txtquery + // + // + // + // + this.txtquery.Border.Class = "TextBoxBorder"; + this.txtquery.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.txtquery.Location = new System.Drawing.Point(540, 9); + this.txtquery.Name = "txtquery"; + this.txtquery.PreventEnterBeep = true; + this.txtquery.Size = new System.Drawing.Size(100, 23); + this.txtquery.TabIndex = 12; + // + // btnQuery + // + this.btnQuery.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnQuery.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnQuery.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnQuery.Location = new System.Drawing.Point(646, 10); + this.btnQuery.Name = "btnQuery"; + this.btnQuery.Size = new System.Drawing.Size(80, 23); + this.btnQuery.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnQuery.TabIndex = 11; + this.btnQuery.Text = "查询"; + this.btnQuery.Click += new System.EventHandler(this.btnQuery_Click); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label4.Location = new System.Drawing.Point(471, 9); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(65, 20); + this.label4.TabIndex = 10; + this.label4.Text = "患者查询"; + // // label1 // this.label1.AutoSize = true; @@ -169,7 +206,7 @@ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox1.Location = new System.Drawing.Point(0, 39); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(999, 103); + this.groupBox1.Size = new System.Drawing.Size(1054, 103); this.groupBox1.TabIndex = 1; this.groupBox1.TabStop = false; this.groupBox1.Text = "患者信息"; @@ -177,6 +214,7 @@ // panel2 // this.panel2.AutoScroll = true; + this.panel2.Controls.Add(this.buttonX2); this.panel2.Controls.Add(this.buttonX1); this.panel2.Controls.Add(this.txtState); this.panel2.Controls.Add(this.txttime); @@ -206,7 +244,7 @@ this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Location = new System.Drawing.Point(3, 17); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(993, 83); + this.panel2.Size = new System.Drawing.Size(1048, 83); this.panel2.TabIndex = 0; this.panel2.Visible = false; // @@ -460,7 +498,7 @@ this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox2.Location = new System.Drawing.Point(0, 142); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(999, 495); + this.groupBox2.Size = new System.Drawing.Size(1054, 495); this.groupBox2.TabIndex = 2; this.groupBox2.TabStop = false; this.groupBox2.Text = "手术患者"; @@ -470,50 +508,27 @@ this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; this.panel3.Location = new System.Drawing.Point(3, 17); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(993, 475); + this.panel3.Size = new System.Drawing.Size(1048, 475); this.panel3.TabIndex = 0; // - // txtquery + // buttonX2 // - // - // - // - this.txtquery.Border.Class = "TextBoxBorder"; - this.txtquery.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.txtquery.Location = new System.Drawing.Point(540, 9); - this.txtquery.Name = "txtquery"; - this.txtquery.PreventEnterBeep = true; - this.txtquery.Size = new System.Drawing.Size(100, 23); - this.txtquery.TabIndex = 12; - // - // btnQuery - // - this.btnQuery.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnQuery.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnQuery.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnQuery.Location = new System.Drawing.Point(646, 10); - this.btnQuery.Name = "btnQuery"; - this.btnQuery.Size = new System.Drawing.Size(80, 23); - this.btnQuery.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnQuery.TabIndex = 11; - this.btnQuery.Text = "查询"; - this.btnQuery.Click += new System.EventHandler(this.btnQuery_Click); - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(471, 9); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(65, 20); - this.label4.TabIndex = 10; - this.label4.Text = "患者查询"; + this.buttonX2.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.buttonX2.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.buttonX2.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.buttonX2.Location = new System.Drawing.Point(908, 14); + this.buttonX2.Name = "buttonX2"; + this.buttonX2.Size = new System.Drawing.Size(95, 54); + this.buttonX2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.buttonX2.TabIndex = 6; + this.buttonX2.Text = "切换手术间"; + this.buttonX2.Click += new System.EventHandler(this.buttonX2_Click); // // frmSelectPatientGoodsBill // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(999, 637); + this.ClientSize = new System.Drawing.Size(1054, 637); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); @@ -576,5 +591,6 @@ private DevComponents.DotNetBar.Controls.TextBoxX txtquery; private DevComponents.DotNetBar.ButtonX btnQuery; private System.Windows.Forms.Label label4; + private DevComponents.DotNetBar.ButtonX buttonX2; } } \ No newline at end of file diff --git a/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.cs b/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.cs index ff6f402..2026ea3 100644 --- a/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.cs +++ b/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.cs @@ -19,6 +19,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI public int SelPatientId; public int SelApplyId; public bool isMainOpen = false; + public AIMS.OperationDoing.AnasRecordBill.UI.frmInstrumentRecord frmAnasRecord; List rooms; public frmSelectPatientGoodsBill() @@ -88,7 +89,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI else dt2 = SelectPatient.GetRelieveLockingPatientDataTable(DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()), cboRoom.SelectedValue.ToString()); - List list = new List(); + List list = new List(); for (int i = 0; i < rooms.Count; i++) { foreach (DataRow dr in dt.Rows) @@ -107,43 +108,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } } } - //for (int i = 0; i < list.Count; i++) - //{ - // int j = 0; - // foreach (DataRow dr in dt.Rows) - // { - // if (dr["OperationRoom"].ToString() != list[i]) continue; - // ucPatientCard uc = new ucPatientCard(dr); - // uc.InRoom += Uc_InRoom; - // uc.QxRoom += Uc_QxRoom; - // uc.Clicks += Uc_Clicks; - // uc.Location = new Point((uc.Width + 9) * j, (uc.Height + 10) * i + 30); - // if (uc.lblAnesDoctors.Text == "麻醉医生:" || uc.lblAnesDoctors.Text.Trim() == "麻醉医生") - // uc.buttonX1.Enabled = true; - // else - // uc.buttonX1.Enabled = false; - // panel3.Controls.Add(uc); - // j++; - // } - // foreach (DataRow dr in dt2.Rows) - // { - // if (dr["OperationRoom"].ToString() != list[i]) continue; - // ucPatientCard uc = new ucPatientCard(dr); - // uc.buttonX1.Text = "器械清点"; - // uc.buttonX2.Visible = true; - // uc.InRoom += Uc_InRoom; - // uc.QxRoom += Uc_QxRoom; - // uc.Clicks += Uc_Clicks; - // if (uc.lblAnesDoctors.Text == "麻醉医生:" || uc.lblAnesDoctors.Text.Trim() == "麻醉医生") - // uc.buttonX2.Enabled = true; - // else - // uc.buttonX2.Enabled = false; - // uc.Location = new Point((uc.Width + 9) * j, (uc.Height + 10) * i + 30); - // panel3.Controls.Add(uc); - // j++; - // } - //} for (int i = 0; i < list.Count; i++) { int j = 0; @@ -230,6 +195,10 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI label23.Text = "术前诊断"; label25.Text = "拟施手术"; } + if (txtRoom.Text != "") + uc.buttonX2.Enabled = true; + else + uc.buttonX2.Enabled = false; buttonX1.Text = uc.buttonX1.Text; panel2.Visible = true; SelUc = uc; @@ -289,7 +258,9 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI return; } } - AIMS.OperationDoing.AnasRecordBill.UI.frmInstrumentRecord frmAnasRecord = new frmInstrumentRecord(); + + if (frmAnasRecord == null) + frmAnasRecord = new frmInstrumentRecord(); frmAnasRecord.PatientId = PatientId; frmAnasRecord.ApplyId = applyId; frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId); @@ -311,13 +282,16 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } else { + if (frmAnasRecord._record != null) + frmAnasRecord.ClearRecordDate(); this.Close(); } } else { - AIMS.OperationDoing.AnasRecordBill.UI.frmInstrumentRecord frmAnasRecord = new frmInstrumentRecord(); + if (frmAnasRecord == null) + frmAnasRecord = new frmInstrumentRecord(); frmAnasRecord.PatientId = PatientId; frmAnasRecord.ApplyId = applyId; frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId); @@ -393,7 +367,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI BOperationRecord.DeleteEvent(PatientId, 8); HelperDB.DbHelperSQL.CommitTrans(); - AIMS.OperationDoing.AnasRecordBill.UI.frmInstrumentRecord frmAnasRecord = new frmInstrumentRecord(); + if (frmAnasRecord == null) + frmAnasRecord = new frmInstrumentRecord(); frmAnasRecord.PatientId = PatientId; frmAnasRecord.ApplyId = applyId; frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(int.Parse(uc.Tag.ToString())); @@ -409,6 +384,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } else { + if (frmAnasRecord._record != null) + frmAnasRecord.ClearRecordDate(); this.Close(); } } @@ -432,6 +409,10 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { PublicMethod.SelectRoom = Convert.ToInt32(cboRoom.SelectedValue); } + else + { + PublicMethod.SelectRoom = -1; + } FillDgv(); } @@ -495,5 +476,28 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { FillDgv(); } + + private void buttonX2_Click(object sender, EventArgs e) + { + string RoomStr = txtRoom.Tag.ToString(); + if (RoomStr != "") + { + frmSeleteRoom seleteRoom = new frmSeleteRoom(); + seleteRoom.NowRoomId = RoomStr; + seleteRoom.ShowDialog(); + RoomStr = seleteRoom.RoomId; + if (RoomStr != null && RoomStr != "") + { + txtRoom.Text = seleteRoom.RoomName; + txtRoom.Tag = int.Parse(RoomStr); + BOperationRecord.Update("RoomId=@RoomId where OperationApplyId=@id ", new AIMSModel.ParameterList("@RoomId", int.Parse(RoomStr), "@id", SelApplyId)); + BOperationApply.UpdateApplyRoom(SelApplyId, int.Parse(RoomStr), DateTime.Parse(txttime.Text)); + BOperationApply.UpdteOperationOrder(DateTime.Parse(txttime.Text), int.Parse(RoomStr)); + FillDgv(); + panel2.Visible = true; + MessageBox.Show("手术间切换成功!"); + } + } + } } } diff --git a/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.resx b/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.resx index 70f8230..1dbb543 100644 --- a/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.resx +++ b/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.resx @@ -165,7 +165,7 @@ RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK - j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAAAXJJREFUSEu1lk1KxTAU + j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAAAXJJREFUSEu1lk1KxTAU hTMSF6Ag6ExBHLkHceISXIP0J0n7+n7U5bgHFyCIougSnPgDOnD2wEE8t6+tSW5FafIG3+T2cA9Jzm0i jDGMNJNzm6SYCZepSDQxsTlOc/Xa148VCDQ2Nkl5JhxglKqRSHMNJOk30ix/JK3fi2AFwjYgFs1PfzFR W9DcNtp5Xz9WINrmLV1z30TqdZjcW9pQE7aSVazkztNGNpHlpa8DkbZrdE5JmuHAHU1DgEkd0TG2qBKJ @@ -222,7 +222,7 @@ RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK - j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDQAACw0B7QfALAAAAaJJREFUSEu1lkFKw0AY + j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAAAaJJREFUSEu1lkFKw0AY hWclHkBB0J2CuPIO4sYjeAbJZGaSttqqx/EOHkCQiqJHcKMWdOFOcDG+lzRN8/+ldpEsPgovr+9lkn+G mBijwrrwkWQXp8DUDE2Sk1EDm/qfeRblKYHAHG3qXvC7ZZ1HaWZs6JfBvasGpbdGZhElEJh5V/zTA1a1 s7jksrWSiJIn67PNLlcyLcoeUbLe3UoqfO+2+xLnI6ZslPSv54raLkkd3893EgYnNgww0ufFaEufzCJK diff --git a/AIMS/OperationFront/frmOperationApplyDetail.cs b/AIMS/OperationFront/frmOperationApplyDetail.cs index 61744d9..8104e37 100644 --- a/AIMS/OperationFront/frmOperationApplyDetail.cs +++ b/AIMS/OperationFront/frmOperationApplyDetail.cs @@ -751,7 +751,7 @@ namespace AIMS.OperationFront.UI private void tsbCancel_Click(object sender, EventArgs e) { - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.ClearControl(panel1); SelectDiseaseData.Clear(); SelectOperationData.Clear(); diff --git a/AIMS/OperationFront/frmOperationFrontVisit.cs b/AIMS/OperationFront/frmOperationFrontVisit.cs index fb09fd8..fc17a03 100644 --- a/AIMS/OperationFront/frmOperationFrontVisit.cs +++ b/AIMS/OperationFront/frmOperationFrontVisit.cs @@ -165,8 +165,7 @@ namespace AIMS.OperationFront.UI //frmOperationFrontVisitDetail.ShowDialog(); AIMS.DocManager.frmDocumentSingle frmDocumentSingle = new DocManager.frmDocumentSingle(); frmDocumentSingle.ApplyId = int.Parse(dgv2.CurrentRow.Cells["ApplyIdColumn2"].Value.ToString()); - frmDocumentSingle.PatientId = int.Parse(dgv2.CurrentRow.Cells["PatientIdColumn2"].Value.ToString()); - frmDocumentSingle.TempName = new XmlUse(Application.StartupPath + "\\AIMS.xml").GetNode("PreOperativeVisit")[0].ToString(); + frmDocumentSingle.PatientId = int.Parse(dgv2.CurrentRow.Cells["PatientIdColumn2"].Value.ToString()); frmDocumentSingle.WindowState = FormWindowState.Maximized; frmDocumentSingle.ShowDialog(); btnFind2_Click(null, null); diff --git a/AIMS/OperationFront/frmPrintingArrangemen.cs b/AIMS/OperationFront/frmPrintingArrangemen.cs index f9ebea2..0507188 100644 --- a/AIMS/OperationFront/frmPrintingArrangemen.cs +++ b/AIMS/OperationFront/frmPrintingArrangemen.cs @@ -2,6 +2,7 @@ using AIMS.PublicUI; using AIMSBLL; using AIMSModel; +using DataDictionary; using System; using System.Collections.Generic; using System.ComponentModel; diff --git a/AIMS/OremrUserControl/ControlExtension.cs b/AIMS/OremrUserControl/ControlExtension.cs index 892f2a9..2501ee4 100644 --- a/AIMS/OremrUserControl/ControlExtension.cs +++ b/AIMS/OremrUserControl/ControlExtension.cs @@ -8,7 +8,7 @@ using System.Reflection; using System.Text; using System.Windows.Forms; -namespace AIMS.PublicUI +namespace AIMS { public static class ControlExtension { @@ -152,5 +152,138 @@ namespace AIMS.PublicUI return false; } + + public static bool ValidDataGridViewExistsItemName(System.Windows.Forms.DataGridView dgv, string ColumeName, string name) + { + bool result = false; + foreach (System.Windows.Forms.DataGridViewRow dataGridViewRow in ((System.Collections.IEnumerable)dgv.Rows)) + { + if (dataGridViewRow.Cells[ColumeName].Value.ToString().Equals(name)) + { + result = true; + break; + } + } + return result; + } + + public static void SetDgvAttribute(System.Windows.Forms.DataGridView dgv) + { + dgv.AllowUserToResizeColumns = false; + dgv.AllowUserToResizeRows = false; + dgv.AllowUserToAddRows = false; + dgv.AllowUserToDeleteRows = false; + dgv.ReadOnly = true; + dgv.BackgroundColor = System.Drawing.Color.Snow; + + } + public static void EnabledControl(System.Windows.Forms.Control ctCtrl, bool IsEnabled) + { + foreach (System.Windows.Forms.Control control in ctCtrl.Controls) + { + if (control.Controls.Count > 0) + { + if (control.Enabled) + { + EnabledControl(control, IsEnabled); + } + } + else if (control is System.Windows.Forms.TextBox) + { + (control as System.Windows.Forms.TextBox).Enabled = IsEnabled; + } + else if (control is System.Windows.Forms.ComboBox) + { + (control as System.Windows.Forms.ComboBox).Enabled = IsEnabled; + } + else if (control is System.Windows.Forms.RichTextBox) + { + (control as System.Windows.Forms.RichTextBox).Enabled = IsEnabled; + } + else if (control is System.Windows.Forms.DateTimePicker) + { + (control as System.Windows.Forms.DateTimePicker).Enabled = IsEnabled; + } + else if (control is System.Windows.Forms.ListBox) + { + (control as System.Windows.Forms.ListBox).Enabled = IsEnabled; + } + else if (control is System.Windows.Forms.RadioButton) + { + (control as System.Windows.Forms.RadioButton).Enabled = IsEnabled; + } + else if (control is System.Windows.Forms.CheckBox) + { + (control as System.Windows.Forms.CheckBox).Enabled = IsEnabled; + } + else if (control is DevComponents.Editors.IntegerInput) + { + (control as DevComponents.Editors.IntegerInput).Enabled = IsEnabled; + } + else if (control is DevComponents.Editors.DateTimeAdv.DateTimeInput) + { + (control as DevComponents.Editors.DateTimeAdv.DateTimeInput).Enabled = IsEnabled; + } + + + } + } + + public static void ClearControl(System.Windows.Forms.Control ctCtrl) + { + foreach (System.Windows.Forms.Control control in ctCtrl.Controls) + { + if (control.Controls.Count > 0) + { + if (control.Enabled) + { + ClearControl(control); + } + } + else if (control is System.Windows.Forms.TextBox) + { + if (!((control as System.Windows.Forms.TextBox).Name == "txtAnaesAutograph") && !((control as System.Windows.Forms.TextBox).Name == "txtOperAutograph") && !((control as System.Windows.Forms.TextBox).Name == "txtNurseAutograph")) + { + (control as System.Windows.Forms.TextBox).Text = ""; + } + } + //else if (control is System.Windows.Forms.ComboBox) + //{ + // (control as System.Windows.Forms.ComboBox).SelectedIndex = -1; + //} + else if (control is System.Windows.Forms.RichTextBox) + { + (control as System.Windows.Forms.RichTextBox).Text = ""; + } + else if (control is System.Windows.Forms.DateTimePicker) + { + (control as System.Windows.Forms.DateTimePicker).Text = HelperDB.DbHelperSQL.SystemDate().ToString(); + } + else if (control is System.Windows.Forms.ListBox) + { + (control as System.Windows.Forms.ListBox).Items.Clear(); + } + else if (control is System.Windows.Forms.RadioButton) + { + (control as System.Windows.Forms.RadioButton).Checked = false; + } + else if (control is System.Windows.Forms.CheckBox) + { + (control as System.Windows.Forms.CheckBox).Checked = false; + } + else if (control is DevComponents.Editors.IntegerInput) + { + (control as DevComponents.Editors.IntegerInput).Text = "0"; + } + else if (control is DevComponents.Editors.DateTimeAdv.DateTimeInput) + { + (control as DevComponents.Editors.DateTimeAdv.DateTimeInput).Text = ""; + } + else if (control is System.Windows.Forms.PictureBox) + { + (control as System.Windows.Forms.PictureBox).Image = null; + } + } + } } } diff --git a/AIMS/OremrUserControl/ucDocument.cs b/AIMS/OremrUserControl/ucDocument.cs index d9f09dc..308c8b8 100644 --- a/AIMS/OremrUserControl/ucDocument.cs +++ b/AIMS/OremrUserControl/ucDocument.cs @@ -1,11 +1,8 @@ -using AIMS.DocManager; -using AIMSBLL; -using AIMSExtension; -using AIMSModel; -using DCSoft.Writer; +using DCSoft.Writer; using DCSoft.Writer.Data; using DCSoft.Writer.Dom; using DocumentManagement; +using DrawGraph; using System; using System.Data; using System.Linq; diff --git a/AIMS/OremrUserControl/ucPatientCard.cs b/AIMS/OremrUserControl/ucPatientCard.cs index e304045..152091a 100644 --- a/AIMS/OremrUserControl/ucPatientCard.cs +++ b/AIMS/OremrUserControl/ucPatientCard.cs @@ -1,17 +1,9 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; +using AIMSModel; +using DataDictionary; +using System; using System.Data; -using System.Linq; -using System.Text; +using System.Drawing; using System.Windows.Forms; -using AIMSModel; -using DevComponents.DotNetBar.SuperGrid; -using AIMSExtension; -using AIMSBLL; -using AIMS.PublicUI; -using System.Drawing.Drawing2D; namespace AIMS.OremrUserControl { diff --git a/AIMS/Program.cs b/AIMS/Program.cs index 84c76b2..ee4f6e3 100644 --- a/AIMS/Program.cs +++ b/AIMS/Program.cs @@ -19,7 +19,7 @@ namespace AIMS /// /// 应用程序的主入口点。 /// - [STAThread] + [STAThread] static void Main(string[] args) { if (PublicMethod.FindProcess("AIMSAutoUpdate")) @@ -32,18 +32,17 @@ namespace AIMS //Process instance = RunningInstance(); //if (instance == null) - //{ - UpdateProgram(args); - Task.Factory.StartNew(() => { PreLoad(); }); - Application.Run(new FormLogin()); + //{ + UpdateProgram(args); + Task.Factory.StartNew(() => { PreLoad(); }); + Application.Run(new FormLogin()); //} //else //{ // /*1.2 已经有一个实例在运行*/ // HandleRunningInstance(instance); //} - } - + } static void PreLoad() { string msg = DCSoft.Writer.Controls.WriterControl.CheckSystemEnvironment(false); @@ -81,7 +80,7 @@ namespace AIMS //获取服务器地址 string UpdaterUrl = FtpAddress + "//" + "UpdateList.xml"; //与服务器连接,下载更新配置文件 - FTPTransmission.download(localXmlFile, UpdaterUrl, User, PassWord); + FTPTransmission.download(localXmlFile, UpdaterUrl, User, PassWord); Process sprs = new Process(); sprs.StartInfo.FileName = Application.StartupPath + "\\AIMSAutoUpdate.exe"; sprs.StartInfo.Arguments = SysName; diff --git a/AIMS/Properties/AssemblyInfo.cs b/AIMS/Properties/AssemblyInfo.cs index daba3d2..06c1806 100644 --- a/AIMS/Properties/AssemblyInfo.cs +++ b/AIMS/Properties/AssemblyInfo.cs @@ -33,5 +33,5 @@ using System.Runtime.InteropServices; //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //通过使用 "*",如下所示: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("6.0.0.0")] -[assembly: AssemblyFileVersion("6.0.0.0")] +[assembly: AssemblyVersion("6.0.0.1")] +[assembly: AssemblyFileVersion("6.0.0.1")] diff --git a/AIMS/PublicUI/frmAnaesthesiaMethod.cs b/AIMS/PublicUI/frmAnaesthesiaMethod.cs index 4f5c7de..3c7c723 100644 --- a/AIMS/PublicUI/frmAnaesthesiaMethod.cs +++ b/AIMS/PublicUI/frmAnaesthesiaMethod.cs @@ -1,4 +1,5 @@ using AIMSBLL; +using DataDictionary; using System; using System.Collections.Generic; using System.ComponentModel; @@ -20,7 +21,7 @@ namespace AIMS.PublicUI.UI private void frmAnaesthesiaMethod_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvAnaesthesiaMethod); + ControlExtension.SetDgvAttribute(dgvAnaesthesiaMethod); this.txtHelpCode.Text = "简拼/汉字/ICD码"; dgvAnaesthesiaMethod.DataSource = BAnaesthesiaMethod.GetDataTable("IsValid =1"); dgvAnaesthesiaMethod.Select(); diff --git a/AIMS/PublicUI/frmContagion.cs b/AIMS/PublicUI/frmContagion.cs index cf5adf7..b3d2e12 100644 --- a/AIMS/PublicUI/frmContagion.cs +++ b/AIMS/PublicUI/frmContagion.cs @@ -1,4 +1,5 @@ using AIMSBLL; +using DataDictionary; using System; using System.Collections.Generic; using System.ComponentModel; @@ -20,7 +21,7 @@ namespace AIMS.PublicUI.UI private void frmContagion_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvContagion); + ControlExtension.SetDgvAttribute(dgvContagion); this.txtHelpCode.Text = "简拼/汉字/ICD码"; dgvContagion.DataSource = BBasicDictionary.GetDataDictionaryDataTableByParentName("术前感染筛查", ""); diff --git a/AIMS/PublicUI/frmNotice.cs b/AIMS/PublicUI/frmNotice.cs index dfb6831..c79ef61 100644 --- a/AIMS/PublicUI/frmNotice.cs +++ b/AIMS/PublicUI/frmNotice.cs @@ -1,5 +1,6 @@ using AIMSBLL; using AIMSModel; +using DataDictionary; using System; using System.Collections.Generic; using System.ComponentModel; @@ -20,9 +21,9 @@ namespace AIMS.PublicUI.UI } private void frmNotice_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvOperation); - AIMSExtension.PublicMethod.EnabledControl(groupBox2, false); - AIMSExtension.PublicMethod.ClearControl(groupBox2); + ControlExtension.SetDgvAttribute(dgvOperation); + ControlExtension.EnabledControl(groupBox2, false); + ControlExtension.ClearControl(groupBox2); _state = AIMSExtension.EditState.BROWSE; dgvOperation.DataSource = BNotice.GetOperation(); dgvNoticeTemplate.DataSource = BNotice.GetOperationList(); @@ -30,8 +31,8 @@ namespace AIMS.PublicUI.UI private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - AIMSExtension.PublicMethod.EnabledControl(panel1, true); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, true); + ControlExtension.ClearControl(panel1); } private void tsbSava_Click(object sender, EventArgs e) { @@ -47,8 +48,8 @@ namespace AIMS.PublicUI.UI BNotice.Add(NoticeObj); } _state = AIMSExtension.EditState.BROWSE; - AIMSExtension.PublicMethod.EnabledControl(panel1, false); - AIMSExtension.PublicMethod.ClearControl(panel1); + ControlExtension.EnabledControl(panel1, false); + ControlExtension.ClearControl(panel1); dgvOperation.DataSource = BNotice.GetOperation(); dgvNoticeTemplate.DataSource = BNotice.GetOperationList(); } diff --git a/AIMS/PublicUI/frmOperationBodyPosition.cs b/AIMS/PublicUI/frmOperationBodyPosition.cs index e7f1e55..45b5621 100644 --- a/AIMS/PublicUI/frmOperationBodyPosition.cs +++ b/AIMS/PublicUI/frmOperationBodyPosition.cs @@ -1,4 +1,5 @@ using AIMSBLL; +using DataDictionary; using System; using System.Collections.Generic; using System.ComponentModel; @@ -20,7 +21,7 @@ namespace AIMS.PublicUI.UI private void frmOperationBodyPosition_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvOperationBodyPosition); + ControlExtension.SetDgvAttribute(dgvOperationBodyPosition); this.txtHelpCode.Text = "简拼/汉字/ICD码"; dgvOperationBodyPosition.DataSource = BOperationBodyPosition.GetDataTable("IsValid =1"); dgvOperationBodyPosition.Select(); diff --git a/AIMS/PublicUI/frmOperationCutType.cs b/AIMS/PublicUI/frmOperationCutType.cs index e41a319..baa8a80 100644 --- a/AIMS/PublicUI/frmOperationCutType.cs +++ b/AIMS/PublicUI/frmOperationCutType.cs @@ -1,4 +1,5 @@ using AIMSBLL; +using DataDictionary; using System; using System.Collections.Generic; using System.ComponentModel; @@ -20,7 +21,7 @@ namespace AIMS.PublicUI.UI private void OperationCutType_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvOperationCutType); + ControlExtension.SetDgvAttribute(dgvOperationCutType); this.txtHelpCode.Text = "简拼/汉字/ICD码"; dgvOperationCutType.DataSource = BOperationCutType.GetDataTable("IsValid =1"); dgvOperationCutType.Select(); diff --git a/AIMS/PublicUI/frmOperationPosition.cs b/AIMS/PublicUI/frmOperationPosition.cs index 7718adb..ccf8e53 100644 --- a/AIMS/PublicUI/frmOperationPosition.cs +++ b/AIMS/PublicUI/frmOperationPosition.cs @@ -20,7 +20,7 @@ namespace AIMS.PublicUI.UI private void frmOperationPosition_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvOperationPosition); + ControlExtension.SetDgvAttribute(dgvOperationPosition); this.txtHelpCode.Text = "简拼/汉字/ICD码"; dgvOperationPosition.DataSource = BOperationPosition.GetDataTable("IsValid =1"); dgvOperationPosition.Select(); diff --git a/AIMS/PublicUI/frmSelectDisease.cs b/AIMS/PublicUI/frmSelectDisease.cs index 9afa2a8..ada670a 100644 --- a/AIMS/PublicUI/frmSelectDisease.cs +++ b/AIMS/PublicUI/frmSelectDisease.cs @@ -1,14 +1,10 @@ using AIMSBLL; using AIMSExtension; using AIMSModel; -using DevComponents.DotNetBar.Controls; +using DataDictionary; using System; using System.Collections.Generic; -using System.ComponentModel; using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; namespace AIMS.PublicUI.UI @@ -31,8 +27,8 @@ namespace AIMS.PublicUI.UI { btnAddDisease.Visible = true; } - AIMSExtension.PublicMethod.SetDgvAttribute(dgvDisease); - AIMSExtension.PublicMethod.SetDgvAttribute(dgvSelectDisease); + ControlExtension.SetDgvAttribute(dgvDisease); + ControlExtension.SetDgvAttribute(dgvSelectDisease); SelectLeftdt = BDisease.GetDataTable(""); @@ -119,7 +115,7 @@ namespace AIMS.PublicUI.UI { int num = Convert.ToInt32(this.dgvDisease.CurrentRow.Cells["Id"].Value); - DataTable SelectDataTable = AIMSExtension.PublicMethod.GetDgvToTable(dgvSelectDisease); + DataTable SelectDataTable = GetDgvToTable(dgvSelectDisease); foreach (DataRow row in SelectDataTable.Rows) { @@ -136,7 +132,29 @@ namespace AIMS.PublicUI.UI } } + public static DataTable GetDgvToTable(DataGridView dgv) + { + DataTable dt = new DataTable(); + // 列强制转换 + for (int count = 0; count < dgv.Columns.Count; count++) + { + DataColumn dc = new DataColumn(dgv.Columns[count].Name.ToString()); + dt.Columns.Add(dc); + } + + // 循环行 + for (int count = 0; count < dgv.Rows.Count; count++) + { + DataRow dr = dt.NewRow(); + for (int countsub = 0; countsub < dgv.Columns.Count; countsub++) + { + dr[countsub] = Convert.ToString(dgv.Rows[count].Cells[countsub].Value); + } + dt.Rows.Add(dr); + } + return dt; + } private void btnToRight_Click(object sender, EventArgs e) { dgvDisease_CellDoubleClick(null, null); diff --git a/AIMS/PublicUI/frmSelectOperation.cs b/AIMS/PublicUI/frmSelectOperation.cs index 82e4585..c735073 100644 --- a/AIMS/PublicUI/frmSelectOperation.cs +++ b/AIMS/PublicUI/frmSelectOperation.cs @@ -25,8 +25,8 @@ namespace AIMS.PublicUI.UI { btnAddOperation.Visible = true; } - AIMSExtension.PublicMethod.SetDgvAttribute(dgvOperation); - AIMSExtension.PublicMethod.SetDgvAttribute(dgvSelectOperation); + ControlExtension.SetDgvAttribute(dgvOperation); + ControlExtension.SetDgvAttribute(dgvSelectOperation); SelectLeftdt = BOperation.GetDataTable(""); @@ -129,7 +129,7 @@ namespace AIMS.PublicUI.UI { int num = Convert.ToInt32(this.dgvOperation.CurrentRow.Cells["Id"].Value); - DataTable SelectDataTable = AIMSExtension.PublicMethod.GetDgvToTable(dgvSelectOperation); + DataTable SelectDataTable = GetDgvToTable(dgvSelectOperation); foreach (DataRow row in SelectDataTable.Rows) { @@ -146,7 +146,29 @@ namespace AIMS.PublicUI.UI } } + public static DataTable GetDgvToTable(DataGridView dgv) + { + DataTable dt = new DataTable(); + // 列强制转换 + for (int count = 0; count < dgv.Columns.Count; count++) + { + DataColumn dc = new DataColumn(dgv.Columns[count].Name.ToString()); + dt.Columns.Add(dc); + } + + // 循环行 + for (int count = 0; count < dgv.Rows.Count; count++) + { + DataRow dr = dt.NewRow(); + for (int countsub = 0; countsub < dgv.Columns.Count; countsub++) + { + dr[countsub] = Convert.ToString(dgv.Rows[count].Cells[countsub].Value); + } + dt.Rows.Add(dr); + } + return dt; + } private void labUp_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (this.total != 0 && this.currentPage != 0) diff --git a/AIMS/PublicUI/frmSelectOperationOne.cs b/AIMS/PublicUI/frmSelectOperationOne.cs index 26cc995..d576156 100644 --- a/AIMS/PublicUI/frmSelectOperationOne.cs +++ b/AIMS/PublicUI/frmSelectOperationOne.cs @@ -29,8 +29,8 @@ namespace AIMS.PublicUI.UI { btnAddOperation.Visible = true; } - AIMSExtension.PublicMethod.SetDgvAttribute(dgvOperation); - //AIMSExtension.PublicMethod.SetDgvAttribute(dgvSelectOperation); + ControlExtension.SetDgvAttribute(dgvOperation); + //ControlExtension.SetDgvAttribute(dgvSelectOperation); SelectLeftdt = BOperation.GetDataTable(""); diff --git a/AIMS/PublicUI/frmSelectPerson.cs b/AIMS/PublicUI/frmSelectPerson.cs index b522d16..f35d28f 100644 --- a/AIMS/PublicUI/frmSelectPerson.cs +++ b/AIMS/PublicUI/frmSelectPerson.cs @@ -24,7 +24,7 @@ namespace AIMS.PublicUI.UI private void frmSelectPerson_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvSelectPerson); + ControlExtension.SetDgvAttribute(dgvSelectPerson); listOnit = BDepartment.GetDepartmentAllListBYSql(""); diff --git a/AIMSEntity/Extensions/BOperationReview.cs b/AIMSEntity/Extensions/BOperationReview.cs index 6db6e4b..25cadf6 100644 --- a/AIMSEntity/Extensions/BOperationReview.cs +++ b/AIMSEntity/Extensions/BOperationReview.cs @@ -7,6 +7,7 @@ using System.Xml; using AIMSModel; using HelperDB; using DrawGraph; +using AIMSExtension; namespace AIMSBLL { @@ -121,5 +122,52 @@ namespace AIMSBLL } return Value; } + public static void SetDocumentXmlStatic(string tempName) + { + StringBuilder sb = new StringBuilder(); + sb.Append("select "); + sb.Append(" pd.Id,"); + sb.Append(" pd.XmlFileName,"); + sb.Append(" pd.XmlFile,"); + sb.Append(" pd.XmlStatic,"); + sb.Append(" pd.IsValid,"); + sb.Append(" pd.OperatorNo,"); + sb.Append(" pd.OperatorDate"); + sb.Append(" from PrintDocument pd"); + sb.Append(" where pd.XmlFileName = '" + tempName + "'"); + DataTable dt = DbHelperSQL.GetDataTable(sb.ToString()); + for (int i = 0; i < dt.Rows.Count; i++) + { + string XmlStatic = dt.Rows[i]["XmlStatic"].ToString(); + XmlDocument doc = new XmlDocument(); + if (XmlStatic != null && XmlStatic.Length > 0) + { + doc.LoadXml(XmlStatic); + } + XmlElement root = doc.DocumentElement; + if (root != null) + { + root.ChildNodes[root.ChildNodes.Count - 7].Attributes["Name"].InnerText = "总计"; + UpdateTemplate(dt.Rows[i]["Id"].ToString(), doc.InnerXml.ToString()); + } + } + + } + + public static void UpdateTemplate(string Id, string XmlStatic) + { + try + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("update [PrintDocument] set"); + strSql.Append(" XmlStatic='" + XmlStatic + "' "); + strSql.Append(" where Id=" + Id + " "); + DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + catch (Exception ex) + { + PublicMethod.WriteLog(ex); + } + } } } diff --git a/AIMSEntity/Extensions/Connection.cs b/AIMSEntity/Extensions/Connection.cs index 015e7f6..cc3d15a 100644 --- a/AIMSEntity/Extensions/Connection.cs +++ b/AIMSEntity/Extensions/Connection.cs @@ -18,7 +18,7 @@ namespace AIMSDAL { if (connectionString == null) { - connectionString = new XmlUse(Application.StartupPath + "\\AIMS.xml").GetNode("ConnectionString")[0].ToString(); + connectionString = "Data Source=tx.wulvshi.cn;Initial Catalog=AIMSDB_QHDSGRYY;User ID=sa;Password=Test2020;";// new XmlUse(Application.StartupPath + "\\AIMS.xml").GetNode("ConnectionString")[0].ToString(); } return connectionString; } diff --git a/AIMSExtension/AIMSExtension.csproj b/AIMSExtension/AIMSExtension.csproj index 6c6b89d..8a1ed69 100644 --- a/AIMSExtension/AIMSExtension.csproj +++ b/AIMSExtension/AIMSExtension.csproj @@ -31,15 +31,6 @@ 4 - - False - ..\AIMS\Extensions\DevComponents.DotNetBar2.dll - - - False - False - ..\AIMS\Extensions\Microsoft.Office.Interop.Excel.dll - ..\AIMS\Extensions\Oracle.ManagedDataAccess.dll @@ -55,77 +46,15 @@ - - - - - - Form - - - frmMessageBox.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -146,13 +75,9 @@ - - - frmMessageBox.cs - ResXFileCodeGenerator Resources.Designer.cs diff --git a/AIMSExtension/AttributeHelper.cs b/AIMSExtension/AttributeHelper.cs deleted file mode 100644 index dba16d0..0000000 --- a/AIMSExtension/AttributeHelper.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Data; -using System.Reflection; - -namespace AIMSExtension -{ - public class AttributeHelper - { - public static string GetTableName(Type type) - { - var tableName = type.Name; - - if (type.IsDefined(typeof(TableAttribute),false)) - { - var attr = (TableAttribute)type.GetCustomAttributes(typeof(TableAttribute), false)[0]; - tableName = attr.TableName; - } - return tableName; - } - - - public static MyPropInfo GetPropertyExtend(PropertyInfo property) - { - var myFieldInfo = new MyPropInfo();//记录字段的所有特性信息 - myFieldInfo.PropertyName = property.Name; - var dataField = (DataFieldAttribute)Attribute.GetCustomAttribute(property, typeof(DataFieldAttribute)); - - var fieldName = property.Name; - if (dataField != null) - { - myFieldInfo.IsKey = dataField.IsKey; - myFieldInfo.IsAutoGrow = dataField.IsAutoGrow; - myFieldInfo.FieldDisplayName = !string.IsNullOrEmpty(dataField.Descript)? dataField.Descript:fieldName; - if (!string.IsNullOrEmpty(dataField.FieldName)) fieldName = dataField.FieldName; - } - - myFieldInfo.DataFieldName = fieldName; - myFieldInfo.SqlDbType = TypeHelper.ConvertTypeToSqlDbType(property.PropertyType); - myFieldInfo.PropInfo = property; - - return myFieldInfo; - } - - } - - public class MyPropInfo - { - /// - /// 实体属性名称 - /// - public string PropertyName { get; set; } - - /// - /// 数据库对应字段名 - /// - public string DataFieldName { get; set; } - - public string DataValue { get; set; } - public string FieldDisplayName { get; set; } - public bool IsAutoGrow { get; set; } - - public bool IsKey { get; set; } - - public SqlDbType SqlDbType { get; set; } - - public PropertyInfo PropInfo { get; set; } - } -} diff --git a/AIMSExtension/BrowserHelper.cs b/AIMSExtension/BrowserHelper.cs index c9f3d39..a743193 100644 --- a/AIMSExtension/BrowserHelper.cs +++ b/AIMSExtension/BrowserHelper.cs @@ -2,7 +2,6 @@ using System; using System.Diagnostics; using System.IO; -using System.Windows.Forms; namespace AIMSExtension { @@ -113,7 +112,7 @@ namespace AIMSExtension } catch (Exception ex) { - MessageBox.Show(ex.Message); + PublicMethod.WriteLog(ex); // IE浏览器路径安装:C:\Program Files\Internet Explorer // at System.Diagnostics.process.StartWithshellExecuteEx(ProcessStartInfo startInfo)注意这个错误 try @@ -141,20 +140,12 @@ namespace AIMSExtension CreateNoWindow = true }; Process.Start(processStartInfo); - } - else - { - if (MessageBox.Show("系统未安装IE浏览器,是否下载安装?", null, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes) - { - // 打开下载链接,从微软官网下载 - OpenDefaultBrowserUrl("http://windows.microsoft.com/zh-cn/internet-explorer/download-ie"); - } - } + } } } catch (Exception exception) { - MessageBox.Show(exception.Message); + PublicMethod.WriteLog(exception ); } } } diff --git a/AIMSExtension/DATADBHelper.cs b/AIMSExtension/DATADBHelper.cs index fcaca6b..d545f8a 100644 --- a/AIMSExtension/DATADBHelper.cs +++ b/AIMSExtension/DATADBHelper.cs @@ -8,20 +8,8 @@ using System.Windows.Forms; namespace AIMSExtension { public static class DATADBHelper - { - private static string connectionString; - public static string _ConnectionString - { - get - { - connectionString = new XmlUse(Application.StartupPath + "\\AIMS.xml").GetNode("DataConnectionString")[0].ToString(); - return connectionString; - } - set - { - connectionString = value; - } - } + { + public static string _ConnectionString= new XmlUse(Application.StartupPath + "\\AIMS.xml").GetNode("DataConnectionString")[0].ToString(); /// /// 执行sql操作(增、删、改) diff --git a/AIMSExtension/DBHelper.cs b/AIMSExtension/DBHelper.cs index 33e5ead..177aa9e 100644 --- a/AIMSExtension/DBHelper.cs +++ b/AIMSExtension/DBHelper.cs @@ -1,4 +1,5 @@ -using System; +using AIMSExtension; +using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; @@ -11,7 +12,7 @@ namespace HelperDB { public static class DBHelper { - public static readonly string _ConnectionString = new XmlUse(Application.StartupPath + "\\AIMS.xml").GetNode("ConnectionString")[0].ToString(); + public static string _ConnectionString = new XmlUse(Application.StartupPath + "\\AIMS.xml").GetNode("ConnectionString")[0].ToString(); /// /// 执行sql操作(增、删、改) @@ -459,7 +460,7 @@ namespace HelperDB SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection); return reader; } - + #region ToEntity /// /// DataRow 转 实体 diff --git a/AIMSExtension/DataFieldAttribute.cs b/AIMSExtension/DataFieldAttribute.cs deleted file mode 100644 index 0b501c5..0000000 --- a/AIMSExtension/DataFieldAttribute.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AIMSExtension -{ - [AttributeUsage(AttributeTargets.Property,Inherited =true)] - public class DataFieldAttribute:Attribute - { - public DataFieldAttribute() - { - - } - - public DataFieldAttribute(string name) - { - this.FieldName = name; - } - public DataFieldAttribute(string name,string remark) - { - this.FieldName = name; - this.Descript = remark; - } - - /// - /// 是否为主键 - /// - public bool IsKey { get; set; } - /// - /// 是否为自增字段 - /// - public bool IsAutoGrow { get; set; } - /// - /// 字段名称 - /// - public string FieldName { get; set; } - - /// - /// 字段描述 - /// - public string Descript { get; set; } - } -} diff --git a/AIMSExtension/DbConnectInfo.cs b/AIMSExtension/DbConnectInfo.cs deleted file mode 100644 index d49e32c..0000000 --- a/AIMSExtension/DbConnectInfo.cs +++ /dev/null @@ -1,62 +0,0 @@ -using HelperDB; -using System; -using System.Configuration; -using System.Data.SqlClient; -using System.Windows.Forms; - -namespace AIMSExtension -{ - public class DbConnectInfo - { - private SqlConnectionStringBuilder _connStrBuilder = null; - - public SqlConnectionStringBuilder ConnectionStringBuilder - { - get - { - bool flag = this._connStrBuilder == null; - if (flag) - { - this._connStrBuilder = new SqlConnectionStringBuilder(); - ConnectionStringSettingsCollection connectionStrings = ConfigurationManager.ConnectionStrings; - bool flag2 = connectionStrings != null; - if (flag2) - { - string text = new XmlUse(Application.StartupPath + "\\AIMS.xml").GetNode("ConnectionString")[0].ToString(); - bool flag3 = !string.IsNullOrEmpty(text); - if (flag3) - { - this._connStrBuilder.ConnectionString = text; - } - } - } - return this._connStrBuilder; - } - set - { - this._connStrBuilder = value; - } - } - - public DbConnectInfo() - { - } - - public DbConnectInfo(string serverAddr, string dbName, string userId, string password) - { - this._connStrBuilder = new SqlConnectionStringBuilder - { - DataSource = serverAddr, - InitialCatalog = dbName, - UserID = userId, - Password = password, - MultipleActiveResultSets = true - }; - } - - public override string ToString() - { - return this.ConnectionStringBuilder.ConnectionString; - } - } -} diff --git a/AIMSExtension/DbHelperSQL.cs b/AIMSExtension/DbHelperSQL.cs index 57abfd4..5b5b20d 100644 --- a/AIMSExtension/DbHelperSQL.cs +++ b/AIMSExtension/DbHelperSQL.cs @@ -1,14 +1,15 @@ using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; -using System.Windows.Forms; +using System.Data.SqlClient; using System.Data.Common; +using System.Windows.Forms; + namespace HelperDB { public class DbHelperSQL { - private static readonly string _ConnectionString = new XmlUse(Application.StartupPath + "\\AIMS.xml").GetNode("ConnectionString")[0].ToString(); + private static string _ConnectionString = new XmlUse(Application.StartupPath + "\\AIMS.xml").GetNode("ConnectionString")[0].ToString(); private static SqlConnection mConnection; public static SqlConnection Connection { diff --git a/AIMSExtension/DocumentEntityMethod.cs b/AIMSExtension/DocumentEntityMethod.cs deleted file mode 100644 index 63e6236..0000000 --- a/AIMSExtension/DocumentEntityMethod.cs +++ /dev/null @@ -1,334 +0,0 @@ -using HelperDB; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; - -namespace AIMSExtension -{ - public static class DocumentEntityMethod - { - - public static object GetDocumentEntitry(int OperationApplyId, string docName, string objName, object obj) - { - //BindPropertyList(obj, objName); - Assembly assembly = Assembly.Load("KHD_BoardArea"); - Type typeDBHelper = assembly.GetType("KHD_BoardArea.DocumentEntity." + objName); - if (typeDBHelper != null) - { - string TableName = typeDBHelper.Name; - if (typeDBHelper.IsDefined(typeof(TableAttribute), false)) - { - var attr = (TableAttribute)typeDBHelper.GetCustomAttributes(typeof(TableAttribute), false)[0]; - TableName = attr.TableName; - } - List MyPropInfoList = typeDBHelper.GetProperties().Select(a => AttributeHelper.GetPropertyExtend(a)).ToList(); - for (int i = MyPropInfoList.Count - 1; i >= 0; i--) - { - if (MyPropInfoList[i].PropertyName == "OperationApplyId" || MyPropInfoList[i].PropertyName == "OpeRecord" || MyPropInfoList[i].PropertyName == "OpeInfo") - { - MyPropInfoList.Remove(MyPropInfoList[i]); - } - } - var fields = string.Join(",", MyPropInfoList.Select(a => $"[{a.DataFieldName}] as [{a.PropertyName}]")); - - string docWhere = docName == "" ? "" : string.Format(" and [文书名称]='{0}' ", docName); - - var sql = string.Format("select top 10 {1} from [{0}] where OperationApplyId={2} {3} ", TableName, fields == "" ? "*" : fields, OperationApplyId, docWhere); - - obj = DBHelper.Get(sql, obj, OperationApplyId); - - } - - return obj; - } - public static int UpdateDocumentEntitry(string objName, object obj) - { - //BindPropertyList(obj, objName); - Assembly assembly = Assembly.Load("KHD_BoardArea"); - Type typeDBHelper = assembly.GetType("KHD_BoardArea.DocumentEntity." + objName); - if (typeDBHelper != null) - { - int updateid = 0; - string TableName = typeDBHelper.Name; - if (typeDBHelper.IsDefined(typeof(TableAttribute), false)) - { - var attr = (TableAttribute)typeDBHelper.GetCustomAttributes(typeof(TableAttribute), false)[0]; - TableName = attr.TableName; - } - List MyPropInfoList = typeDBHelper.GetProperties().Select(a => AttributeHelper.GetPropertyExtend(a)).ToList(); - for (int i = MyPropInfoList.Count - 1; i >= 0; i--) - { - if (MyPropInfoList[i].PropertyName == "Id" || MyPropInfoList[i].PropertyName == "OperationApplyId" || MyPropInfoList[i].PropertyName == "OpeRecord" || MyPropInfoList[i].PropertyName == "OpeInfo") - { - MyPropInfoList.Remove(MyPropInfoList[i]); - continue; - } - foreach (PropertyInfo p in obj.GetType().GetProperties()) - { - if (p.Name == "Id") - { - updateid = Convert.ToInt32(p.GetValue(obj, null)); - } - if (p.Name == MyPropInfoList[i].DataFieldName) - { - object value = p.GetValue(obj, null); - MyPropInfoList[i].DataValue = value == null ? "" : value.ToString(); - - if (p.Name == "操作时间") - MyPropInfoList[i].DataValue = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - } - } - } - - var fields = string.Join(",", MyPropInfoList.Select(a => $"[{a.DataFieldName}] = '{a.DataValue}'")); - - var sql = string.Format("Update {0} Set {1} where Id={2}", TableName, fields, updateid); - - return DBHelper.ExecNonQuery(sql); - - } - - return 0; - } - - public static int InsertDocumentEntitry(string objName, object obj) - { - //BindPropertyList(obj, objName); - Assembly assembly = Assembly.Load("KHD_BoardArea"); - Type typeDBHelper = assembly.GetType("KHD_BoardArea.DocumentEntity." + objName); - if (typeDBHelper != null) - { - string TableName = typeDBHelper.Name; - if (typeDBHelper.IsDefined(typeof(TableAttribute), false)) - { - var attr = (TableAttribute)typeDBHelper.GetCustomAttributes(typeof(TableAttribute), false)[0]; - TableName = attr.TableName; - } - List MyPropInfoList = typeDBHelper.GetProperties().Select(a => AttributeHelper.GetPropertyExtend(a)).ToList(); - for (int i = MyPropInfoList.Count - 1; i >= 0; i--) - { - if (MyPropInfoList[i].PropertyName == "Id" || MyPropInfoList[i].PropertyName == "OpeRecord" || MyPropInfoList[i].PropertyName == "OpeInfo") - { - MyPropInfoList.Remove(MyPropInfoList[i]); - continue; - } - foreach (PropertyInfo p in obj.GetType().GetProperties()) - { - if (p.Name == MyPropInfoList[i].DataFieldName) - { - object value = p.GetValue(obj, null); - MyPropInfoList[i].DataValue = value == null ? "" : value.ToString(); - if (p.Name == "操作时间") - MyPropInfoList[i].DataValue = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - } - } - } - - var fields = string.Join(",", MyPropInfoList.Select(a => $"[{a.DataFieldName}]")); - - var fields2 = string.Join(",", MyPropInfoList.Select(a => $"'{a.DataValue}'")); - - var sql = string.Format("Insert Into {0}({1}) Values({2});select @@identity ", TableName, fields, fields2); - - int insertId = Convert.ToInt32(DBHelper.ExecuteScalar(sql)); - - foreach (PropertyInfo p in obj.GetType().GetProperties()) - { - if (p.Name == "Id") - { - p.SetValue(obj, Convert.ChangeType(insertId, p.PropertyType), null); - break; - } - } - return insertId; - } - - return 0; - } - - public static string GetDictionaryValuesById(string Ids, string DictionaryName) - { - string DictionaryValues = ""; - //DictionaryValues = BBasicDictionary.GetBasicDictionaryByIds(Ids, DictionaryName); - return DictionaryValues; - } - - - public static void SetOperationRecordValue(object operationRecord, string propertyName, string value) - { - //OperationRecord _operationRecord = operationRecord as OperationRecord; - //if (_operationRecord == null) return; - //int i = 0; - //string[] items = propertyName.Split('.'); - //try - //{ - // if (items.Length < 1) return; - // if (items[1] == "OperationApplyRef") - // { - // //i = BOperationApply.Update(items[2] + "='" + value + "' where Id=" + _operationRecord.OperationApplyId, null); - // } - // else if (items[1] == "PatientRef") - // { - // if (value == "") - // { - // //i = BPatients.Update(items[2] + "= null where Id=" + _operationRecord.PatientId, null); - // } - // else - // { - // //i = BPatients.Update(items[2] + "='" + value + "' where Id=" + _operationRecord.PatientId, null); - // } - // } - // else - // { - // //i = BOperationRecord.Update(items[1] + "='" + value + "' where Id=" + _operationRecord.Id, null); - // } - //} - //catch (Exception ex) - //{ - // PublicMethod.WriteLog(new Exception("回写数据出错:" + propertyName + " 值:" + value + " 错误:" + ex.Message)); - //} - } - - public static void UpdateDataBaseEntitry(Type typeDBHelper) - { - if (typeDBHelper != null) - { - string TableName = typeDBHelper.Name; - if (typeDBHelper.IsDefined(typeof(TableAttribute), false)) - { - var attr = (TableAttribute)typeDBHelper.GetCustomAttributes(typeof(TableAttribute), false)[0]; - TableName = attr.TableName; - } - //判断如果表不存在 插入新表逻辑 - CreateDataBase(TableName); - //如果表存在 判断是否有列变动 - List MyPropInfoList = typeDBHelper.GetProperties().Select(a => AttributeHelper.GetPropertyExtend(a)).ToList(); - - List tableStructures = GetTableStructure(TableName); - for (int i = MyPropInfoList.Count - 1; i >= 0; i--) - { - if (MyPropInfoList[i].PropertyName == "OpeRecord" || MyPropInfoList[i].PropertyName == "OpeInfo" || MyPropInfoList[i].PropertyName.Contains("Ref") || MyPropInfoList[i].PropertyName.Contains("List")) - { - MyPropInfoList.Remove(MyPropInfoList[i]); - continue; - } - foreach (TableStructure p in tableStructures) - { - if (MyPropInfoList[i].PropertyName == p.字段名 || MyPropInfoList[i].PropertyName.ToLower() == p.字段名.ToLower()) - { - MyPropInfoList.Remove(MyPropInfoList[i]); - break; - } - } - } - //列变动是新增还是修改 动态生成脚本执行 - if (MyPropInfoList.Count > 0) - { - try - { - var fields = string.Join(" ", MyPropInfoList.Select(a => $" alter table {TableName} add [{a.DataFieldName}] {(a.SqlDbType == System.Data.SqlDbType.Int ? "int" : "[nvarchar](500)")} NULL ")); - PublicMethod.WriteLog(new Exception(fields)); - DBHelper.ExecNonQuery(fields); - } - catch (Exception ex) - { - PublicMethod.WriteLog(ex); - } - } - - } - } - public static List GetTableStructure(string TableName) - { - List tableStructure = new List(); - //string sql = string.Format(@"SELECT a.name 字段名, b.name 类型, - //h.CHARACTER_MAXIMUM_LENGTH as 长度 - //FROM dbo.syscolumns a - //left join dbo.systypes b on a.xtype=b.xusertype - //inner join dbo.sysobjects d on a.id=d.id and d.xtype='U' and d.name<>'dtproperties' LEFT JOIN information_schema.COLUMNS h ON h.TABLE_NAME = d.name AND h.COLUMN_NAME = a.name - //WHERE d.name='{0}' --如果只查询指定表,加上此条件 - //order by a.id,a.colorder", TableName); - //using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) - //{ - // if (conn.State != ConnectionState.Open) - // conn.Open(); - // SqlCommand cmd = new SqlCommand(sql, conn); - // using (SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection)) - // { - // while (reader.Read()) - // { - // TableStructure temp = new TableStructure(); - // temp.字段名 = DBHelper.GetString(reader["字段名"]); - // temp.类型 = DBHelper.GetString(reader["类型"]); - // temp.长度 = DBHelper.GetString(reader["长度"]); - // tableStructure.Add(temp); - // } - // reader.Close(); - // } - //} - return tableStructure; - } - public static void UpdateDataBaseEntitryLengh(Type typeDBHelper) - { - if (typeDBHelper != null) - { - string TableName = typeDBHelper.Name; - if (typeDBHelper.IsDefined(typeof(TableAttribute), false)) - { - var attr = (TableAttribute)typeDBHelper.GetCustomAttributes(typeof(TableAttribute), false)[0]; - TableName = attr.TableName; - } - //判断如果表不存在 插入新表逻辑 - CreateDataBase(TableName); - //如果表存在 判断是否有列变动 - List MyPropInfoList = typeDBHelper.GetProperties().Select(a => AttributeHelper.GetPropertyExtend(a)).ToList(); - - List tableStructures = GetTableStructure(TableName); - for (int i = MyPropInfoList.Count - 1; i >= 0; i--) - { - if (MyPropInfoList[i].PropertyName == "OpeRecord" || MyPropInfoList[i].PropertyName == "OpeInfo" || MyPropInfoList[i].PropertyName.Contains("Ref") || MyPropInfoList[i].PropertyName.Contains("List")) - { - MyPropInfoList.Remove(MyPropInfoList[i]); - continue; - } - } - //列变动是新增还是修改 动态生成脚本执行 - if (MyPropInfoList.Count > 0) - { - try - { - var fields = string.Join(" ", MyPropInfoList.Select(a => $" alter table {TableName} alter column [{a.DataFieldName}] {(a.SqlDbType == System.Data.SqlDbType.Int ? " int" : " [nvarchar](600)")} ")); - PublicMethod.WriteLog(new Exception(fields)); - DBHelper.ExecNonQuery(fields); - } - catch (Exception ex) - { - PublicMethod.WriteLog(ex); - } - } - - } - } - public static void CreateDataBase(string TableName) - { - int res = 0; - string sql = string.Format(@"IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[{0}]') AND type in (N'U')) - BEGIN - CREATE TABLE [dbo].[{0}]( - [Id] [int] IDENTITY(1,1) NOT NULL, - [OperationApplyId] [int] NULL, - [文书名称] [nvarchar](100) NULL, - [操作人] [nvarchar](100) NULL, - [操作时间] [datetime] NULL, - CONSTRAINT [PK_{0}] PRIMARY KEY CLUSTERED - ( - [ID] ASC - )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] - ) ON [PRIMARY] - - END", TableName); - res = DBHelper.ExecNonQuery(sql); - } - } -} diff --git a/AIMSExtension/FTPTransmission.cs b/AIMSExtension/FTPTransmission.cs index 0552e3b..a053b68 100644 --- a/AIMSExtension/FTPTransmission.cs +++ b/AIMSExtension/FTPTransmission.cs @@ -1,15 +1,10 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Diagnostics; using System.IO; -using System.Linq; using System.Net; -using System.Reflection; using System.Security.Cryptography; using System.Text; -using System.Windows.Forms; -using System.Xml.Linq; namespace AIMSExtension { @@ -94,7 +89,7 @@ namespace AIMSExtension } catch (Exception) { - MessageBox.Show("更新失败! 请检查网络或者FTP用户名与口令!"); + //MessageBox.Show("更新失败! 请检查网络或者FTP用户名与口令!"); Environment.Exit(0); return null; } @@ -167,8 +162,7 @@ namespace AIMSExtension } catch (Exception ex) { - MessageBox.Show("获取目录失败+downftp" + ex.ToString()); - + PublicMethod.WriteLog(ex); Environment.Exit(0); } } @@ -189,7 +183,7 @@ namespace AIMSExtension } catch (Exception ex) { - MessageBox.Show("获取目录失败+downftp" + ex.ToString()); + //MessageBox.Show("获取目录失败+downftp" + ex.ToString()); Environment.Exit(0); } @@ -287,7 +281,7 @@ namespace AIMSExtension catch (Exception e) { - MessageBox.Show(e.Message); + PublicMethod.WriteLog(e); } return fileSize; } @@ -344,100 +338,7 @@ namespace AIMSExtension return ""; } } - - public static void UpdateListXML(string localXmlFile, XElement xe, string vs) - { - try - { - xe.Element("Version").Value = vs.ToString(); - FTPTransmission.downNow(Application.StartupPath); - IEnumerable element = from ex in xe.Elements("Files") - select ex; - ///删除指定的元素,并保存 - if (element.Count() > 0) - { - element.Remove(); - } - XElement record = new XElement("Files"); - foreach (var item in FTPTransmission.nowListFileDirectory) - { - if (item.filename.Contains("AutoUpdate")) continue; - FTPTransmission.ftpFileDirectory f = item; - XElement file = new XElement( - new XElement("File", - new XAttribute("Name", item.filename), - new XAttribute("MD5Hash", item.MD5Hash == null ? "" : item.MD5Hash))); - record.Add(file); - } - xe.Add(record); - xe.Save(localXmlFile); - } - catch (Exception) - { - return; - } - } - /// - /// 初始化判断是否需要升级 或高版本更新升级文件 - /// - public static void UpdateProgram() - { - try - { - string localXmlFile = Application.StartupPath + "\\UpdateList.xml"; - if (!File.Exists(localXmlFile)) - return; - - XElement xe = XElement.Load(localXmlFile); - //获取本地EXE版本号 - Assembly currentAssembly = Assembly.LoadFile(Application.ExecutablePath.Trim()); - AssemblyName CurrentAssemblyName = currentAssembly.GetName(); - string Version = CurrentAssemblyName.Version.ToString(); - Version vs = new Version(Version); - Version newvs = new Version(xe.Element("Version").Value); - if (vs.CompareTo(newvs) > 0) - { - xe.Element("Version").Value = Version; - FTPTransmission.downNow(Application.StartupPath); - IEnumerable element = from ex in xe.Elements("Files") - select ex; - ///删除指定的元素,并保存 - if (element.Count() > 0) - { - element.Remove(); - } - XElement record = new XElement("Files"); - foreach (var item in FTPTransmission.nowListFileDirectory) - { - if (item.filename.Contains("AutoUpdate")) continue; - FTPTransmission.ftpFileDirectory f = item; - XElement file = new XElement( - new XElement("File", - //new XAttribute("Ver", Version), - new XAttribute("Name", item.filename), - new XAttribute("MD5Hash", item.MD5Hash))); - record.Add(file); - } - xe.Add(record); - xe.Save(localXmlFile); - } - else if (vs.CompareTo(newvs) < 0) - { - Process sprs = new Process(); - sprs.StartInfo.FileName = Application.StartupPath + "\\AutoUpdate.EXE"; - sprs.StartInfo.Arguments = xe.Element("SysName").Value; - sprs.Start(); - } - else - { - return; - } - } - catch (Exception) - { - return; - } - } + #region 上传文件 UploadFile /// diff --git a/AIMSExtension/GPDBConn.cs b/AIMSExtension/GPDBConn.cs index 507f7fe..c8154e1 100644 --- a/AIMSExtension/GPDBConn.cs +++ b/AIMSExtension/GPDBConn.cs @@ -1,7 +1,10 @@ +using HelperDB; using System; using System.Collections.Generic; +using System.Configuration; using System.Data; using System.Data.SqlClient; +using System.Windows.Forms; namespace AIMSExtension { @@ -217,47 +220,13 @@ namespace AIMSExtension { bool flag = string.IsNullOrEmpty(GPDBConn._staticConnectionString); if (flag) - { - DbConnectInfo dbConnectInfo = new DbConnectInfo(); - GPDBConn._staticConnectionString = dbConnectInfo.ToString(); + { + GPDBConn._staticConnectionString = new XmlUse(Application.StartupPath + "\\AIMS.xml").GetNode("ConnectionString")[0].ToString(); } } + - //protected override void Finalize() - //{ - // try - // { - // bool flag = this._trans != null; - // if (flag) - // { - // this.RollBack(); - // } - // this._errorInfo = null; - // bool flag2 = this._connection != null; - // if (flag2) - // { - // this._connection = null; - // } - // bool flag3 = this._dataAdapter != null; - // if (flag3) - // { - // this._dataAdapter.Dispose(); - // this._dataAdapter = null; - // } - // bool flag4 = this._command != null; - // if (flag4) - // { - // this._command.Dispose(); - // this._command = null; - // } - // } - // finally - // { - // base.Finalize(); - // } - //} - - public SqlCommand CreateCommand() + public SqlCommand CreateCommand() { SqlCommand sqlCommand = this.Connection.CreateCommand(); sqlCommand.CommandTimeout = this._commandTimeout; diff --git a/AIMSExtension/GoldPrinter/DataGridViewListViewHelper.cs b/AIMSExtension/GoldPrinter/DataGridViewListViewHelper.cs deleted file mode 100644 index 33fbcfa..0000000 --- a/AIMSExtension/GoldPrinter/DataGridViewListViewHelper.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Windows.Forms; - -namespace GoldPrinter -{ - public class DataGridViewListViewHelper - { - public static int[] GetColsWidth(ListView listView) - { - int count = listView.Columns.Count; - int[] array = new int[count]; - for (int i = 0; i < count; i++) - { - array[i] = listView.Columns[i].Width; - } - return array; - } - - public static string[,] ToStringArray(ListView listView, bool includeColumnText) - { - int num = listView.Items.Count; - int count = listView.Columns.Count; - if (includeColumnText) - { - num++; - } - string[,] array = new string[num, count]; - int i = 0; - if (includeColumnText) - { - for (i = 0; i < count; i++) - { - array[0, i] = listView.Columns[i].Text; - } - i = 1; - } - int num2 = 0; - while (i < num) - { - for (int j = 0; j < count; j++) - { - array[i, j] = listView.Items[num2].SubItems[j].Text; - } - i++; - num2++; - } - return array; - } - } -} diff --git a/AIMSExtension/HisDBHelper.cs b/AIMSExtension/HisDBHelper.cs index f366843..3b593c8 100644 --- a/AIMSExtension/HisDBHelper.cs +++ b/AIMSExtension/HisDBHelper.cs @@ -1,19 +1,16 @@ -using System; +using HelperDB; +using Oracle.ManagedDataAccess.Client; +using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; -using System.Linq; -using System.Text; -using System.Configuration; using System.Windows.Forms; -using Oracle.ManagedDataAccess.Client; -using HelperDB; namespace AIMSExtension { public static class HisDBHelper { - private static readonly string _ConnectionString = new XmlUse(Application.StartupPath + "\\AIMS.xml").GetNode("HisConnectionStringOracel")[0].ToString(); + private static string _ConnectionString = new XmlUse(Application.StartupPath + "\\AIMS.xml").GetNode("HisConnectionStringOracel")[0].ToString(); private static OracleConnection mConnection; /// diff --git a/AIMSExtension/PublicMethod.cs b/AIMSExtension/PublicMethod.cs index 8a42a96..a756efb 100644 --- a/AIMSExtension/PublicMethod.cs +++ b/AIMSExtension/PublicMethod.cs @@ -2,24 +2,20 @@ using System; using System.Collections.Generic; using System.Data; -using System.Drawing; using System.IO; -using System.Linq; -using System.Reflection; using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; -using System.Windows.Forms; namespace AIMSExtension { public class PublicMethod - { + { public static int OperatorId = 1; public static string OperatorNo = "admin"; public static string OperatorName = "admin"; - public static string DeptName = ""; + public static string DeptName = ""; public static int DepId = 0; public static int RoleId = 0; public static List RoleName; @@ -29,7 +25,7 @@ namespace AIMSExtension private static char zdSplit = '|'; private static char nameValueSplit = '*'; - + [DllImport("kernel32.dll", SetLastError = true)] public static extern int SetLocalTime(ref SystemTime lpSystemTime); public struct SystemTime @@ -52,7 +48,7 @@ namespace AIMSExtension public static string GetHospitalName() { string strSql = "SELECT HospitalName FROM dbo.HospitalInfo"; - DataTable dt= HelperDB.DbHelperSQL.GetDataTable(strSql); + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); if (dt.Rows.Count > 0) { @@ -78,49 +74,8 @@ namespace AIMSExtension return ""; } } + - /// - /// 验证字符串为数值型 - /// - /// - /// - public static void KeyPressByIsMatch(KeyPressEventArgs e,TextBox tx) - { - if (e.KeyChar == '.' && tx.Text.IndexOf(".") != -1) - { - e.Handled = true; - } - - if (!((e.KeyChar >= 48 && e.KeyChar <= 57) || e.KeyChar == '.' || e.KeyChar == 8)) - { - e.Handled = true; - } - } - - public static bool ValidDataGridViewExistsItemName(System.Windows.Forms.DataGridView dgv, string ColumeName, string name) - { - bool result = false; - foreach (System.Windows.Forms.DataGridViewRow dataGridViewRow in ((System.Collections.IEnumerable)dgv.Rows)) - { - if (dataGridViewRow.Cells[ColumeName].Value.ToString().Equals(name)) - { - result = true; - break; - } - } - return result; - } - - public static void SetDgvAttribute(System.Windows.Forms.DataGridView dgv) - { - dgv.AllowUserToResizeColumns = false; - dgv.AllowUserToResizeRows = false; - dgv.AllowUserToAddRows = false; - dgv.AllowUserToDeleteRows = false; - dgv.ReadOnly = true; - dgv.BackgroundColor = System.Drawing.Color.Snow; - - } public static string GetAge(DateTime Birthday) { DateTime NowTime = HelperDB.DbHelperSQL.SystemDate(); @@ -168,7 +123,7 @@ namespace AIMSExtension public static int GetAgeNum(DateTime Birthday) { DateTime NowTime = HelperDB.DbHelperSQL.SystemDate(); - int strAge=0; + int strAge = 0; int intYear = 0; int intMonth = 0; int intDay = 0; @@ -191,39 +146,16 @@ namespace AIMSExtension if (intYear >= 1) { - strAge = intYear ; + strAge = intYear; } - + if (intDay >= 0 && intYear < 1) { strAge = 1; } return strAge; - } - public static DataTable GetDgvToTable(DataGridView dgv) - { - DataTable dt = new DataTable(); - - // 列强制转换 - for (int count = 0; count < dgv.Columns.Count; count++) - { - DataColumn dc = new DataColumn(dgv.Columns[count].Name.ToString()); - dt.Columns.Add(dc); - } - - // 循环行 - for (int count = 0; count < dgv.Rows.Count; count++) - { - DataRow dr = dt.NewRow(); - for (int countsub = 0; countsub < dgv.Columns.Count; countsub++) - { - dr[countsub] = Convert.ToString(dgv.Rows[count].Cells[countsub].Value); - } - dt.Rows.Add(dr); - } - return dt; - } + } public static string GetVersion() { @@ -232,127 +164,7 @@ namespace AIMSExtension return obj.ToString(); } - public static void EnabledControl(System.Windows.Forms.Control ctCtrl, bool IsEnabled) - { - foreach (System.Windows.Forms.Control control in ctCtrl.Controls) - { - if (control.Controls.Count > 0) - { - if (control.Enabled) - { - PublicMethod.EnabledControl(control, IsEnabled); - } - } - else if (control is System.Windows.Forms.TextBox) - { - (control as System.Windows.Forms.TextBox).Enabled = IsEnabled; - } - else if (control is System.Windows.Forms.ComboBox) - { - (control as System.Windows.Forms.ComboBox).Enabled = IsEnabled; - } - else if (control is System.Windows.Forms.RichTextBox) - { - (control as System.Windows.Forms.RichTextBox).Enabled = IsEnabled; - } - else if (control is System.Windows.Forms.DateTimePicker) - { - (control as System.Windows.Forms.DateTimePicker).Enabled = IsEnabled; - } - else if (control is System.Windows.Forms.ListBox) - { - (control as System.Windows.Forms.ListBox).Enabled = IsEnabled; - } - else if (control is System.Windows.Forms.RadioButton) - { - (control as System.Windows.Forms.RadioButton).Enabled = IsEnabled; - } - else if (control is System.Windows.Forms.CheckBox) - { - (control as System.Windows.Forms.CheckBox).Enabled = IsEnabled; - } - else if (control is DevComponents.Editors.IntegerInput) - { - (control as DevComponents.Editors.IntegerInput).Enabled = IsEnabled; - } - else if (control is DevComponents.Editors.DateTimeAdv.DateTimeInput) - { - (control as DevComponents.Editors.DateTimeAdv.DateTimeInput).Enabled = IsEnabled; - } - - } - } - - public static void ClearControl(System.Windows.Forms.Control ctCtrl) - { - foreach (System.Windows.Forms.Control control in ctCtrl.Controls) - { - if (control.Controls.Count > 0) - { - if (control.Enabled) - { - PublicMethod.ClearControl(control); - } - } - else if (control is System.Windows.Forms.TextBox) - { - if (!((control as System.Windows.Forms.TextBox).Name == "txtAnaesAutograph") && !((control as System.Windows.Forms.TextBox).Name == "txtOperAutograph") && !((control as System.Windows.Forms.TextBox).Name == "txtNurseAutograph")) - { - (control as System.Windows.Forms.TextBox).Text = ""; - } - } - //else if (control is System.Windows.Forms.ComboBox) - //{ - // (control as System.Windows.Forms.ComboBox).SelectedIndex = -1; - //} - else if (control is System.Windows.Forms.RichTextBox) - { - (control as System.Windows.Forms.RichTextBox).Text = ""; - } - else if (control is System.Windows.Forms.DateTimePicker) - { - (control as System.Windows.Forms.DateTimePicker).Text = HelperDB.DbHelperSQL.SystemDate().ToString(); - } - else if (control is System.Windows.Forms.ListBox) - { - (control as System.Windows.Forms.ListBox).Items.Clear(); - } - else if (control is System.Windows.Forms.RadioButton) - { - (control as System.Windows.Forms.RadioButton).Checked = false; - } - else if (control is System.Windows.Forms.CheckBox) - { - (control as System.Windows.Forms.CheckBox).Checked = false; - } - else if (control is DevComponents.Editors.IntegerInput) - { - (control as DevComponents.Editors.IntegerInput).Text = "0"; - } - else if (control is DevComponents.Editors.DateTimeAdv.DateTimeInput) - { - (control as DevComponents.Editors.DateTimeAdv.DateTimeInput).Text = ""; - } - else if (control is System.Windows.Forms.PictureBox) - { - (control as System.Windows.Forms.PictureBox).Image = null; - } - } - } - - public static void ControlsMiddleAutoScroll(Form frm, Panel panel, int LocationY = 70) - { - Panel panelContent = new Panel(); - panelContent.Dock = DockStyle.Fill; - panelContent.AutoScroll = true; - panelContent.Controls.Add(panel); - frm.Controls.Add(panelContent); - if (frm.Parent == null) - panel.Location = new Point(((frm.Width - panel.Width - 20) / 2) < 0 ? 0 : (frm.Width - panel.Width - 20) / 2, LocationY); - else - panel.Location = new Point(((frm.Parent.Width - panel.Width - 20) / 2) < 0 ? 0 : (frm.Parent.Width - panel.Width - 20) / 2, LocationY); - } public static string GetFirstLetter(string hz) { string ls_second_eng = "CJWGNSPGCGNESYPBTYYZDXYKYGTDJNNJQMBSGZSCYJSYYQPGKBZGYCYWJKGKLJSWKPJQHYTWDDZLSGMRYPYWWCCKZNKYDGTTNGJEYKKZYTCJNMCYLQLYPYQFQRPZSLWBTGKJFYXJWZLTBNCXJJJJZXDTTSQZYCDXXHGCKBPHFFSSWYBGMXLPBYLLLHLXSPZMYJHSOJNGHDZQYKLGJHSGQZHXQGKEZZWYSCSCJXYEYXADZPMDSSMZJZQJYZCDJZWQJBDZBXGZNZCPWHKXHQKMWFBPBYDTJZZKQHYLYGXFPTYJYYZPSZLFCHMQSHGMXXSXJJSDCSBBQBEFSJYHWWGZKPYLQBGLDLCCTNMAYDDKSSNGYCSGXLYZAYBNPTSDKDYLHGYMYLCXPYCJNDQJWXQXFYYFJLEJBZRXCCQWQQSBNKYMGPLBMJRQCFLNYMYQMSQTRBCJTHZTQFRXQ" + @@ -582,72 +394,7 @@ namespace AIMSExtension byte[] bDec = decryptor.TransformFinalBlock(bEnc, 0, bEnc.Length); return utf.GetString(bDec); } - - /// - /// DataGridView转Excel - /// - /// - public static void DataToExcel(DataGridView m_DataView) - { - SaveFileDialog kk = new SaveFileDialog(); - kk.Title = "保存EXECL文件"; - kk.Filter = "EXECL文件(*.xls) |*.xls |所有文件(*.*) |*.*"; - kk.FilterIndex = 1; - if (kk.ShowDialog() == DialogResult.OK) - { - string FileName = kk.FileName + ".xls"; - if (File.Exists(FileName)) - File.Delete(FileName); - FileStream objFileStream; - StreamWriter objStreamWriter; - string strLine = ""; - objFileStream = new FileStream(FileName, FileMode.OpenOrCreate, FileAccess.Write); - objStreamWriter = new StreamWriter(objFileStream, System.Text.Encoding.Unicode); - for (int i = 0; i < m_DataView.Columns.Count; i++) - { - if (m_DataView.Columns[i].Visible == true) - { - strLine = strLine + m_DataView.Columns[i].HeaderText.ToString() + Convert.ToChar(9); - } - } - objStreamWriter.WriteLine(strLine); - strLine = ""; - - for (int i = 0; i < m_DataView.Rows.Count; i++) - { - if (m_DataView.Columns[0].Visible == true) - { - if (m_DataView.Rows[i].Cells[0].Value == null) - strLine = strLine + " " + Convert.ToChar(9); - else - strLine = strLine + m_DataView.Rows[i].Cells[0].Value.ToString() + Convert.ToChar(9); - } - for (int j = 1; j < m_DataView.Columns.Count; j++) - { - if (m_DataView.Columns[j].Visible == true) - { - if (m_DataView.Rows[i].Cells[j].Value == null) - strLine = strLine + " " + Convert.ToChar(9); - else - { - string rowstr = ""; - rowstr = m_DataView.Rows[i].Cells[j].Value.ToString(); - if (rowstr.IndexOf("\r\n") > 0) - rowstr = rowstr.Replace("\r\n", " "); - if (rowstr.IndexOf("\t") > 0) - rowstr = rowstr.Replace("\t", " "); - strLine = strLine + rowstr + Convert.ToChar(9); - } - } - } - objStreamWriter.WriteLine(strLine); - strLine = ""; - } - objStreamWriter.Close(); - objFileStream.Close(); - MessageBox.Show("保存EXCEL成功"); - } - } + /// /// 修改本地时间 @@ -665,6 +412,12 @@ namespace AIMSExtension SetLocalTime(ref NewTime); } + public static DataTable GetPlanNoticeNew1(DateTime dtBegin, DateTime dtEnd, string OpeTime) + { + string strSql = "select * from (select ApplyId ,OperationRoom,ApplyDepName,SickBed,PatientName,'等待手术' [State],SQState,SZState,InRoomTime,OutRoomTime,OperationBeginTime,OperationEndTime,Pulse from [dbo].[V_OperationRecordALL] where sqstate <6 and ((OrderOperationTime >='" + dtBegin.ToString("yyyy-MM-dd 00:00:00") + "' and OrderOperationTime<='" + dtEnd.ToString("yyyy-MM-dd 23:59:59") + "')) union select ApplyId ,OperationRoom,ApplyDepName,SickBed,PatientName,'手术中'[State],SQState,SZState,InRoomTime,OutRoomTime,OperationBeginTime,OperationEndTime,Pulse from [V_OperationRecordALL] where SZstate in(1) and ((InRoomTime >='" + dtBegin.ToString("yyyy-MM-dd 00:00:00") + "' and InRoomTime<='" + dtEnd.ToString("yyyy-MM-dd 23:59:59") + "')) and OutRoomTime is null union select ApplyId ,OperationRoom,ApplyDepName,SickBed,PatientName,'手术结束'[State],SQState,SZState,InRoomTime,OutRoomTime,OperationBeginTime,OperationEndTime,Pulse from [V_OperationRecordALL] where datediff(minute,CONVERT(DATETIME,outRoomTime,120),GETDATE())<" + OpeTime + ") as a order by a.ApplyDepName collate Chinese_PRC_CS_AS_KS_WS,a.SQState desc,a.SZState desc"; + return DBHelper.GetDataTable(strSql); + } + public static DataTable GetNewDataTable(DataTable dt, string condition, string sortstr) { DataTable newdt = new DataTable(); @@ -677,76 +430,66 @@ namespace AIMSExtension return newdt;//返回的查询结果 } - public static string GetControlString(Control cls) - { - string zqSpecial = ""; - if (cls.Controls.Count <= 0) return ""; - foreach (Control clTemp in cls.Controls) - { - if (clTemp.Controls.Count > 0) - { - zqSpecial += GetControlString(clTemp); - } - else if (clTemp is DateTimePicker) - { - if (((DateTimePicker)clTemp).Value.ToString() != "") - { - zqSpecial += ((DateTimePicker)clTemp).Name + nameValueSplit; - zqSpecial += ((DateTimePicker)clTemp).Value.ToString() + zdSplit; - } - } - else if (clTemp is TextBox) - { - { - zqSpecial += ((TextBox)clTemp).Name + nameValueSplit; - zqSpecial += ((TextBox)clTemp).Text.ToString() + zdSplit; - } - } - else if (clTemp is RichTextBox) - { - if (((RichTextBox)clTemp).Text.ToString() != "") - { - zqSpecial += ((RichTextBox)clTemp).Name + nameValueSplit; - zqSpecial += ((RichTextBox)clTemp).Text.ToString() + zdSplit; - } - } - else if (clTemp is CheckBox) - { - zqSpecial += ((CheckBox)clTemp).Name + nameValueSplit; - zqSpecial += ((CheckBox)clTemp).Checked.ToString() + zdSplit; - } - else if (clTemp is RadioButton) - { - zqSpecial += ((RadioButton)clTemp).Name + nameValueSplit; - zqSpecial += ((RadioButton)clTemp).Checked.ToString() + zdSplit; - } - else if (clTemp is ComboBox) - { - zqSpecial += ((ComboBox)clTemp).Name + nameValueSplit; - zqSpecial += ((ComboBox)clTemp).Text + zdSplit; - } - else if (clTemp is DevComponents.DotNetBar.Controls.TextBoxX) - { + //public static string GetControlString(Control cls) + //{ + // string zqSpecial = ""; + // if (cls.Controls.Count <= 0) return ""; + // foreach (Control clTemp in cls.Controls) + // { + // if (clTemp.Controls.Count > 0) + // { + // zqSpecial += GetControlString(clTemp); + // } + // else if (clTemp is DateTimePicker) + // { + // if (((DateTimePicker)clTemp).Value.ToString() != "") + // { + // zqSpecial += ((DateTimePicker)clTemp).Name + nameValueSplit; + // zqSpecial += ((DateTimePicker)clTemp).Value.ToString() + zdSplit; + // } + // } + // else if (clTemp is TextBox) + // { + // { + // zqSpecial += ((TextBox)clTemp).Name + nameValueSplit; + // zqSpecial += ((TextBox)clTemp).Text.ToString() + zdSplit; + // } + // } + // else if (clTemp is RichTextBox) + // { + // if (((RichTextBox)clTemp).Text.ToString() != "") + // { + // zqSpecial += ((RichTextBox)clTemp).Name + nameValueSplit; + // zqSpecial += ((RichTextBox)clTemp).Text.ToString() + zdSplit; + // } + // } + // else if (clTemp is CheckBox) + // { + // zqSpecial += ((CheckBox)clTemp).Name + nameValueSplit; + // zqSpecial += ((CheckBox)clTemp).Checked.ToString() + zdSplit; + // } + // else if (clTemp is RadioButton) + // { + // zqSpecial += ((RadioButton)clTemp).Name + nameValueSplit; + // zqSpecial += ((RadioButton)clTemp).Checked.ToString() + zdSplit; + // } + // else if (clTemp is ComboBox) + // { + // zqSpecial += ((ComboBox)clTemp).Name + nameValueSplit; + // zqSpecial += ((ComboBox)clTemp).Text + zdSplit; + // } + // else if (clTemp is DevComponents.DotNetBar.Controls.TextBoxX) + // { - zqSpecial += ((DevComponents.DotNetBar.Controls.TextBoxX)clTemp).Name + nameValueSplit; - zqSpecial += ((DevComponents.DotNetBar.Controls.TextBoxX)clTemp).Text + zdSplit; - } - } + // zqSpecial += ((DevComponents.DotNetBar.Controls.TextBoxX)clTemp).Name + nameValueSplit; + // zqSpecial += ((DevComponents.DotNetBar.Controls.TextBoxX)clTemp).Text + zdSplit; + // } + // } - return zqSpecial; - } + // return zqSpecial; + //} - /// - /// 创建KeyIV - /// - /// - public static string[] GenerateKeyIV() - { - DESCryptoServiceProvider desCrypto = (DESCryptoServiceProvider)DESCryptoServiceProvider.Create(); - return new string[]{ASCIIEncoding.ASCII.GetString(desCrypto.Key),ASCIIEncoding.ASCII.GetString(desCrypto.IV)}; - } - /// /// 将异常打印到LOG文件 /// @@ -767,7 +510,7 @@ namespace AIMSExtension DateTime.Now.Year + '-' + DateTime.Now.Month + '-' + DateTime.Now.Day + "_Log.log"; - } + } //把异常信息输出到文件 StreamWriter sw = new StreamWriter(LogAddress, true); sw.WriteLine("当前时间:" + DateTime.Now.ToString()); @@ -778,8 +521,8 @@ namespace AIMSExtension sw.WriteLine(); sw.Close(); } - catch (Exception ) - { + catch (Exception) + { } } diff --git a/AIMSExtension/TypeHelper.cs b/AIMSExtension/TypeHelper.cs deleted file mode 100644 index fe7e4f1..0000000 --- a/AIMSExtension/TypeHelper.cs +++ /dev/null @@ -1,132 +0,0 @@ -using System; -using System.ComponentModel; -using System.Data; - -namespace AIMSExtension -{ - public class TypeHelper - { - - public static Type ConvertTypeToBaseType(Type t) - { - - //判断convertsionType类型是否为泛型,因为nullable是泛型类, - //判断convertsionType是否为nullable泛型类 - if (t.IsGenericType &&( t.GetGenericTypeDefinition().Equals(typeof(Nullable<>))|| t.GetGenericTypeDefinition().Equals(typeof(DBNull)))) - { - //如果convertsionType为nullable类,声明一个NullableConverter类,该类提供从Nullable类到基础基元类型的转换 - NullableConverter nullableConverter = new NullableConverter(t); - //将convertsionType转换为nullable对的基础基元类型 - t = nullableConverter.UnderlyingType; - } - return t; - } - - public static object GetDefalutValue(Type t) - { - if (t.IsGenericType && t.GetGenericTypeDefinition().Equals(typeof(Nullable<>))) - { - return null; - } - var code = Type.GetTypeCode(t); - - switch (code) - { - case TypeCode.Boolean: - return default(bool); - case TypeCode.Byte: - return default(byte); - case TypeCode.DateTime: - return default(DateTime); - case TypeCode.Decimal: - return default(decimal); - case TypeCode.Double: - return default(double); - case TypeCode.Int16: - return default(Int16); - case TypeCode.Int32: - return default(Int32); - case TypeCode.Int64: - return default(Int64); - case TypeCode.SByte: - return default(SByte); - case TypeCode.Single: - return default(Single); - case TypeCode.String: - return default(String); - case TypeCode.UInt16: - return default(UInt16); - case TypeCode.UInt32: - return default(UInt32); - case TypeCode.UInt64: - return default(UInt64); - case TypeCode.Object: - return null; - default: - return null; - } - - } - - public static SqlDbType ConvertTypeToSqlDbType(Type t) - { - - //判断convertsionType类型是否为泛型,因为nullable是泛型类, - //判断convertsionType是否为nullable泛型类 - if (t.IsGenericType && t.GetGenericTypeDefinition().Equals(typeof(Nullable<>))) - { - //如果convertsionType为nullable类,声明一个NullableConverter类,该类提供从Nullable类到基础基元类型的转换 - NullableConverter nullableConverter = new NullableConverter(t); - //将convertsionType转换为nullable对的基础基元类型 - t = nullableConverter.UnderlyingType; - } - var code = Type.GetTypeCode(t); - - - switch (code) - { - case TypeCode.Boolean: - return SqlDbType.Bit; - case TypeCode.Byte: - return SqlDbType.TinyInt; - case TypeCode.DateTime: - return SqlDbType.DateTime; - case TypeCode.Decimal: - return SqlDbType.Decimal; - case TypeCode.Double: - return SqlDbType.Float; - case TypeCode.Int16: - return SqlDbType.SmallInt; - case TypeCode.Int32: - return SqlDbType.Int; - case TypeCode.Int64: - return SqlDbType.BigInt; - case TypeCode.SByte: - return SqlDbType.TinyInt; - case TypeCode.Single: - return SqlDbType.Real; - case TypeCode.String: - return SqlDbType.NVarChar; - case TypeCode.UInt16: - return SqlDbType.SmallInt; - case TypeCode.UInt32: - return SqlDbType.Int; - case TypeCode.UInt64: - return SqlDbType.BigInt; - case TypeCode.Object: - return SqlDbType.Variant; - default: - if (t == typeof(byte[])) - { - return SqlDbType.Binary; - } - return SqlDbType.Variant; - - } - } - - - - - } -} diff --git a/DocumentManagement/DocumentManagement.csproj b/DocumentManagement/DocumentManagement.csproj index fdb9b8d..449ccb1 100644 --- a/DocumentManagement/DocumentManagement.csproj +++ b/DocumentManagement/DocumentManagement.csproj @@ -42,6 +42,11 @@ False ..\AIMS\DLL\DevComponents.DotNetBar2.dll + + False + False + ..\AIMS\Extensions\Microsoft.Office.Interop.Excel.dll + @@ -66,6 +71,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True diff --git a/AIMSExtension/GoldPrinter.ExcelConstants/BordersEdge.cs b/DocumentManagement/GoldPrinter.ExcelConstants/BordersEdge.cs similarity index 100% rename from AIMSExtension/GoldPrinter.ExcelConstants/BordersEdge.cs rename to DocumentManagement/GoldPrinter.ExcelConstants/BordersEdge.cs diff --git a/AIMSExtension/GoldPrinter.ExcelConstants/BordersLineStyle.cs b/DocumentManagement/GoldPrinter.ExcelConstants/BordersLineStyle.cs similarity index 100% rename from AIMSExtension/GoldPrinter.ExcelConstants/BordersLineStyle.cs rename to DocumentManagement/GoldPrinter.ExcelConstants/BordersLineStyle.cs diff --git a/AIMSExtension/GoldPrinter.ExcelConstants/BordersWeight.cs b/DocumentManagement/GoldPrinter.ExcelConstants/BordersWeight.cs similarity index 100% rename from AIMSExtension/GoldPrinter.ExcelConstants/BordersWeight.cs rename to DocumentManagement/GoldPrinter.ExcelConstants/BordersWeight.cs diff --git a/AIMSExtension/GoldPrinter/AlignFlag.cs b/DocumentManagement/GoldPrinter/AlignFlag.cs similarity index 100% rename from AIMSExtension/GoldPrinter/AlignFlag.cs rename to DocumentManagement/GoldPrinter/AlignFlag.cs diff --git a/AIMSExtension/GoldPrinter/Body.cs b/DocumentManagement/GoldPrinter/Body.cs similarity index 100% rename from AIMSExtension/GoldPrinter/Body.cs rename to DocumentManagement/GoldPrinter/Body.cs diff --git a/AIMSExtension/GoldPrinter/BordersEdgeFlag.cs b/DocumentManagement/GoldPrinter/BordersEdgeFlag.cs similarity index 100% rename from AIMSExtension/GoldPrinter/BordersEdgeFlag.cs rename to DocumentManagement/GoldPrinter/BordersEdgeFlag.cs diff --git a/AIMSExtension/GoldPrinter/Bottom.cs b/DocumentManagement/GoldPrinter/Bottom.cs similarity index 100% rename from AIMSExtension/GoldPrinter/Bottom.cs rename to DocumentManagement/GoldPrinter/Bottom.cs diff --git a/AIMSExtension/GoldPrinter/Caption.cs b/DocumentManagement/GoldPrinter/Caption.cs similarity index 100% rename from AIMSExtension/GoldPrinter/Caption.cs rename to DocumentManagement/GoldPrinter/Caption.cs diff --git a/AIMSExtension/GoldPrinter/CellRectangle.cs b/DocumentManagement/GoldPrinter/CellRectangle.cs similarity index 100% rename from AIMSExtension/GoldPrinter/CellRectangle.cs rename to DocumentManagement/GoldPrinter/CellRectangle.cs diff --git a/AIMSExtension/GoldPrinter/ChineseNum.cs b/DocumentManagement/GoldPrinter/ChineseNum.cs similarity index 100% rename from AIMSExtension/GoldPrinter/ChineseNum.cs rename to DocumentManagement/GoldPrinter/ChineseNum.cs diff --git a/AIMSExtension/GoldPrinter/DrawBase.cs b/DocumentManagement/GoldPrinter/DrawBase.cs similarity index 100% rename from AIMSExtension/GoldPrinter/DrawBase.cs rename to DocumentManagement/GoldPrinter/DrawBase.cs diff --git a/AIMSExtension/GoldPrinter/DrawGrid.cs b/DocumentManagement/GoldPrinter/DrawGrid.cs similarity index 100% rename from AIMSExtension/GoldPrinter/DrawGrid.cs rename to DocumentManagement/GoldPrinter/DrawGrid.cs diff --git a/AIMSExtension/GoldPrinter/DrawRectangle.cs b/DocumentManagement/GoldPrinter/DrawRectangle.cs similarity index 100% rename from AIMSExtension/GoldPrinter/DrawRectangle.cs rename to DocumentManagement/GoldPrinter/DrawRectangle.cs diff --git a/AIMSExtension/GoldPrinter/DrawText.cs b/DocumentManagement/GoldPrinter/DrawText.cs similarity index 100% rename from AIMSExtension/GoldPrinter/DrawText.cs rename to DocumentManagement/GoldPrinter/DrawText.cs diff --git a/AIMSExtension/GoldPrinter/ExcelAccess.cs b/DocumentManagement/GoldPrinter/ExcelAccess.cs similarity index 100% rename from AIMSExtension/GoldPrinter/ExcelAccess.cs rename to DocumentManagement/GoldPrinter/ExcelAccess.cs diff --git a/AIMSExtension/GoldPrinter/ExcelBase.cs b/DocumentManagement/GoldPrinter/ExcelBase.cs similarity index 100% rename from AIMSExtension/GoldPrinter/ExcelBase.cs rename to DocumentManagement/GoldPrinter/ExcelBase.cs diff --git a/AIMSExtension/GoldPrinter/ExceptionExcelCreateInstance.cs b/DocumentManagement/GoldPrinter/ExceptionExcelCreateInstance.cs similarity index 100% rename from AIMSExtension/GoldPrinter/ExceptionExcelCreateInstance.cs rename to DocumentManagement/GoldPrinter/ExceptionExcelCreateInstance.cs diff --git a/AIMSExtension/GoldPrinter/ExceptionExcelOpen.cs b/DocumentManagement/GoldPrinter/ExceptionExcelOpen.cs similarity index 100% rename from AIMSExtension/GoldPrinter/ExceptionExcelOpen.cs rename to DocumentManagement/GoldPrinter/ExceptionExcelOpen.cs diff --git a/AIMSExtension/GoldPrinter/ExceptionInvalidPrinter.cs b/DocumentManagement/GoldPrinter/ExceptionInvalidPrinter.cs similarity index 100% rename from AIMSExtension/GoldPrinter/ExceptionInvalidPrinter.cs rename to DocumentManagement/GoldPrinter/ExceptionInvalidPrinter.cs diff --git a/AIMSExtension/GoldPrinter/Footer.cs b/DocumentManagement/GoldPrinter/Footer.cs similarity index 100% rename from AIMSExtension/GoldPrinter/Footer.cs rename to DocumentManagement/GoldPrinter/Footer.cs diff --git a/AIMSExtension/GoldPrinter/GoldGrid.cs b/DocumentManagement/GoldPrinter/GoldGrid.cs similarity index 100% rename from AIMSExtension/GoldPrinter/GoldGrid.cs rename to DocumentManagement/GoldPrinter/GoldGrid.cs diff --git a/AIMSExtension/GoldPrinter/GridBase.cs b/DocumentManagement/GoldPrinter/GridBase.cs similarity index 100% rename from AIMSExtension/GoldPrinter/GridBase.cs rename to DocumentManagement/GoldPrinter/GridBase.cs diff --git a/AIMSExtension/GoldPrinter/GridBorderFlag.cs b/DocumentManagement/GoldPrinter/GridBorderFlag.cs similarity index 100% rename from AIMSExtension/GoldPrinter/GridBorderFlag.cs rename to DocumentManagement/GoldPrinter/GridBorderFlag.cs diff --git a/AIMSExtension/GoldPrinter/GridLineFlag.cs b/DocumentManagement/GoldPrinter/GridLineFlag.cs similarity index 100% rename from AIMSExtension/GoldPrinter/GridLineFlag.cs rename to DocumentManagement/GoldPrinter/GridLineFlag.cs diff --git a/AIMSExtension/GoldPrinter/GridMergeFlag.cs b/DocumentManagement/GoldPrinter/GridMergeFlag.cs similarity index 100% rename from AIMSExtension/GoldPrinter/GridMergeFlag.cs rename to DocumentManagement/GoldPrinter/GridMergeFlag.cs diff --git a/AIMSExtension/GoldPrinter/HAlignFlag.cs b/DocumentManagement/GoldPrinter/HAlignFlag.cs similarity index 100% rename from AIMSExtension/GoldPrinter/HAlignFlag.cs rename to DocumentManagement/GoldPrinter/HAlignFlag.cs diff --git a/AIMSExtension/GoldPrinter/Header.cs b/DocumentManagement/GoldPrinter/Header.cs similarity index 100% rename from AIMSExtension/GoldPrinter/Header.cs rename to DocumentManagement/GoldPrinter/Header.cs diff --git a/AIMSExtension/GoldPrinter/IDraw.cs b/DocumentManagement/GoldPrinter/IDraw.cs similarity index 100% rename from AIMSExtension/GoldPrinter/IDraw.cs rename to DocumentManagement/GoldPrinter/IDraw.cs diff --git a/AIMSExtension/GoldPrinter/IGrid.cs b/DocumentManagement/GoldPrinter/IGrid.cs similarity index 100% rename from AIMSExtension/GoldPrinter/IGrid.cs rename to DocumentManagement/GoldPrinter/IGrid.cs diff --git a/AIMSExtension/GoldPrinter/IPrinterPageSetting.cs b/DocumentManagement/GoldPrinter/IPrinterPageSetting.cs similarity index 100% rename from AIMSExtension/GoldPrinter/IPrinterPageSetting.cs rename to DocumentManagement/GoldPrinter/IPrinterPageSetting.cs diff --git a/AIMSExtension/GoldPrinter/ImportExcelArgs.cs b/DocumentManagement/GoldPrinter/ImportExcelArgs.cs similarity index 100% rename from AIMSExtension/GoldPrinter/ImportExcelArgs.cs rename to DocumentManagement/GoldPrinter/ImportExcelArgs.cs diff --git a/AIMSExtension/GoldPrinter/ImportExcelDelegate.cs b/DocumentManagement/GoldPrinter/ImportExcelDelegate.cs similarity index 100% rename from AIMSExtension/GoldPrinter/ImportExcelDelegate.cs rename to DocumentManagement/GoldPrinter/ImportExcelDelegate.cs diff --git a/AIMSExtension/GoldPrinter/MisGoldPrinter.cs b/DocumentManagement/GoldPrinter/MisGoldPrinter.cs similarity index 100% rename from AIMSExtension/GoldPrinter/MisGoldPrinter.cs rename to DocumentManagement/GoldPrinter/MisGoldPrinter.cs diff --git a/AIMSExtension/GoldPrinter/MultiHeader.cs b/DocumentManagement/GoldPrinter/MultiHeader.cs similarity index 100% rename from AIMSExtension/GoldPrinter/MultiHeader.cs rename to DocumentManagement/GoldPrinter/MultiHeader.cs diff --git a/AIMSExtension/GoldPrinter/Outer.cs b/DocumentManagement/GoldPrinter/Outer.cs similarity index 100% rename from AIMSExtension/GoldPrinter/Outer.cs rename to DocumentManagement/GoldPrinter/Outer.cs diff --git a/AIMSExtension/GoldPrinter/PrintModeFlag.cs b/DocumentManagement/GoldPrinter/PrintModeFlag.cs similarity index 100% rename from AIMSExtension/GoldPrinter/PrintModeFlag.cs rename to DocumentManagement/GoldPrinter/PrintModeFlag.cs diff --git a/AIMSExtension/GoldPrinter/PrintPageDelegate.cs b/DocumentManagement/GoldPrinter/PrintPageDelegate.cs similarity index 100% rename from AIMSExtension/GoldPrinter/PrintPageDelegate.cs rename to DocumentManagement/GoldPrinter/PrintPageDelegate.cs diff --git a/AIMSExtension/GoldPrinter/Printer.cs b/DocumentManagement/GoldPrinter/Printer.cs similarity index 100% rename from AIMSExtension/GoldPrinter/Printer.cs rename to DocumentManagement/GoldPrinter/Printer.cs diff --git a/AIMSExtension/GoldPrinter/PrinterBase.cs b/DocumentManagement/GoldPrinter/PrinterBase.cs similarity index 100% rename from AIMSExtension/GoldPrinter/PrinterBase.cs rename to DocumentManagement/GoldPrinter/PrinterBase.cs diff --git a/AIMSExtension/GoldPrinter/PrinterMargins.cs b/DocumentManagement/GoldPrinter/PrinterMargins.cs similarity index 100% rename from AIMSExtension/GoldPrinter/PrinterMargins.cs rename to DocumentManagement/GoldPrinter/PrinterMargins.cs diff --git a/AIMSExtension/GoldPrinter/PrinterPageSetting.cs b/DocumentManagement/GoldPrinter/PrinterPageSetting.cs similarity index 100% rename from AIMSExtension/GoldPrinter/PrinterPageSetting.cs rename to DocumentManagement/GoldPrinter/PrinterPageSetting.cs diff --git a/AIMSExtension/GoldPrinter/PrinterSingleton.cs b/DocumentManagement/GoldPrinter/PrinterSingleton.cs similarity index 100% rename from AIMSExtension/GoldPrinter/PrinterSingleton.cs rename to DocumentManagement/GoldPrinter/PrinterSingleton.cs diff --git a/AIMSExtension/GoldPrinter/PrinterTabStops.cs b/DocumentManagement/GoldPrinter/PrinterTabStops.cs similarity index 100% rename from AIMSExtension/GoldPrinter/PrinterTabStops.cs rename to DocumentManagement/GoldPrinter/PrinterTabStops.cs diff --git a/AIMSExtension/GoldPrinter/Sewing.cs b/DocumentManagement/GoldPrinter/Sewing.cs similarity index 100% rename from AIMSExtension/GoldPrinter/Sewing.cs rename to DocumentManagement/GoldPrinter/Sewing.cs diff --git a/AIMSExtension/GoldPrinter/SewingDirectionFlag.cs b/DocumentManagement/GoldPrinter/SewingDirectionFlag.cs similarity index 100% rename from AIMSExtension/GoldPrinter/SewingDirectionFlag.cs rename to DocumentManagement/GoldPrinter/SewingDirectionFlag.cs diff --git a/AIMSExtension/GoldPrinter/TimeDef.cs b/DocumentManagement/GoldPrinter/TimeDef.cs similarity index 100% rename from AIMSExtension/GoldPrinter/TimeDef.cs rename to DocumentManagement/GoldPrinter/TimeDef.cs diff --git a/AIMSExtension/GoldPrinter/Title.cs b/DocumentManagement/GoldPrinter/Title.cs similarity index 100% rename from AIMSExtension/GoldPrinter/Title.cs rename to DocumentManagement/GoldPrinter/Title.cs diff --git a/AIMSExtension/GoldPrinter/Top.cs b/DocumentManagement/GoldPrinter/Top.cs similarity index 100% rename from AIMSExtension/GoldPrinter/Top.cs rename to DocumentManagement/GoldPrinter/Top.cs diff --git a/AIMSExtension/GoldPrinter/VAlignFlag.cs b/DocumentManagement/GoldPrinter/VAlignFlag.cs similarity index 100% rename from AIMSExtension/GoldPrinter/VAlignFlag.cs rename to DocumentManagement/GoldPrinter/VAlignFlag.cs diff --git a/AIMSExtension/GoldPrinter/WebPrinterPageSetting.cs b/DocumentManagement/GoldPrinter/WebPrinterPageSetting.cs similarity index 100% rename from AIMSExtension/GoldPrinter/WebPrinterPageSetting.cs rename to DocumentManagement/GoldPrinter/WebPrinterPageSetting.cs diff --git a/AIMSExtension/GoldPrinter/WinPrinterPageSetting.cs b/DocumentManagement/GoldPrinter/WinPrinterPageSetting.cs similarity index 100% rename from AIMSExtension/GoldPrinter/WinPrinterPageSetting.cs rename to DocumentManagement/GoldPrinter/WinPrinterPageSetting.cs diff --git a/DocumentManagement/UI/frmUserTempPurview.cs b/DocumentManagement/UI/frmUserTempPurview.cs index 3d954ce..e4592ea 100644 --- a/DocumentManagement/UI/frmUserTempPurview.cs +++ b/DocumentManagement/UI/frmUserTempPurview.cs @@ -18,10 +18,20 @@ namespace DocumentManagement.UI private void frmUserTempPurview_Load(object sender, EventArgs e) { - AIMSExtension.PublicMethod.SetDgvAttribute(dgvUserPurview); + SetDgvAttribute(dgvUserPurview); dgvUserPurview.DataSource = RoleGetDataTable(); } + public static void SetDgvAttribute(System.Windows.Forms.DataGridView dgv) + { + dgv.AllowUserToResizeColumns = false; + dgv.AllowUserToResizeRows = false; + dgv.AllowUserToAddRows = false; + dgv.AllowUserToDeleteRows = false; + dgv.ReadOnly = true; + dgv.BackgroundColor = System.Drawing.Color.Snow; + + } public DataTable RoleGetDataTable() { StringBuilder strSql = new StringBuilder(); diff --git a/DrawGraph/AreaManage/OperationRecord.cs b/DrawGraph/AreaManage/OperationRecord.cs index 8b2aa97..fab702c 100644 --- a/DrawGraph/AreaManage/OperationRecord.cs +++ b/DrawGraph/AreaManage/OperationRecord.cs @@ -1204,6 +1204,11 @@ namespace DrawGraph public string StateName; [NoCreatControlAttributs] public DataTable PhysioParamList; + /// + /// 当前选中的,手术生理曲线 + /// + [NoCreatControlAttributs] + public PhysioDataConfig SelPhysioConfig; [ClassAttributs(Description = "选中范围的对象")] [NoCreatControlAttributs] @@ -1351,7 +1356,8 @@ namespace DrawGraph OpeRecoverInInfo = new OperationRecoverInInfo(); OpeRecoverOutInfo = new OperationRecoverOutInfo(); InstrumentList = new OperationRecordInstrumentList(); - FactBloodGasAnalysisList = new List(); + FactBloodGasAnalysisList = new List(); + SelPhysioConfig = null; } private void SetDefaultValue() @@ -1364,6 +1370,7 @@ namespace DrawGraph PunctureAndIntubatio = new List(); BeforeDrugs = ""; AnalgesiaDrug = ""; + SelPhysioConfig = null; } /// /// 清除各种对象数据 diff --git a/DrawGraph/AreaManage/PhysioDataConfig.cs b/DrawGraph/AreaManage/PhysioDataConfig.cs index c070240..7a1492b 100644 --- a/DrawGraph/AreaManage/PhysioDataConfig.cs +++ b/DrawGraph/AreaManage/PhysioDataConfig.cs @@ -573,8 +573,11 @@ namespace DrawGraph private void MoveText(PhysioData newPd) { TextObj text = (TextObj)zgcAnas.MasterPane.GraphObjList[this.Enname + newPd.RecordTime.ToString()]; - text.Location.Y = YLocation; - text.Text = ((int)newPd.Value).ToString(); + if (text != null) + { + text.Location.Y = YLocation; + text.Text = ((int)newPd.Value).ToString(); + } } public void ModifyItem(PhysioData oldPd, PhysioData newPd) { diff --git a/DrawGraph/AreaManage/PhysioDataManage.cs b/DrawGraph/AreaManage/PhysioDataManage.cs index e50a61e..1963b92 100644 --- a/DrawGraph/AreaManage/PhysioDataManage.cs +++ b/DrawGraph/AreaManage/PhysioDataManage.cs @@ -30,10 +30,6 @@ namespace DrawGraph /// AbleEditPackObj phListPack = null; /// - /// 当前选中的,手术生理曲线 - /// - private PhysioDataConfig curPhysioParam = null; - /// /// 当前选中的生命体征对象 未改变前 /// private PhysioData CurPhysioData = null; @@ -104,29 +100,29 @@ namespace DrawGraph public override void clearSelectCouve_Click() { - if (curPhysioParam != null && curPhysioParam.IsClick == true) + if (myOpeRecord.SelPhysioConfig != null && myOpeRecord.SelPhysioConfig.IsClick == true) { System.Windows.Forms.DialogResult dr = System.Windows.Forms.MessageBox.Show("是否删除当前选项的所有数据?", "系统提示", System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Information); if (dr == System.Windows.Forms.DialogResult.Yes) { - if (curPhysioParam.ShowText == true) + if (myOpeRecord.SelPhysioConfig.ShowText == true) { - foreach (PointPair pp in curPhysioParam.APhysioParams) + foreach (PointPair pp in myOpeRecord.SelPhysioConfig.APhysioParams) { - PhysioData pd = curPhysioParam.PointPairToPhysioData(pp); + PhysioData pd = myOpeRecord.SelPhysioConfig.PointPairToPhysioData(pp); if (pd != null) - curPhysioParam.delAddObj(pd); + myOpeRecord.SelPhysioConfig.delAddObj(pd); } } - foreach (PointPair pp in curPhysioParam.APhysioParams) + foreach (PointPair pp in myOpeRecord.SelPhysioConfig.APhysioParams) { - PhysioData pd = curPhysioParam.PointPairToPhysioData(pp); - if (pd != null && pd.Value == curPhysioParam.HighLimit) - curPhysioParam.delAddObj(pd); + PhysioData pd = myOpeRecord.SelPhysioConfig.PointPairToPhysioData(pp); + if (pd != null && pd.Value == myOpeRecord.SelPhysioConfig.HighLimit) + myOpeRecord.SelPhysioConfig.delAddObj(pd); } - curPhysioParam.DelItems(myOpeRecord.pageBegin, myOpeRecord.lastPageBegin); - curPhysioParam.clearAddObj(ZedControl); + myOpeRecord.SelPhysioConfig.DelItems(myOpeRecord.pageBegin, myOpeRecord.lastPageBegin); + myOpeRecord.SelPhysioConfig.clearAddObj(ZedControl); ZedControl.Refresh(); @@ -165,29 +161,29 @@ namespace DrawGraph PhysioDataConfig appTemp = reClickParamName(sender1, mousePt); if (appTemp != null) { - if (curPhysioParam == null) + if (myOpeRecord.SelPhysioConfig == null) { appTemp.IsClick = true; - curPhysioParam = appTemp; - curPhysioParam.PatientId = myOpeRecord.Id.Value; - curPhysioParam.onClick(e); + myOpeRecord.SelPhysioConfig = appTemp; + myOpeRecord.SelPhysioConfig.PatientId = myOpeRecord.Id.Value; + myOpeRecord.SelPhysioConfig.onClick(e); } else { - if (curPhysioParam.Name == appTemp.Name) + if (myOpeRecord.SelPhysioConfig.Name == appTemp.Name) { - curPhysioParam.IsClick = false; - curPhysioParam.onClick(e); - curPhysioParam = null; + myOpeRecord.SelPhysioConfig.IsClick = false; + myOpeRecord.SelPhysioConfig.onClick(e); + myOpeRecord.SelPhysioConfig = null; } else { - curPhysioParam.IsClick = false; - curPhysioParam.onClick(e); + myOpeRecord.SelPhysioConfig.IsClick = false; + myOpeRecord.SelPhysioConfig.onClick(e); appTemp.IsClick = true; - curPhysioParam = appTemp; - curPhysioParam.PatientId = myOpeRecord.Id.Value; - curPhysioParam.onClick(e); + myOpeRecord.SelPhysioConfig = appTemp; + myOpeRecord.SelPhysioConfig.PatientId = myOpeRecord.Id.Value; + myOpeRecord.SelPhysioConfig.onClick(e); } } } @@ -195,21 +191,21 @@ namespace DrawGraph //如果点击在麻醉单子范围内 if (pane != null) { - if (curPhysioParam != null && curPhysioParam.IsClick) + if (myOpeRecord.SelPhysioConfig != null && myOpeRecord.SelPhysioConfig.IsClick) { bool isHave = false; PhysioData pdTemp = rePD(sender, e); if (pdTemp == null) return; - foreach (PointPair pp in curPhysioParam.APhysioParams) + foreach (PointPair pp in myOpeRecord.SelPhysioConfig.APhysioParams) { - if (pdTemp.isEquert(curPhysioParam.PointPairToPhysioData(pp)) && curPhysioParam.PointPairToPhysioData(pp).Value != Double.MaxValue) + if (pdTemp.isEquert(myOpeRecord.SelPhysioConfig.PointPairToPhysioData(pp)) && myOpeRecord.SelPhysioConfig.PointPairToPhysioData(pp).Value != Double.MaxValue) { isHave = true; if (AnesOpeStatue == DoAnesOpeStatus.VIEW) { - CurPhysioData = curPhysioParam.PointPairToPhysioData(pp); + CurPhysioData = myOpeRecord.SelPhysioConfig.PointPairToPhysioData(pp); AnesOpeStatue = DoAnesOpeStatus.MOVEPD; break; @@ -220,7 +216,7 @@ namespace DrawGraph { AnesOpeStatue = DoAnesOpeStatus.ADDPD; DateTime insTime = GetRecordTime(pdTemp.RecordTime); - curPhysioParam.AddMultipleItem(pdTemp, insTime, collectInterval); + myOpeRecord.SelPhysioConfig.AddMultipleItem(pdTemp, insTime, collectInterval); } } else @@ -238,11 +234,11 @@ namespace DrawGraph if (!isLegendArea(sender1, mousePt) && pane == null) { - if (curPhysioParam != null) + if (myOpeRecord.SelPhysioConfig != null) { - curPhysioParam.IsClick = false; - curPhysioParam.onClick(e); - curPhysioParam = null; + myOpeRecord.SelPhysioConfig.IsClick = false; + myOpeRecord.SelPhysioConfig.onClick(e); + myOpeRecord.SelPhysioConfig = null; } } } @@ -287,14 +283,14 @@ namespace DrawGraph //考虑客户端拖拽数据库处理不及时 可以采用批量缓存新增修改的数据点集中处理 if (AnesOpeStatue == DoAnesOpeStatus.MOVEPD || AnesOpeStatue == DoAnesOpeStatus.ADDPD) { - if (curPhysioParam != null) + if (myOpeRecord.SelPhysioConfig != null) { PhysioData pdTemp = rePD(sender, e); if (pdTemp == null) return; bool isHave = false; - foreach (PointPair pp in curPhysioParam.APhysioParams) + foreach (PointPair pp in myOpeRecord.SelPhysioConfig.APhysioParams) { - if (pdTemp.isEquert(curPhysioParam.PointPairToPhysioData(pp)) && curPhysioParam.PointPairToPhysioData(pp).Value != Double.MaxValue) + if (pdTemp.isEquert(myOpeRecord.SelPhysioConfig.PointPairToPhysioData(pp)) && myOpeRecord.SelPhysioConfig.PointPairToPhysioData(pp).Value != Double.MaxValue) { isHave = true; } @@ -304,17 +300,17 @@ namespace DrawGraph AnesOpeStatue = DoAnesOpeStatus.ADDPD; DateTime insTime = GetRecordTime(pdTemp.RecordTime); pdTemp.RecordTime = insTime; - curPhysioParam.AddPointItem(pdTemp); + myOpeRecord.SelPhysioConfig.AddPointItem(pdTemp); ZedControl.AxisChange(); ZedControl.Refresh(); } else { - PhysioData newPd = curPhysioParam.MoveItem(pdTemp); + PhysioData newPd = myOpeRecord.SelPhysioConfig.MoveItem(pdTemp); if (newPd != null)//&& CurPhysioData.Value != newPd.Value { CurPhysioData = newPd; - curPhysioParam.ModifyItem(CurPhysioData, CurPhysioData); + myOpeRecord.SelPhysioConfig.ModifyItem(CurPhysioData, CurPhysioData); ZedControl.AxisChange(); ZedControl.Refresh(); } @@ -352,14 +348,14 @@ namespace DrawGraph double y = Convert.ToDouble(Convert.ToDouble(e.Y) / Convert.ToDouble(ZedControl.Height)); double x = Convert.ToDouble(Convert.ToDouble(e.X) / Convert.ToDouble(ZedControl.Width)); - if (curPhysioParam != null && curPhysioParam.IsClick == true) + if (myOpeRecord.SelPhysioConfig != null && myOpeRecord.SelPhysioConfig.IsClick == true) { PhysioData pdNew = rePD(sender, e); if (pdNew == null) return; if (AnesOpeStatue == DoAnesOpeStatus.MOVEPD) { if (CurPhysioData.RecordTime == pdNew.RecordTime) - curPhysioParam.ModifyItem(CurPhysioData, pdNew); + myOpeRecord.SelPhysioConfig.ModifyItem(CurPhysioData, pdNew); CurPhysioData = null; } @@ -383,7 +379,7 @@ namespace DrawGraph //只有鼠标左键双击才有效 if (e.Button == System.Windows.Forms.MouseButtons.Left && e.Clicks == 2) { - if ((AnesOpeStatue == DoAnesOpeStatus.VIEW || AnesOpeStatue == DoAnesOpeStatus.SelectArea) && curPhysioParam == null) + if ((AnesOpeStatue == DoAnesOpeStatus.VIEW || AnesOpeStatue == DoAnesOpeStatus.SelectArea) && myOpeRecord.SelPhysioConfig == null) { List pdTemps = rePDs(sender as ZedGraphControl, e); if (pdTemps != null) @@ -495,7 +491,7 @@ namespace DrawGraph //DrawPhysioData(); - curPhysioParam = null; + myOpeRecord.SelPhysioConfig = null; CurPhysioData = null; } @@ -795,10 +791,10 @@ namespace DrawGraph XDate xd = new XDate(x); PhysioDataConfig physioParam = null; - if (curPhysioParam == null) + if (myOpeRecord.SelPhysioConfig == null) physioParam = myOpeRecord.PhysioConfigList[1]; else - physioParam = curPhysioParam; + physioParam = myOpeRecord.SelPhysioConfig; double value = Math.Round(y[physioParam.YAisx], 0); pdNews.Add(PhysioDataConfig.newPhysioData(physioParam, myOpeRecord.Id.Value, xd.DateTime, value)); @@ -845,13 +841,13 @@ namespace DrawGraph XDate xd = new XDate(x); PhysioDataConfig physioParam = null; - if (curPhysioParam == null) + if (myOpeRecord.SelPhysioConfig == null) { physioParam = myOpeRecord.PhysioConfigList[1]; } else { - physioParam = curPhysioParam; + physioParam = myOpeRecord.SelPhysioConfig; } double value = physioParam.YAisx == 1 ? Math.Round(y[physioParam.YAisx], 1) : Math.Round(y[physioParam.YAisx], 0); PhysioData pdNew = PhysioDataConfig.newPhysioData(physioParam, myOpeRecord.Id.Value, xd.DateTime, value); diff --git a/DrawGraph/AreaManage/TemplateManage.cs b/DrawGraph/AreaManage/TemplateManage.cs index fc7e0b3..c65a59c 100644 --- a/DrawGraph/AreaManage/TemplateManage.cs +++ b/DrawGraph/AreaManage/TemplateManage.cs @@ -34,7 +34,7 @@ namespace DrawGraph private int dfzjpyl = 0; private int locationY; //private string hospitalName = ""; - private XmlUtil xmlOpe = new XmlUtil(System.Windows.Forms.Application.StartupPath + "\\AIMS.xml"); + //private XmlUtil xmlOpe = new XmlUtil(System.Windows.Forms.Application.StartupPath + "\\AIMS.xml"); private TypesettingEnum typesetting = TypesettingEnum.Vertical; private PageTypeEnum pageType = PageTypeEnum.A4; diff --git a/DrawGraph/BoardPack/LinePackObj.cs b/DrawGraph/BoardPack/LinePackObj.cs index 69a696d..88b1d35 100644 --- a/DrawGraph/BoardPack/LinePackObj.cs +++ b/DrawGraph/BoardPack/LinePackObj.cs @@ -11,10 +11,10 @@ namespace DrawGraph [Serializable] public class LinePackObj : PackObjBase { - private Color lineColor = Color.Black; - private int lineWidth = 1; + private Color lineColor = Color.Black; + public Color LineColor { get diff --git a/DrawGraph/DrawGraph.csproj b/DrawGraph/DrawGraph.csproj index 04d34b4..aedaf63 100644 --- a/DrawGraph/DrawGraph.csproj +++ b/DrawGraph/DrawGraph.csproj @@ -97,6 +97,12 @@ + + Form + + + frmMessageBox.cs + @@ -242,6 +248,9 @@ DeletePhysios.cs + + frmMessageBox.cs + ResXFileCodeGenerator Resources.Designer.cs diff --git a/DrawGraph/GUtil/EntityObjectChangeNotifier.cs b/DrawGraph/GUtil/EntityObjectChangeNotifier.cs index 81dc686..6fb69c2 100644 --- a/DrawGraph/GUtil/EntityObjectChangeNotifier.cs +++ b/DrawGraph/GUtil/EntityObjectChangeNotifier.cs @@ -17,39 +17,7 @@ namespace DrawGraph public static event EventHandler ObjectChanged; private static bool isSetOk = true; //设置值是否成功 public static bool isCreateOk = false; - - /// - /// 为属性幅值 - /// - /// 类的类型 - /// 类的属性 - /// 显示的文本 - /// 真正的值 - /// 为真时做数据库更新 - public static void SetValue(object t, string propertyName, string text, string value, bool isUpdate = false, ZedGraphControl ZedControl = null) - { - isSetOk = true; - try - { - //给属性赋值 - object oldValue = SubObjSetValue(t, propertyName, value); - if (oldValue == null) oldValue = ""; - if (isUpdate) - { - //为真时更新数据库 - DocumentEntityMethod.SetOperationRecordValue(t, propertyName, value); - } - propertyName = propertyName.Replace(t.GetType().Name + ".", ""); - //通知组件显示文本 - ObjectChangedEventArgs args = new ObjectChangedEventArgs(t.GetType().Name + "." + propertyName, oldValue, text, value, ZedControl); - if (ObjectChanged != null) ObjectChanged(t, args); - args = null; - } - catch (Exception exp) - { - MessageBox.Show(propertyName + "属性设置错误:" + exp.Message); - } - } + public static object SubObjSetValue(object t, string propertyName, string value) { object oldValue = null; diff --git a/AIMSExtension/frmMessageBox.cs b/DrawGraph/frmMessageBox.cs similarity index 98% rename from AIMSExtension/frmMessageBox.cs rename to DrawGraph/frmMessageBox.cs index dfb93ae..c0c8cad 100644 --- a/AIMSExtension/frmMessageBox.cs +++ b/DrawGraph/frmMessageBox.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Text; using System.Windows.Forms; -namespace AIMSExtension +namespace DrawGraph { public partial class frmMessageBox : Form { diff --git a/AIMSExtension/frmMessageBox.designer.cs b/DrawGraph/frmMessageBox.designer.cs similarity index 99% rename from AIMSExtension/frmMessageBox.designer.cs rename to DrawGraph/frmMessageBox.designer.cs index cb2cbf9..043d326 100644 --- a/AIMSExtension/frmMessageBox.designer.cs +++ b/DrawGraph/frmMessageBox.designer.cs @@ -1,4 +1,4 @@ -namespace AIMSExtension +namespace DrawGraph { partial class frmMessageBox { diff --git a/AIMSExtension/frmMessageBox.resx b/DrawGraph/frmMessageBox.resx similarity index 100% rename from AIMSExtension/frmMessageBox.resx rename to DrawGraph/frmMessageBox.resx