整理命名空间

This commit is contained in:
leomon 2022-12-27 17:33:33 +08:00
parent 3adf335d83
commit b97fc0eae7
141 changed files with 1120 additions and 2463 deletions

View File

@ -207,12 +207,6 @@
<Compile Include="FormLogin.designer.cs">
<DependentUpon>FormLogin.cs</DependentUpon>
</Compile>
<Compile Include="OperationAfter\frmCommonLargeScreen.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="OperationAfter\frmCommonLargeScreen.designer.cs">
<DependentUpon>frmCommonLargeScreen.cs</DependentUpon>
</Compile>
<Compile Include="OperationAfter\frmOperationManage.cs">
<SubType>Form</SubType>
</Compile>
@ -825,9 +819,6 @@
<DependentUpon>FormLogin.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="OperationAfter\frmCommonLargeScreen.resx">
<DependentUpon>frmCommonLargeScreen.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="OperationAfter\frmOperationManage.resx">
<DependentUpon>frmOperationManage.cs</DependentUpon>
</EmbeddedResource>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<AtuoUpdate>
<ConnectionString>Data Source=.;Initial Catalog=AIMSDB_QHDSGRYY;User ID=sa;Password=Test2020;</ConnectionString>
<ConnectionString>Data Source=tx.wulvshi.cn;Initial Catalog=AIMSDB_QHDSGRYY;User ID=sa;Password=Test2020;</ConnectionString>
<DataConnectionString>Data Source=.;Initial Catalog=AIMSDB_DATA;User ID=sa;Password=Test2020;</DataConnectionString>
<HisConnectionStringOracel>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;</HisConnectionStringOracel>
</AtuoUpdate>

View File

@ -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
/// <param name="e"></param>
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);
}
}

View File

@ -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);
}
/// <summary>
/// 初始化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;

View File

@ -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
/// <param name="e"></param>
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);

View File

@ -284,7 +284,7 @@ namespace AIMS.PublicUI.UI
int num = BApplianceUseType.Update(_applianceUseType);
if (num > 0)
{
new frmMessageBox().Show();
MessageBox.Show("保存成功!");
//this.Close();
}
}

View File

@ -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
/// <param name="e"></param>
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);
}
}

View File

@ -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);

View File

@ -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);

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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<BasicDictionary> _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;
}

View File

@ -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;

View File

@ -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;
}
}

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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);
}
/// <summary>
/// 修改事件
@ -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
/// <param name="e"></param>
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);
}

View File

@ -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()

View File

@ -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)
{

View File

@ -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);

View File

@ -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();
}

View File

@ -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()

View File

@ -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;
}
/// <summary>
/// 手术间信息加载到treeview
@ -453,5 +456,10 @@ namespace AIMS.OperationAfter.UI
}
}
}
private void buttonX2_Click(object sender, EventArgs e)
{
BOperationReview.SetDocumentXmlStatic("不计费耗材使用清单");
}
}
}

View File

@ -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;
}
}

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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);
}

View File

@ -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();
}
/// <summary>
/// 获取通知档的内容
/// </summary>
private void GetT_Inform()
{
string messige = "";// PublicMethod.getMessige();
if (messige.Trim() == "") return;
body += "<script language='javascript'> setInterval(someFunction, 20000);function someFunction() {window.location.reload();}</script>";
body += " <div style='position: absolute;top: 50%;left: 50%;width: 1000px;height: 50px;margin-top: -25px; margin-left:-500px; background-color:#000;font: bold 48px/50px Verdana, Geneva, sans-serif; '>";
body += "<marquee direction='left' scrollamount='12' style='font: 48px/50px Verdana, Geneva, sans-serif; color:#d808d6'>";
body += messige + " </marquee></div></body>";
}
/// <summary>
/// 获取每页显示的内容
/// </summary>
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("加载大屏公告信息失败");
}
}
/// <summary>
/// 加载所有手术状态为“术前、术中、”的申请信息
/// </summary>
/// <param name="m"></param>
/// <param name="n"></param>
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 = "<tr>";
if (i >= dSum)
{
tdRow += "<td colspan='9'> </td>";
}
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 += "<td align='center' " + rowStyle + ">" + dts.Rows[i]["DepartmentName"] + "</td>";
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 += "<td align='center' " + rowStyle + ">&nbsp" + PatientName + "</td>";
tdRow += "<td align='center' " + rowStyle + ">&nbsp" + OperationRoom + "</td>";
tdRow += "<td align='center' " + rowStyle + ">&nbsp" + vchrFactBeginTime + " </td>";
tdRow += "<td align='center' " + rowStyle + ">" + vchrOpeStatus + "</td>";
}
tdRow += "</tr>";
tdRows += tdRow;
}
viewRemark();
body = tdRows == "" ? body : body.Replace("{rows}", tdRows);
//插入底部
insertBottom();
webBrowser1.DocumentText = body;
}
catch (Exception )
{
}
}
#region
private void createTable()
{
body = "<body style='margin:0;' bgcolor='" + bodyBgColor + "'>";
body += "<table border=0 width='100%' height='100%' cellpadding=0 cellspacing=0>";
body += "{title}";
body += "{columens}";
body += "{rows}";
body += "</table></body>";
}
/// <summary>
/// 插入表头
/// </summary>
private void insertTitle()
{
string titleStr = "";
titleStr += "<tr style='background:black;color:white;margin-bottom:6px;font-size:40px;font-weight:bold;font-family:\"" + fontFamily + "\";'>";
titleStr += "<td colspan='10' align='center' valign='middle' height='10%' style='padding:6px;'>";
titleStr += "<DIV style='left:10px; top: 22px; position: absolute;color:" + titleBgColor + ";font-size:" + fontSize + ";'>";
titleStr += "</DIV>患者家属等候区<DIV style='left: 10px; top: 22px; position: absolute;color:" + titleBgColor + ";font-size:" + fontSize + ";'>" +DateTime.Now.ToString("yyyy-MM-dd HH:mm") + "</DIV><div style='right: 10px; top: 22px; position: absolute;color:" + titleBgColor + ";font-size:" + fontSize + ";'>(第" + currentPage + "屏/共" + countPage + "屏)</div> </TD></tr>";
body = body.Replace("{title}", titleStr);
}
/// <summary>
/// 显示备注
/// </summary>
private void viewRemark()
{
GetT_Inform();
}
private void insertCols(string[] colNames, string[] colWidths)
{
string colString = "";
string colContent = "";
colString += "<tr style='background:" + titleColBgColor + ";color:white;margin-bottom:6px;font-size:" +
fontSize + ";font-weight:bold;font-family:\"" + fontFamily + "\";'>{td}</tr>";
for (int i = 0; i < colNames.Length; i++)
{
colContent += "<td width = '" + colWidths[i] +
"%' align='center' valign='middle' height='5%' style='padding:6px;'>" + colNames[i] +
"</td>";
}
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;
}
/// <summary>
/// 插入表底部
/// </summary>
private void insertBottom()
{
string bottomStr = "";
bottomStr += "<tr>";
bottomStr += "<td colspan='10' align='center' valign='middle' id='bottom1'></td>";
bottomStr += "</tr>";
body = body.Replace("{Bootom}", bottomStr);
}
#endregion
private void timer1_Tick(object sender, EventArgs e)
{
//下一页
button2_Click(null, null);
}
/// <summary>
/// 下一页
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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);
}
}
}

View File

@ -1,73 +0,0 @@
namespace AIMS.OperationAfter.UI
{
partial class frmCommonLargeScreen
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
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;
}
}

View File

@ -1,123 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -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<Department> list = new List<Department>();
@ -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);
}
/// <summary>
/// DataGridView转Excel
/// </summary>
/// <param name="m_DataView"></param>
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)
{

View File

@ -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;

View File

@ -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;
}

View File

@ -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
/// <param name="e"></param>
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;
}
/// <summary>
@ -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);
}
/// <summary>
/// 关闭
@ -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)

View File

@ -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;
}
}

View File

@ -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<int> SelectOperationDoctorData = new List<int>(); //一助
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);
}
}
/// <summary>
/// 根据工作类型 选择医生术者赋值TextBox
/// </summary>
@ -1861,6 +1933,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI
}
}
private void plPrint_Click(object sender, EventArgs e)
{
if (_record == null || _record.Id == 0) return;

View File

@ -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();
}
}

View File

@ -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();

View File

@ -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;
}
}

View File

@ -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<OperationRoom> 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<string> list = new List<string>();
List<string> list = new List<string>();
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("手术间切换成功!");
}
}
}
}
}

View File

@ -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

View File

@ -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();

View File

@ -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);

View File

@ -2,6 +2,7 @@
using AIMS.PublicUI;
using AIMSBLL;
using AIMSModel;
using DataDictionary;
using System;
using System.Collections.Generic;
using System.ComponentModel;

View File

@ -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;
}
}
}
}
}

View File

@ -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;

View File

@ -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
{

View File

@ -19,7 +19,7 @@ namespace AIMS
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[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;

View File

@ -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")]

View File

@ -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();

View File

@ -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("术前感染筛查", "");

View File

@ -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();
}

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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);

View File

@ -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)

View File

@ -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("");

View File

@ -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("");

View File

@ -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);
}
}
}
}

View File

@ -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;
}

View File

@ -31,15 +31,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="DevComponents.DotNetBar2, Version=12.5.0.2, Culture=neutral, PublicKeyToken=c39c3242a43eee2b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\AIMS\Extensions\DevComponents.DotNetBar2.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>..\AIMS\Extensions\Microsoft.Office.Interop.Excel.dll</HintPath>
</Reference>
<Reference Include="Oracle.ManagedDataAccess">
<HintPath>..\AIMS\Extensions\Oracle.ManagedDataAccess.dll</HintPath>
</Reference>
@ -55,77 +46,15 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AttributeHelper.cs" />
<Compile Include="BrowserHelper.cs" />
<Compile Include="ChineseCalendar.cs" />
<Compile Include="DATADBHelper.cs" />
<Compile Include="DataFieldAttribute.cs" />
<Compile Include="DbAccessException.cs" />
<Compile Include="DbConnectInfo.cs" />
<Compile Include="DBHelper.cs" />
<Compile Include="DbHelperSQL.cs" />
<Compile Include="DocumentEntityMethod.cs" />
<Compile Include="EditState.cs" />
<Compile Include="ErrorInfo.cs" />
<Compile Include="frmMessageBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmMessageBox.designer.cs">
<DependentUpon>frmMessageBox.cs</DependentUpon>
</Compile>
<Compile Include="FTPTransmission.cs" />
<Compile Include="GoldPrinter.ExcelConstants\BordersEdge.cs" />
<Compile Include="GoldPrinter.ExcelConstants\BordersLineStyle.cs" />
<Compile Include="GoldPrinter.ExcelConstants\BordersWeight.cs" />
<Compile Include="GoldPrinter\AlignFlag.cs" />
<Compile Include="GoldPrinter\Body.cs" />
<Compile Include="GoldPrinter\BordersEdgeFlag.cs" />
<Compile Include="GoldPrinter\Bottom.cs" />
<Compile Include="GoldPrinter\Caption.cs" />
<Compile Include="GoldPrinter\CellRectangle.cs" />
<Compile Include="GoldPrinter\ChineseNum.cs" />
<Compile Include="GoldPrinter\DataGridViewListViewHelper.cs" />
<Compile Include="GoldPrinter\DrawBase.cs" />
<Compile Include="GoldPrinter\DrawGrid.cs" />
<Compile Include="GoldPrinter\DrawRectangle.cs" />
<Compile Include="GoldPrinter\DrawText.cs" />
<Compile Include="GoldPrinter\ExcelAccess.cs" />
<Compile Include="GoldPrinter\ExcelBase.cs" />
<Compile Include="GoldPrinter\ExceptionExcelCreateInstance.cs" />
<Compile Include="GoldPrinter\ExceptionExcelOpen.cs" />
<Compile Include="GoldPrinter\ExceptionInvalidPrinter.cs" />
<Compile Include="GoldPrinter\Footer.cs" />
<Compile Include="GoldPrinter\GoldGrid.cs" />
<Compile Include="GoldPrinter\GridBase.cs" />
<Compile Include="GoldPrinter\GridBorderFlag.cs" />
<Compile Include="GoldPrinter\GridLineFlag.cs" />
<Compile Include="GoldPrinter\GridMergeFlag.cs" />
<Compile Include="GoldPrinter\HAlignFlag.cs" />
<Compile Include="GoldPrinter\Header.cs" />
<Compile Include="GoldPrinter\IDraw.cs" />
<Compile Include="GoldPrinter\IGrid.cs" />
<Compile Include="GoldPrinter\ImportExcelArgs.cs" />
<Compile Include="GoldPrinter\ImportExcelDelegate.cs" />
<Compile Include="GoldPrinter\IPrinterPageSetting.cs" />
<Compile Include="GoldPrinter\MisGoldPrinter.cs" />
<Compile Include="GoldPrinter\MultiHeader.cs" />
<Compile Include="GoldPrinter\Outer.cs" />
<Compile Include="GoldPrinter\Printer.cs" />
<Compile Include="GoldPrinter\PrinterBase.cs" />
<Compile Include="GoldPrinter\PrinterMargins.cs" />
<Compile Include="GoldPrinter\PrinterPageSetting.cs" />
<Compile Include="GoldPrinter\PrinterSingleton.cs" />
<Compile Include="GoldPrinter\PrinterTabStops.cs" />
<Compile Include="GoldPrinter\PrintModeFlag.cs" />
<Compile Include="GoldPrinter\PrintPageDelegate.cs" />
<Compile Include="GoldPrinter\Sewing.cs" />
<Compile Include="GoldPrinter\SewingDirectionFlag.cs" />
<Compile Include="GoldPrinter\TimeDef.cs" />
<Compile Include="GoldPrinter\Title.cs" />
<Compile Include="GoldPrinter\Top.cs" />
<Compile Include="GoldPrinter\VAlignFlag.cs" />
<Compile Include="GoldPrinter\WebPrinterPageSetting.cs" />
<Compile Include="GoldPrinter\WinPrinterPageSetting.cs" />
<Compile Include="GPDBConn.cs" />
<Compile Include="GPDbHelper.cs" />
<Compile Include="GPFunctions.cs" />
@ -146,13 +75,9 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TableAttribute.cs" />
<Compile Include="TableStructure.cs" />
<Compile Include="TypeHelper.cs" />
<Compile Include="XmlUse.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="frmMessageBox.resx">
<DependentUpon>frmMessageBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>

View File

@ -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
{
/// <summary>
/// 实体属性名称
/// </summary>
public string PropertyName { get; set; }
/// <summary>
/// 数据库对应字段名
/// </summary>
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; }
}
}

View File

@ -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 );
}
}
}

View File

@ -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();
/// <summary>
/// 执行sql操作增、删、改

View File

@ -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();
/// <summary>
/// 执行sql操作增、删、改
@ -459,7 +460,7 @@ namespace HelperDB
SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
return reader;
}
#region ToEntity
/// <summary>
/// DataRow 转 实体

View File

@ -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;
}
/// <summary>
/// 是否为主键
/// </summary>
public bool IsKey { get; set; }
/// <summary>
/// 是否为自增字段
/// </summary>
public bool IsAutoGrow { get; set; }
/// <summary>
/// 字段名称
/// </summary>
public string FieldName { get; set; }
/// <summary>
/// 字段描述
/// </summary>
public string Descript { get; set; }
}
}

View File

@ -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;
}
}
}

View File

@ -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
{

View File

@ -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<MyPropInfo> 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<MyPropInfo> 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<MyPropInfo> 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<MyPropInfo> MyPropInfoList = typeDBHelper.GetProperties().Select(a => AttributeHelper.GetPropertyExtend(a)).ToList();
List<TableStructure> 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<TableStructure> GetTableStructure(string TableName)
{
List<TableStructure> tableStructure = new List<TableStructure>();
//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<MyPropInfo> MyPropInfoList = typeDBHelper.GetProperties().Select(a => AttributeHelper.GetPropertyExtend(a)).ToList();
List<TableStructure> 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);
}
}
}

View File

@ -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<XElement> 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;
}
}
/// <summary>
/// 初始化判断是否需要升级 或高版本更新升级文件
/// </summary>
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<XElement> 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
/// <summary>

View File

@ -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;

View File

@ -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;
}
}
}

View File

@ -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;
/// <summary>

View File

@ -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<string> 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 "";
}
}
/// <summary>
/// 验证字符串为数值型
/// </summary>
/// <param name="txt"></param>
/// <returns></returns>
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);
}
/// <summary>
/// DataGridView转Excel
/// </summary>
/// <param name="m_DataView"></param>
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成功");
}
}
/// <summary>
/// 修改本地时间
@ -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;
//}
/// <summary>
/// 创建KeyIV
/// </summary>
/// <returns></returns>
public static string[] GenerateKeyIV()
{
DESCryptoServiceProvider desCrypto = (DESCryptoServiceProvider)DESCryptoServiceProvider.Create();
return new string[]{ASCIIEncoding.ASCII.GetString(desCrypto.Key),ASCIIEncoding.ASCII.GetString(desCrypto.IV)};
}
/// <summary>
/// 将异常打印到LOG文件
/// </summary>
@ -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)
{
}
}

View File

@ -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;
}
}
}
}

View File

@ -42,6 +42,11 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\AIMS\DLL\DevComponents.DotNetBar2.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>..\AIMS\Extensions\Microsoft.Office.Interop.Excel.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
@ -66,6 +71,57 @@
<Compile Include="DocumentEntity\UserTempPurview.cs" />
<Compile Include="DocumentEntity\MyCommandNames.cs" />
<Compile Include="DocumentEntity\MyListItemsProvider.cs" />
<Compile Include="GoldPrinter.ExcelConstants\BordersEdge.cs" />
<Compile Include="GoldPrinter.ExcelConstants\BordersLineStyle.cs" />
<Compile Include="GoldPrinter.ExcelConstants\BordersWeight.cs" />
<Compile Include="GoldPrinter\AlignFlag.cs" />
<Compile Include="GoldPrinter\Body.cs" />
<Compile Include="GoldPrinter\BordersEdgeFlag.cs" />
<Compile Include="GoldPrinter\Bottom.cs" />
<Compile Include="GoldPrinter\Caption.cs" />
<Compile Include="GoldPrinter\CellRectangle.cs" />
<Compile Include="GoldPrinter\ChineseNum.cs" />
<Compile Include="GoldPrinter\DrawBase.cs" />
<Compile Include="GoldPrinter\DrawGrid.cs" />
<Compile Include="GoldPrinter\DrawRectangle.cs" />
<Compile Include="GoldPrinter\DrawText.cs" />
<Compile Include="GoldPrinter\ExcelAccess.cs" />
<Compile Include="GoldPrinter\ExcelBase.cs" />
<Compile Include="GoldPrinter\ExceptionExcelCreateInstance.cs" />
<Compile Include="GoldPrinter\ExceptionExcelOpen.cs" />
<Compile Include="GoldPrinter\ExceptionInvalidPrinter.cs" />
<Compile Include="GoldPrinter\Footer.cs" />
<Compile Include="GoldPrinter\GoldGrid.cs" />
<Compile Include="GoldPrinter\GridBase.cs" />
<Compile Include="GoldPrinter\GridBorderFlag.cs" />
<Compile Include="GoldPrinter\GridLineFlag.cs" />
<Compile Include="GoldPrinter\GridMergeFlag.cs" />
<Compile Include="GoldPrinter\HAlignFlag.cs" />
<Compile Include="GoldPrinter\Header.cs" />
<Compile Include="GoldPrinter\IDraw.cs" />
<Compile Include="GoldPrinter\IGrid.cs" />
<Compile Include="GoldPrinter\ImportExcelArgs.cs" />
<Compile Include="GoldPrinter\ImportExcelDelegate.cs" />
<Compile Include="GoldPrinter\IPrinterPageSetting.cs" />
<Compile Include="GoldPrinter\MisGoldPrinter.cs" />
<Compile Include="GoldPrinter\MultiHeader.cs" />
<Compile Include="GoldPrinter\Outer.cs" />
<Compile Include="GoldPrinter\Printer.cs" />
<Compile Include="GoldPrinter\PrinterBase.cs" />
<Compile Include="GoldPrinter\PrinterMargins.cs" />
<Compile Include="GoldPrinter\PrinterPageSetting.cs" />
<Compile Include="GoldPrinter\PrinterSingleton.cs" />
<Compile Include="GoldPrinter\PrinterTabStops.cs" />
<Compile Include="GoldPrinter\PrintModeFlag.cs" />
<Compile Include="GoldPrinter\PrintPageDelegate.cs" />
<Compile Include="GoldPrinter\Sewing.cs" />
<Compile Include="GoldPrinter\SewingDirectionFlag.cs" />
<Compile Include="GoldPrinter\TimeDef.cs" />
<Compile Include="GoldPrinter\Title.cs" />
<Compile Include="GoldPrinter\Top.cs" />
<Compile Include="GoldPrinter\VAlignFlag.cs" />
<Compile Include="GoldPrinter\WebPrinterPageSetting.cs" />
<Compile Include="GoldPrinter\WinPrinterPageSetting.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>

Some files were not shown because too many files have changed in this diff Show More