特殊报表查询导出

This commit is contained in:
leomon 2023-04-26 11:08:44 +08:00
parent 64aa2734c0
commit 8e5ec2a895
21 changed files with 1145 additions and 81 deletions

View File

@ -285,6 +285,12 @@
<Compile Include="OperationAfter\frmOperationCharg2.designer.cs">
<DependentUpon>frmOperationCharg2.cs</DependentUpon>
</Compile>
<Compile Include="OperationAfter\frmReportExport.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="OperationAfter\frmReportExport.designer.cs">
<DependentUpon>frmReportExport.cs</DependentUpon>
</Compile>
<Compile Include="OperationAfter\frmOperationCharg5.cs">
<SubType>Form</SubType>
</Compile>
@ -951,6 +957,9 @@
<EmbeddedResource Include="OperationAfter\frmOperationCharg2.resx">
<DependentUpon>frmOperationCharg2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="OperationAfter\frmReportExport.resx">
<DependentUpon>frmReportExport.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="OperationAfter\frmOperationCharg5.resx">
<DependentUpon>frmOperationCharg5.cs</DependentUpon>
</EmbeddedResource>

View File

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

View File

@ -429,7 +429,7 @@ namespace AIMS.OperationAfter.UI
doc.Parent = c;
doc.Dock = DockStyle.Fill;
doc.Show();
doc.tsbSaveAndPrint_Click(null, null);
doc.myEditControl.ExecuteCommand("FilePrint", false, null);
}
}

View File

@ -316,11 +316,20 @@ namespace AIMS
selsideNavItem = sideNavItem;
sideNavItem.Text = sideNavItem.Text + " ¡ú";
AIMSModel.Menu menu = sideNavItem.Tag as AIMSModel.Menu;
if (menu.Name == "报表统计" || menu.Name == "大屏公告")
if (menu.Name == "大屏公告")
{
BrowserHelper.OpenBrowserUrlChrome(menu.Path);
}
else
else if (menu.Name == "报表统计")
{
DialogResult dialog = MessageBox.Show("是否打开网页版报表?", "系统提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dialog == DialogResult.Yes)
BrowserHelper.OpenBrowserUrlChrome(menu.Path);
menu.Path = "AIMS.frmReportExport";
}
if (menu.Path.Contains("AIMS."))
{
string path = menu.Path;
if (path.Length > 0)
@ -338,7 +347,7 @@ namespace AIMS
frm.Show();
frm.BringToFront();
}
catch (Exception )
catch (Exception)
{
if (path.Contains("MainFormManage"))
{

View File

@ -38,7 +38,6 @@
this.panel1 = new System.Windows.Forms.Panel();
this.cboRoom = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.label22 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.tsbSettingDGV = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
@ -100,6 +99,8 @@
this.dataGridViewTextBoxColumn31 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dgvDrugs = new DevComponents.DotNetBar.Controls.DataGridViewX();
this.dataGridViewTextBoxColumn21 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel4.SuspendLayout();
@ -108,20 +109,21 @@
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvOperation)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvDrugs)).BeginInit();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.Transparent;
this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.panel1.Controls.Add(this.toolStrip1);
this.panel1.Controls.Add(this.cboRoom);
this.panel1.Controls.Add(this.label22);
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.tsbSettingDGV);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1350, 45);
this.panel1.Size = new System.Drawing.Size(1350, 51);
this.panel1.TabIndex = 0;
//
// cboRoom
@ -130,6 +132,7 @@
this.cboRoom.DisplayMember = "Text";
this.cboRoom.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cboRoom.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cboRoom.ForeColor = System.Drawing.Color.Black;
this.cboRoom.FormattingEnabled = true;
this.cboRoom.ItemHeight = 17;
this.cboRoom.Location = new System.Drawing.Point(994, 12);
@ -151,21 +154,6 @@
this.label22.Text = "手术地点";
this.label22.Visible = false;
//
// button1
//
this.button1.Cursor = System.Windows.Forms.Cursors.Hand;
this.button1.Dock = System.Windows.Forms.DockStyle.Left;
this.button1.FlatAppearance.BorderSize = 0;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Font = new System.Drawing.Font("微软雅黑", 11F);
this.button1.Location = new System.Drawing.Point(0, 0);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(100, 45);
this.button1.TabIndex = 16;
this.button1.Text = "导出Excel";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// tsbSettingDGV
//
this.tsbSettingDGV.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -199,7 +187,7 @@
this.panel2.Controls.Add(this.labDate);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.panel2.Location = new System.Drawing.Point(0, 45);
this.panel2.Location = new System.Drawing.Point(0, 51);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1350, 81);
this.panel2.TabIndex = 387;
@ -244,6 +232,7 @@
this.cnoDrugName.DisplayMember = "Text";
this.cnoDrugName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cnoDrugName.Font = new System.Drawing.Font("微软雅黑", 10.5F);
this.cnoDrugName.ForeColor = System.Drawing.Color.Black;
this.cnoDrugName.FormattingEnabled = true;
this.cnoDrugName.ItemHeight = 20;
this.cnoDrugName.Items.AddRange(new object[] {
@ -282,6 +271,7 @@
this.comboBoxExType.DisplayMember = "Text";
this.comboBoxExType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.comboBoxExType.Font = new System.Drawing.Font("微软雅黑", 10.5F);
this.comboBoxExType.ForeColor = System.Drawing.Color.Black;
this.comboBoxExType.FormattingEnabled = true;
this.comboBoxExType.ItemHeight = 20;
this.comboBoxExType.Items.AddRange(new object[] {
@ -464,9 +454,9 @@
this.groupBox1.Controls.Add(this.dgvOperation);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Left;
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 10F);
this.groupBox1.Location = new System.Drawing.Point(0, 126);
this.groupBox1.Location = new System.Drawing.Point(0, 132);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(480, 415);
this.groupBox1.Size = new System.Drawing.Size(480, 409);
this.groupBox1.TabIndex = 388;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "查询记录";
@ -503,7 +493,7 @@
this.dgvOperation.ReadOnly = true;
this.dgvOperation.RowTemplate.Height = 27;
this.dgvOperation.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvOperation.Size = new System.Drawing.Size(474, 391);
this.dgvOperation.Size = new System.Drawing.Size(474, 385);
this.dgvOperation.TabIndex = 386;
this.dgvOperation.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvOperation_CellDoubleClick);
//
@ -843,8 +833,8 @@
this.dgvDrugs.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvDrugs.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
this.dgvDrugs.EnableHeadersVisualStyles = false;
this.dgvDrugs.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229)))));
this.dgvDrugs.Location = new System.Drawing.Point(480, 126);
this.dgvDrugs.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(170)))), ((int)(((byte)(170)))), ((int)(((byte)(170)))));
this.dgvDrugs.Location = new System.Drawing.Point(480, 132);
this.dgvDrugs.Margin = new System.Windows.Forms.Padding(0);
this.dgvDrugs.MultiSelect = false;
this.dgvDrugs.Name = "dgvDrugs";
@ -860,7 +850,7 @@
this.dgvDrugs.RowTemplate.Height = 25;
this.dgvDrugs.ShowCellErrors = false;
this.dgvDrugs.ShowCellToolTips = false;
this.dgvDrugs.Size = new System.Drawing.Size(870, 415);
this.dgvDrugs.Size = new System.Drawing.Size(870, 409);
this.dgvDrugs.TabIndex = 389;
this.dgvDrugs.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDrugs_CellDoubleClick);
this.dgvDrugs.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvDrugs_RowPostPaint);
@ -875,6 +865,30 @@
this.dataGridViewTextBoxColumn21.Visible = false;
this.dataGridViewTextBoxColumn21.Width = 30;
//
// toolStrip1
//
this.toolStrip1.BackColor = System.Drawing.Color.AliceBlue;
this.toolStrip1.Font = new System.Drawing.Font("微软雅黑", 10.5F);
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(25, 25);
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(1350, 49);
this.toolStrip1.TabIndex = 36;
this.toolStrip1.Text = "toolStrip1";
//
// toolStripButton1
//
this.toolStripButton1.Font = new System.Drawing.Font("微软雅黑", 9F);
this.toolStripButton1.Image = global::AIMS.Properties.Resources._手术排程;
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(65, 46);
this.toolStripButton1.Text = "导出Excel";
this.toolStripButton1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.toolStripButton1.Click += new System.EventHandler(this.button1_Click);
//
// frmOperationCharg3
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -899,6 +913,8 @@
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvOperation)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvDrugs)).EndInit();
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
}
@ -930,7 +946,6 @@
private DevComponents.Editors.DateTimeAdv.DateTimeInput dtpEnd;
private DevComponents.Editors.DateTimeAdv.DateTimeInput dtpOpeTime;
public System.Windows.Forms.Label label24;
private System.Windows.Forms.Button button1;
private DevComponents.DotNetBar.Controls.ComboBoxEx cboRoom;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn18;
@ -970,5 +985,7 @@
private DevComponents.DotNetBar.Controls.DataGridViewX dgvDrugs;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn21;
private DevComponents.DotNetBar.ButtonX btnDelete;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton toolStripButton1;
}
}

View File

@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="Id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@ -28,9 +28,8 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.button1 = new System.Windows.Forms.Button();
this.toolStripButton10 = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
@ -72,6 +71,8 @@
this.dataGridViewTextBoxColumn29 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn30 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn31 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel4.SuspendLayout();
@ -79,35 +80,21 @@
((System.ComponentModel.ISupportInitialize)(this.dtpEnd)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtpOpeTime)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvtEMPOperationInfos)).BeginInit();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.Transparent;
this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.toolStrip1);
this.panel1.Controls.Add(this.toolStripButton10);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1350, 45);
this.panel1.Size = new System.Drawing.Size(1350, 53);
this.panel1.TabIndex = 0;
//
// button1
//
this.button1.Cursor = System.Windows.Forms.Cursors.Hand;
this.button1.Dock = System.Windows.Forms.DockStyle.Left;
this.button1.FlatAppearance.BorderSize = 0;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Font = new System.Drawing.Font("微软雅黑", 11F);
this.button1.Location = new System.Drawing.Point(0, 0);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(100, 45);
this.button1.TabIndex = 16;
this.button1.Text = "导出Excel";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// toolStripButton10
//
this.toolStripButton10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -135,7 +122,7 @@
this.panel2.Controls.Add(this.labDate);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.panel2.Location = new System.Drawing.Point(0, 45);
this.panel2.Location = new System.Drawing.Point(0, 53);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1350, 57);
this.panel2.TabIndex = 387;
@ -192,7 +179,7 @@
this.rdoJZ.Size = new System.Drawing.Size(55, 24);
this.rdoJZ.TabIndex = 0;
this.rdoJZ.Text = "耗材";
this.rdoJZ.UseVisualStyleBackColor = true;
this.rdoJZ.UseVisualStyleBackColor = true;
//
// rdoZQ
//
@ -204,7 +191,7 @@
this.rdoZQ.TabIndex = 0;
this.rdoZQ.TabStop = true;
this.rdoZQ.Text = "药品";
this.rdoZQ.UseVisualStyleBackColor = true;
this.rdoZQ.UseVisualStyleBackColor = true;
//
// dtpEnd
//
@ -314,18 +301,18 @@
this.dgvtEMPOperationInfos.BackgroundColor = System.Drawing.Color.White;
this.dgvtEMPOperationInfos.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dgvtEMPOperationInfos.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 10.5F);
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvtEMPOperationInfos.DefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 10.5F);
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvtEMPOperationInfos.DefaultCellStyle = dataGridViewCellStyle1;
this.dgvtEMPOperationInfos.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvtEMPOperationInfos.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
this.dgvtEMPOperationInfos.GridColor = System.Drawing.Color.Black;
this.dgvtEMPOperationInfos.Location = new System.Drawing.Point(0, 102);
this.dgvtEMPOperationInfos.Location = new System.Drawing.Point(0, 110);
this.dgvtEMPOperationInfos.MultiSelect = false;
this.dgvtEMPOperationInfos.Name = "dgvtEMPOperationInfos";
this.dgvtEMPOperationInfos.ReadOnly = true;
@ -333,7 +320,7 @@
this.dgvtEMPOperationInfos.RowTemplate.Height = 23;
this.dgvtEMPOperationInfos.ShowCellErrors = false;
this.dgvtEMPOperationInfos.ShowCellToolTips = false;
this.dgvtEMPOperationInfos.Size = new System.Drawing.Size(1350, 439);
this.dgvtEMPOperationInfos.Size = new System.Drawing.Size(1350, 431);
this.dgvtEMPOperationInfos.TabIndex = 389;
//
// dataGridViewTextBoxColumn1
@ -579,6 +566,30 @@
this.dataGridViewTextBoxColumn31.Visible = false;
this.dataGridViewTextBoxColumn31.Width = 60;
//
// toolStrip1
//
this.toolStrip1.BackColor = System.Drawing.Color.AliceBlue;
this.toolStrip1.Font = new System.Drawing.Font("微软雅黑", 10.5F);
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(25, 25);
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(1350, 49);
this.toolStrip1.TabIndex = 37;
this.toolStrip1.Text = "toolStrip1";
//
// toolStripButton1
//
this.toolStripButton1.Font = new System.Drawing.Font("微软雅黑", 9F);
this.toolStripButton1.Image = global::AIMS.Properties.Resources._手术排程;
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(65, 46);
this.toolStripButton1.Text = "导出Excel";
this.toolStripButton1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.toolStripButton1.Click += new System.EventHandler(this.button1_Click);
//
// frmOperationCharg4
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -591,6 +602,7 @@
this.Text = "费用统计";
this.Load += new System.EventHandler(this.frmOperationDruggCheck_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.panel4.ResumeLayout(false);
@ -600,6 +612,8 @@
((System.ComponentModel.ISupportInitialize)(this.dtpEnd)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dtpOpeTime)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvtEMPOperationInfos)).EndInit();
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
}
@ -631,7 +645,6 @@
private DevComponents.Editors.DateTimeAdv.DateTimeInput dtpEnd;
private DevComponents.Editors.DateTimeAdv.DateTimeInput dtpOpeTime;
public System.Windows.Forms.Label label24;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn18;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn19;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn20;
@ -649,5 +662,7 @@
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.RadioButton rdoHs;
private System.Windows.Forms.RadioButton rdoMz;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton toolStripButton1;
}
}

View File

@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -63,7 +63,7 @@ namespace AIMS.OperationAfter.UI
tokenEditor1.SelectedTokens.Add(tokenEditor1.Tokens[4]);
List<OperationRoom> rooms = BOperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'");
List<OperationRoom> rooms = BOperationRoom.GetOperationRooms("IsValid=1 and Site<>'恢复室'");
foreach (var item in rooms)
{
tokenEditor2.Tokens.Add(new DevComponents.DotNetBar.Controls.EditToken(item.Id.ToString(), item.Name));

View File

@ -118,6 +118,7 @@
this.dataGridViewTextBoxColumn30 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn31 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn32 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
this.panel1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.panel2.SuspendLayout();
@ -144,6 +145,7 @@
this.tsbEditApply,
this.toolStripSeparator1,
this.tsbOperationReview,
this.toolStripButton2,
this.toolStripSeparator4,
this.tsbOperationRecover,
this.toolStripSeparator3,
@ -883,6 +885,18 @@
this.dataGridViewTextBoxColumn32.HeaderText = "归档时间";
this.dataGridViewTextBoxColumn32.Name = "dataGridViewTextBoxColumn32";
//
// toolStripButton2
//
this.toolStripButton2.Font = new System.Drawing.Font("微软雅黑", 9F);
this.toolStripButton2.Image = global::AIMS.Properties.Resources._回顾手术;
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.Size = new System.Drawing.Size(68, 48);
this.toolStripButton2.Text = " 回顾镇痛";
this.toolStripButton2.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.toolStripButton2.Visible = false;
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
//
// frmOperationReview
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -1002,5 +1016,6 @@
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn30;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn31;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn32;
private System.Windows.Forms.ToolStripButton toolStripButton2;
}
}

View File

@ -146,5 +146,25 @@ namespace AIMS.OperationAfter.UI
}
}
private void toolStripButton2_Click(object sender, EventArgs e)
{
if (dgv.Rows.Count > 0)
{
int PatientId = int.Parse(dgv.CurrentRow.Cells["PatientId"].Value.ToString());
int ApplyId = int.Parse(dgv.CurrentRow.Cells["ApplyId"].Value.ToString());
AIMS.OperationAanesthesia.frmAanesthesiaRecord frmAnasRecord = new AIMS.OperationAanesthesia.frmAanesthesiaRecord();
frmAnasRecord.PatientId = PatientId;
frmAnasRecord.ApplyId = ApplyId;
frmAnasRecord.State = AIMSExtension.EditState.BROWSE;
frmAnasRecord.ShowDialog();
}
else
{
MessageBox.Show("请选择患者");
}
}
}
}

View File

@ -219,4 +219,103 @@
<metadata name="MedicalRecordtIME.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="CheckBoxColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PatientId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ApplyId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MdrecNoColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ArchivesNoColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ApplyDepNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PatientKindColume.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="PatientNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SexColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="BirthDayColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="HeightColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="WeightColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="BloodTypeColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RHBloodTypeColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="IlldistrictColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="SickBedColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="OperationTypeColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="StateColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="OperationBeginTimeColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="OperationEndTimeColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="DiagnoseInfoNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="OperationInfoNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="AnaesthesiaMethodNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="OperationCutTypeNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="OperationBodyPositionNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="OperationPositionNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="OperationDoctorColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="AnesthesiaDoctorColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="AssistantColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="NurseColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RemarksColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MedicalRecord.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="MedicalRecordtIME.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@ -0,0 +1,328 @@
using AIMS.OperationAanesthesia;
using AIMS.OperationAfter.UI;
using AIMSBLL;
using AIMSExtension;
using AIMSModel;
using Microsoft.Office.Interop.Excel;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
namespace AIMS
{
public partial class frmReportExport : Form
{
public frmReportExport()
{
InitializeComponent();
}
private void frmOperationDruggCheck_Load(object sender, EventArgs e)
{
try
{
dtpOpeTime.Value = DateTime.Now;
dtpEnd.Value = dtpOpeTime.Value;
}
catch (Exception exp)
{
PublicMethod.WriteLog(exp);
}
}
public SysConfig exportConfig;
public string DataGridViewPath = "";
public DataGridView selectdgv;
private void btn手术例数按月统计_Click(object sender, EventArgs e)
{
selectdgv = dgvtReport;
ControlExtension.SetDgvAttribute(selectdgv);
DataGridViewPath = GetControlPath(selectdgv);
exportConfig = BSysConfig.SelectSingle(" Note='" + DataGridViewPath + "'", null, RecursiveType.None, 0);
if (exportConfig != null)
ConfigDataGridView(exportConfig, selectdgv);
string beginTime = Convert.ToDateTime(dtpOpeTime.Value).ToString("yyyy-MM-dd 00:00:00");
string endTime = Convert.ToDateTime(dtpEnd.Value).ToString("yyyy-MM-dd 23:59:59");
string sql = string.Format(" ExecTime>='{0}' and ExecTime<'{1}'", beginTime, endTime);
System.Data.DataTable MonthDay = BOperationReport.GetMonthDay();
MonthDay.Rows.Clear();
System.Data.DataTable dataResult = BOperationReport.Get手术例数按月统计(beginTime, endTime);
List<string> Months = new List<string>();
foreach (DataRow row in dataResult.Rows)
{
string month = row["OpeMonth"].ToString();
if (!Months.Contains(month))
{
Months.Add(month);
}
}
foreach (string month in Months)
{
DataRow row = MonthDay.NewRow();
row["月份"] = month;
MonthDay.Rows.Add(row);
}
foreach (DataRow month in MonthDay.Rows)
{
foreach (DataRow row in dataResult.Rows)
{
if (month[0].ToString() == row["OpeMonth"].ToString())
{
string day = row["OpeDay"].ToString();
string num = row["num"].ToString();
month[DateTime.Parse(day).Day] = num;
}
}
}
foreach (DataRow month in MonthDay.Rows)
{
int SumValue = 0;
foreach (DataColumn item in MonthDay.Columns)
{
if (item.ColumnName != "月份" && month[item].ToString() != "")
{
SumValue += int.Parse(month[item].ToString());
}
}
month["合计"] = SumValue;
}
dgvtReport.DataSource = MonthDay;
}
private void dgvtReport_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
//隔行换色
this.dgvtReport.RowsDefaultCellStyle.BackColor = System.Drawing.Color.White;//设置背景为白色
this.dgvtReport.AlternatingRowsDefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(212)))), ((int)(((byte)(242)))), (((int)(((byte)242)))));//青色
}
private static string GetControlPath(Control control)
{
StringBuilder controlPathStringBuilder = new StringBuilder();
controlPathStringBuilder.Append(control.Name);
while (control.Parent != null)
{
control = control.Parent;
controlPathStringBuilder.Append("." + control.Name);
}
return controlPathStringBuilder.ToString();
}
public ExportConfig dataGridViewSetting;
private void ConfigDataGridView(SysConfig exportConfig, DataGridView dgv)
{
try
{
dataGridViewSetting = JsonConvert.DeserializeObject<ExportConfig>(exportConfig.Value);
foreach (DataGridViewColumn column in dgv.Columns)
{
foreach (var item in dataGridViewSetting.exports)
{
if (column.Name == item.Name)
{
column.Visible = item.IsVisible;
column.Width = item.Width;
}
}
}
}
catch (Exception ex)
{
PublicMethod.WriteLog(ex);
}
}
private void tspSetting_Click(object sender, EventArgs e)
{
frmExportConfig formDataGridViewConfig = new frmExportConfig(selectdgv, exportConfig, DataGridViewPath, this.Text);
if (formDataGridViewConfig.ShowDialog() == DialogResult.OK)
{
exportConfig = formDataGridViewConfig.exportConfig;
ConfigDataGridView(formDataGridViewConfig.exportConfig, selectdgv);
}
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
//DataToExcel(dgv);
KillAllExcel();
ExprotExcel2();
}
private Microsoft.Office.Interop.Excel.Application myExcel = null;
private void ExprotExcel2(bool isPrint = false)
{
//自定义表头
string title = "查询管理数据";
if (dataGridViewSetting != null) title = dataGridViewSetting.Title;
//是否横向
bool xlLandscape = true;
if (dataGridViewSetting != null && dataGridViewSetting.Landscape == false) xlLandscape = false;
//主体字体大小
int BodySize = 9;
if (dataGridViewSetting != null && dataGridViewSetting.FontSize > 0) BodySize = dataGridViewSetting.FontSize;
myExcel = new Microsoft.Office.Interop.Excel.Application();
this.Cursor = Cursors.WaitCursor;
//保存文化环境
System.Globalization.CultureInfo CurrentCI = System.Threading.Thread.CurrentThread.CurrentCulture;
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
Workbook workbookData = myExcel.Workbooks.Add(Missing.Value);
Worksheet xlSheet = (Microsoft.Office.Interop.Excel.Worksheet)workbookData.Worksheets[1];
xlSheet.Name = title;
if (isPrint == false)
myExcel.Visible = true;
myExcel.Cells[1, 1] = title;//默认的就是在sheet1里面的。
WorksheetClass wsClass = new WorksheetClass();
Dictionary<int, string> Columns = new Dictionary<int, string>();
//填充标题
for (int i = 0; i < selectdgv.Columns.Count; i++)
{
if (dataGridViewSetting != null)
{
foreach (var item in dataGridViewSetting.exports)
{
if (selectdgv.Columns[i].Name == item.Name)
{
if (item.IsPrint == true)
{
Columns.Add(i, selectdgv.Columns[i].HeaderText);
continue;
}
}
}
}
else
{
if (selectdgv.Columns[i].Visible == true)
Columns.Add(i, selectdgv.Columns[i].HeaderText);
}
}
List<KeyValuePair<int, string>> ColumnsStr = Columns.ToList();
for (int i = 0; i < ColumnsStr.Count; i++)
{
myExcel.Cells[2, i + 1] = ColumnsStr[i].Value;
if (dataGridViewSetting != null)
{
foreach (var item in dataGridViewSetting.exports)
{
if (ColumnsStr[i].Value == item.Text)
{
xlSheet.get_Range(xlSheet.Cells[2, i + 1], xlSheet.Cells[2, i + 1]).ColumnWidth = item.PrintWidth;//列宽
}
}
}
else
{
xlSheet.get_Range(xlSheet.Cells[2, i + 1], xlSheet.Cells[2, i + 1]).ColumnWidth = 5;//列宽
}
}
//获得数据表的值
int RowCount = selectdgv.Rows.Count;
int colCount = ColumnsStr.Count;
//设置填充单元格样式
xlSheet.get_Range(xlSheet.Cells[2, 1], xlSheet.Cells[RowCount + 2, colCount]).Borders.LineStyle = XlLineStyle.xlContinuous;//边框的样式
object[,] objData = new object[RowCount, colCount];
//将DataTable里的值填充到对象数组中
for (int i = 0; i < RowCount; i++)
{
for (int j = 0; j < colCount; j++)
{
if (selectdgv.Columns[ColumnsStr[j].Key].Name == "序号" || selectdgv.Columns[ColumnsStr[j].Key].Name == "ApplyId")
objData[i, j] = i + 1;
else if (selectdgv.Rows[i].Cells[ColumnsStr[j].Key].Value != null)
objData[i, j] = selectdgv.Rows[i].Cells[ColumnsStr[j].Key].Value.ToString();
}
System.Windows.Forms.Application.DoEvents();
}
//将对象数组的值赋值给Excel
Range range = xlSheet.get_Range(xlSheet.Cells[3, 1], xlSheet.Cells[RowCount + 2, colCount]);
range.Value2 = objData;
//xlSheet.get_Range(xlSheet.Cells[2, 1], xlSheet.Cells[RowCount + 2, colCount]).Font.Size = BodySize;//字体大小
//设置主标题单元格的样式
xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).MergeCells = true;//合并单元格
xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).HorizontalAlignment = XlHAlign.xlHAlignCenter;//水平对齐方式
xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).VerticalAlignment = XlVAlign.xlVAlignBottom;//垂直对齐方式
xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).Font.Bold = true;//字体加粗
xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).Font.ColorIndex = 0;//字体颜色
//xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).Font.Italic = true;//是否斜体
xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).Font.Size = 22;//字体大小
xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).Borders.LineStyle = XlLineStyle.xlContinuous;//边框样式
xlSheet.get_Range(xlSheet.Cells[1, 1], xlSheet.Cells[1, colCount]).RowHeight = 33.75;//行高
//设置标题单元格样式
xlSheet.get_Range(xlSheet.Cells[2, 1], xlSheet.Cells[2, colCount]).RowHeight = 22.75;//行高
if (xlLandscape == true)
xlSheet.PageSetup.Orientation = XlPageOrientation.xlLandscape;//页面方向为横向
//复苏文化环境
System.Threading.Thread.CurrentThread.CurrentCulture = CurrentCI;
try
{
if (isPrint == true)
xlSheet.PrintOutEx();
//myExcel.Save(@"D:a.xls");
//myExcel.Quit();
this.Cursor = Cursors.Default;
//MessageBox.Show("导出成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
finally
{
if (isPrint == true)
{
//释放资源
System.Runtime.InteropServices.Marshal.ReleaseComObject(xlSheet);
System.Runtime.InteropServices.Marshal.ReleaseComObject(workbookData);
System.Runtime.InteropServices.Marshal.ReleaseComObject(range);
System.Runtime.InteropServices.Marshal.ReleaseComObject(myExcel);
GC.Collect();
range = null;
xlSheet = null;
workbookData = null;
myExcel = null;
KillAllExcel();
}
}
}
private void KillAllExcel()
{
List<Process> excelProcess = GetExcelProcesses();
for (int i = 0; i < excelProcess.Count; i++)
{
excelProcess[i].Kill();
}
}
private List<Process> GetExcelProcesses()
{
Process[] processes = Process.GetProcesses();
List<Process> excelProcesses = new List<Process>();
for (int i = 0; i < processes.Length; i++)
{
if (processes[i].ProcessName.ToUpper() == "EXCEL")
excelProcesses.Add(processes[i]);
}
return excelProcesses;
}
}
}

View File

@ -0,0 +1,347 @@
namespace AIMS
{
partial class frmReportExport
{
/// <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()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.superTabControl1 = new DevComponents.DotNetBar.SuperTabControl();
this.superTabControlPanel1 = new DevComponents.DotNetBar.SuperTabControlPanel();
this.dgvtReport = new System.Windows.Forms.DataGridView();
this.panel2 = new System.Windows.Forms.Panel();
this.dtpEnd = new DevComponents.Editors.DateTimeAdv.DateTimeInput();
this.dtpOpeTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput();
this.label24 = new System.Windows.Forms.Label();
this.btn手术例数按月统计 = new DevComponents.DotNetBar.ButtonX();
this.labDate = new System.Windows.Forms.Label();
this.R1 = new DevComponents.DotNetBar.SuperTabItem();
this.tspSetting = new System.Windows.Forms.ToolStripButton();
this.toolStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.superTabControl1)).BeginInit();
this.superTabControl1.SuspendLayout();
this.superTabControlPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvtReport)).BeginInit();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dtpEnd)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtpOpeTime)).BeginInit();
this.SuspendLayout();
//
// toolStrip1
//
this.toolStrip1.BackColor = System.Drawing.Color.AliceBlue;
this.toolStrip1.Font = new System.Drawing.Font("微软雅黑", 10.5F);
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(25, 25);
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tspSetting,
this.toolStripButton1});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(1350, 49);
this.toolStrip1.TabIndex = 37;
this.toolStrip1.Text = "toolStrip1";
//
// toolStripButton1
//
this.toolStripButton1.Font = new System.Drawing.Font("微软雅黑", 9F);
this.toolStripButton1.Image = global::AIMS.Properties.Resources._手术排程;
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(65, 46);
this.toolStripButton1.Text = "导出Excel";
this.toolStripButton1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
// superTabControl1
//
this.superTabControl1.BackColor = System.Drawing.Color.White;
//
//
//
//
//
//
this.superTabControl1.ControlBox.CloseBox.Name = "";
//
//
//
this.superTabControl1.ControlBox.MenuBox.Name = "";
this.superTabControl1.ControlBox.Name = "";
this.superTabControl1.ControlBox.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
this.superTabControl1.ControlBox.MenuBox,
this.superTabControl1.ControlBox.CloseBox});
this.superTabControl1.Controls.Add(this.superTabControlPanel1);
this.superTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.superTabControl1.ForeColor = System.Drawing.Color.Black;
this.superTabControl1.Location = new System.Drawing.Point(0, 49);
this.superTabControl1.Name = "superTabControl1";
this.superTabControl1.ReorderTabsEnabled = true;
this.superTabControl1.SelectedTabFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold);
this.superTabControl1.SelectedTabIndex = 0;
this.superTabControl1.Size = new System.Drawing.Size(1350, 492);
this.superTabControl1.TabFont = new System.Drawing.Font("微软雅黑", 10F);
this.superTabControl1.TabIndex = 38;
this.superTabControl1.Tabs.AddRange(new DevComponents.DotNetBar.BaseItem[] {
this.R1});
this.superTabControl1.Text = "superTabControl1";
//
// superTabControlPanel1
//
this.superTabControlPanel1.Controls.Add(this.dgvtReport);
this.superTabControlPanel1.Controls.Add(this.panel2);
this.superTabControlPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.superTabControlPanel1.Location = new System.Drawing.Point(0, 28);
this.superTabControlPanel1.Name = "superTabControlPanel1";
this.superTabControlPanel1.Size = new System.Drawing.Size(1350, 464);
this.superTabControlPanel1.TabIndex = 1;
this.superTabControlPanel1.TabItem = this.R1;
//
// dgvtReport
//
this.dgvtReport.AllowUserToAddRows = false;
this.dgvtReport.AllowUserToDeleteRows = false;
this.dgvtReport.AllowUserToResizeColumns = false;
this.dgvtReport.AllowUserToResizeRows = false;
this.dgvtReport.BackgroundColor = System.Drawing.Color.White;
this.dgvtReport.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
this.dgvtReport.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
this.dgvtReport.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 9F);
dataGridViewCellStyle11.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvtReport.DefaultCellStyle = dataGridViewCellStyle11;
this.dgvtReport.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvtReport.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
this.dgvtReport.GridColor = System.Drawing.Color.Black;
this.dgvtReport.Location = new System.Drawing.Point(0, 57);
this.dgvtReport.MultiSelect = false;
this.dgvtReport.Name = "dgvtReport";
this.dgvtReport.ReadOnly = true;
dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvtReport.RowHeadersDefaultCellStyle = dataGridViewCellStyle12;
this.dgvtReport.RowHeadersVisible = false;
this.dgvtReport.RowTemplate.Height = 23;
this.dgvtReport.ShowCellErrors = false;
this.dgvtReport.ShowCellToolTips = false;
this.dgvtReport.Size = new System.Drawing.Size(1350, 407);
this.dgvtReport.TabIndex = 391;
this.dgvtReport.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvtReport_RowPostPaint);
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.WhiteSmoke;
this.panel2.Controls.Add(this.dtpEnd);
this.panel2.Controls.Add(this.dtpOpeTime);
this.panel2.Controls.Add(this.label24);
this.panel2.Controls.Add(this.btn手术例数按月统计);
this.panel2.Controls.Add(this.labDate);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1350, 57);
this.panel2.TabIndex = 390;
//
// dtpEnd
//
//
//
//
this.dtpEnd.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dtpEnd.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown;
this.dtpEnd.ButtonDropDown.Visible = true;
this.dtpEnd.CustomFormat = "yyyy-MM-dd";
this.dtpEnd.FocusHighlightColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(186)))), ((int)(((byte)(179)))));
this.dtpEnd.Font = new System.Drawing.Font("微软雅黑", 9F);
this.dtpEnd.Format = DevComponents.Editors.eDateTimePickerFormat.Custom;
this.dtpEnd.IsPopupCalendarOpen = false;
this.dtpEnd.Location = new System.Drawing.Point(224, 16);
//
//
//
//
//
//
this.dtpEnd.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
//
//
//
this.dtpEnd.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dtpEnd.MonthCalendar.DisplayMonth = new System.DateTime(2017, 11, 1, 0, 0, 0, 0);
//
//
//
this.dtpEnd.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dtpEnd.Name = "dtpEnd";
this.dtpEnd.Size = new System.Drawing.Size(114, 23);
this.dtpEnd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.dtpEnd.TabIndex = 472;
//
// dtpOpeTime
//
//
//
//
this.dtpOpeTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dtpOpeTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown;
this.dtpOpeTime.ButtonDropDown.Visible = true;
this.dtpOpeTime.CustomFormat = "yyyy-MM-dd";
this.dtpOpeTime.FocusHighlightColor = System.Drawing.Color.FromArgb(((int)(((byte)(46)))), ((int)(((byte)(186)))), ((int)(((byte)(179)))));
this.dtpOpeTime.Font = new System.Drawing.Font("微软雅黑", 9F);
this.dtpOpeTime.Format = DevComponents.Editors.eDateTimePickerFormat.Custom;
this.dtpOpeTime.IsPopupCalendarOpen = false;
this.dtpOpeTime.Location = new System.Drawing.Point(91, 16);
//
//
//
//
//
//
this.dtpOpeTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
//
//
//
this.dtpOpeTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dtpOpeTime.MonthCalendar.DisplayMonth = new System.DateTime(2017, 11, 1, 0, 0, 0, 0);
//
//
//
this.dtpOpeTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dtpOpeTime.Name = "dtpOpeTime";
this.dtpOpeTime.Size = new System.Drawing.Size(114, 23);
this.dtpOpeTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.dtpOpeTime.TabIndex = 471;
//
// label24
//
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(208, 18);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(15, 20);
this.label24.TabIndex = 470;
this.label24.Text = "-";
//
// btn手术例数按月统计
//
this.btn手术例数按月统计.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
this.btn手术例数按月统计.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
this.btn手术例数按月统计.Font = new System.Drawing.Font("微软雅黑", 11.5F);
this.btn手术例数按月统计.Location = new System.Drawing.Point(356, 14);
this.btn手术例数按月统计.Name = "btn手术例数按月统计";
this.btn手术例数按月统计.Size = new System.Drawing.Size(90, 29);
this.btn手术例数按月统计.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btn手术例数按月统计.TabIndex = 467;
this.btn手术例数按月统计.Text = "查询";
this.btn手术例数按月统计.Click += new System.EventHandler(this.btn手术例数按月统计_Click);
//
// labDate
//
this.labDate.AutoSize = true;
this.labDate.Location = new System.Drawing.Point(17, 16);
this.labDate.Name = "labDate";
this.labDate.Size = new System.Drawing.Size(68, 20);
this.labDate.TabIndex = 421;
this.labDate.Text = "查询时间:";
//
// R1
//
this.R1.AttachedControl = this.superTabControlPanel1;
this.R1.GlobalItem = false;
this.R1.Name = "R1";
this.R1.Text = "手术例数按月统计表";
//
// tspSetting
//
this.tspSetting.Font = new System.Drawing.Font("微软雅黑", 9F);
this.tspSetting.Image = global::AIMS.Properties.Resources._设置;
this.tspSetting.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tspSetting.Name = "tspSetting";
this.tspSetting.Size = new System.Drawing.Size(68, 46);
this.tspSetting.Text = " 导出设置";
this.tspSetting.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.tspSetting.Click += new System.EventHandler(this.tspSetting_Click);
//
// frmReportExport
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1350, 541);
this.Controls.Add(this.superTabControl1);
this.Controls.Add(this.toolStrip1);
this.Name = "frmReportExport";
this.Text = "报表统计";
this.Load += new System.EventHandler(this.frmOperationDruggCheck_Load);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.superTabControl1)).EndInit();
this.superTabControl1.ResumeLayout(false);
this.superTabControlPanel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvtReport)).EndInit();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dtpEnd)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dtpOpeTime)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton toolStripButton1;
private DevComponents.DotNetBar.SuperTabControl superTabControl1;
private DevComponents.DotNetBar.SuperTabControlPanel superTabControlPanel1;
private DevComponents.DotNetBar.SuperTabItem R1;
private System.Windows.Forms.DataGridView dgvtReport;
private System.Windows.Forms.Panel panel2;
private DevComponents.Editors.DateTimeAdv.DateTimeInput dtpEnd;
private DevComponents.Editors.DateTimeAdv.DateTimeInput dtpOpeTime;
public System.Windows.Forms.Label label24;
private DevComponents.DotNetBar.ButtonX btn手术例数按月统计;
public System.Windows.Forms.Label labDate;
private System.Windows.Forms.ToolStripButton tspSetting;
}
}

View File

@ -0,0 +1,123 @@
<?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="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -338,7 +338,7 @@ namespace AIMS
public static List<OperationRoom> SiteRooms;
public static void GetOperationSiteRoom(Label labelSite, ComboBoxEx comboBoxEx, ComboBox cboRoom)
{
if (PublicMethod.OperationSite.Count == 1)
if (PublicMethod.OperationSite.Count <= 2)
{
labelSite.Visible = false;
comboBoxEx.Visible = false;

View File

@ -42,7 +42,7 @@ namespace AIMS
// /*1.2 已经有一个实例在运行*/
// HandleRunningInstance(instance);
//}
}
}
static void PreLoad()
{
string msg = DCSoft.Writer.Controls.WriterControl.CheckSystemEnvironment(false);
@ -126,8 +126,16 @@ namespace AIMS
{
try
{
MessageBox.Show(e.Exception.Message + "\r\n" + e.Exception.StackTrace, "系统信息");
AIMSExtension.PublicMethod.WriteLog(e.Exception);
if (e.Exception.Message.Contains("error: 40"))
{
MessageBox.Show("当前网络异常 请检查网络!!!", "系统信息");
AIMSExtension.PublicMethod.WriteLog(e.Exception);
}
else
{
MessageBox.Show(e.Exception.Message + "\r\n" + e.Exception.StackTrace, "系统信息");
AIMSExtension.PublicMethod.WriteLog(e.Exception);
}
}
catch
{

View File

@ -61,6 +61,7 @@
<Compile Include="DAL\AutoGenerate\DOperationRecordAnalgesia.cs" />
<Compile Include="DAL\Extension\DFeesRecord.cs" />
<Compile Include="DAL\Extension\DFeesRecordReport.cs" />
<Compile Include="Extensions\BOperationReport.cs" />
<Compile Include="Model\AutoGenerate\FeesRecord.cs" />
<Compile Include="BLL\AutoGenerate\BAdverseEvent.cs" />
<Compile Include="BLL\AutoGenerate\BAnaesthesiaEvents.cs" />

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Xml;
using AIMSModel;
using HelperDB;
using DrawGraph;
using AIMSExtension;
namespace AIMSBLL
{
public class BOperationReport
{
public static DataTable GetMonthDay()
{
string strSql = " select '月份' as '月份', 1 as '1',2 as '2',3 as '3',4 as '4',5 as '5',6 as '6',7 as '7',8 as '8',9 as '9',10 as '10', 11 as '11', 12 as '12', 13 as '13', 14 as '14', 15 as '15', 16 as '16', 17 as '17', 18 as '18', 19 as '19', 20 as '20', 21 as '21', 22 as '22', 23 as '23', 24 as '24', 25 as '25', 26 as '26', 27 as '27', 28 as '28', 29 as '29', 30 as '30', 31 as '31' ,'合计' as '合计'";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
public static DataTable Get手术例数按月统计(string beginTime, string endTime)
{
string strSql = "SELECT OpeMonth, OpeDAY,COUNT(*) num FROM [dbo].[V_OperationRecordInfo] where State='手术结束' and InRoomTime>'" + beginTime + "' and InRoomTime<'" + endTime + "' group by OpeMonth,OpeDAY";
return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
}
}
}

View File

@ -198,28 +198,67 @@ namespace DrawGraph
}
if (AfterDrugsListstr.Count > 0)
{
packObj2.PackText = "";
foreach (var item in AfterDrugsListstr)
{
packObj2.PackText += item + "\n";
}
packObj2.PackValue = packObj2.PackText;
packObj2.Draw();
SetRemarkInfo(AfterDrugsListstr, packObj2, 15, 6.5f, 40);
//packObj2.PackText = "";
//foreach (var item in AfterDrugsListstr)
//{
// packObj2.PackText += item ;//+ "\n"
//}
//packObj2.PackValue = packObj2.PackText;
//packObj2.Draw();
}
}
TextPackObj packObj = template.GetPackObjectOTag<TextPackObj>("IconManage_TextPackObj_40_OperationRecord_AnalgesiaRecord_Extend3");
if (packObj != null && eventListstr.Count > 1)
{
packObj.PackText = "";
List<string> Eventststr = new List<string>();
foreach (var item in eventListstr)
{
if (item != "【事件】")
packObj.PackText += ((item.Substring(1, item.Length - 1)) + "\n");
Eventststr.Add(((item.Substring(1, item.Length - 1))));
}
packObj.PackValue = packObj.PackText;
packObj.Draw();
if (Eventststr.Count > 0)
{
SetRemarkInfo(Eventststr, packObj, 15, 7f, 38);
}
//packObj.PackText = "";
//foreach (var item in eventListstr)
//{
// if (item != "【事件】")
// packObj.PackText += ((item.Substring(1, item.Length - 1)) + "\n");
//}
//packObj.PackValue = packObj.PackText;
//packObj.Draw();
}
}
private void SetRemarkInfo(List<string> PunctureAndIntubatios, TextPackObj remarkPpack, int remarkRowscount, float fontsize, int fontlength)
{
int remarkRow = 0;
int AllRemarkRow = 0;
double lastIndex = remarkPpack.RealEndY;
double x = remarkPpack.RealX;
double y = remarkPpack.RealY + getYPositionByListIndex(remarkRow, remarkPpack.RealY, lastIndex, remarkRowscount);
if (PunctureAndIntubatios != null && PunctureAndIntubatios.Count > 1)
{
foreach (string item in PunctureAndIntubatios)
{
List<string> PunStr = stringformat(item, fontlength);
for (int m = 0; m < PunStr.Count; m++)
{
if (PunStr[m] == null) continue;
y = remarkPpack.RealY + getYPositionByListIndex(remarkRow, remarkPpack.RealY, lastIndex, remarkRowscount);
if (PunStr[m] == null || PunStr[m].Trim() == "") break;
ZUtil.DrawText(PunStr[m], x, y, ZedControl, fontsize, "IconDrugRemarkRow" + AllRemarkRow);
remarkRow++;
AllRemarkRow++;
}
}
}
}
private static void ListAddDrugs(List<string> DrugListstr, FactDrug temp)
{
string dose = "";

View File

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