diff --git a/AIMS/AIMS.csproj b/AIMS/AIMS.csproj index 3a96e30..6e8a9ec 100644 --- a/AIMS/AIMS.csproj +++ b/AIMS/AIMS.csproj @@ -285,6 +285,12 @@ frmOperationCharg2.cs + + Form + + + frmReportExport.cs + Form @@ -951,6 +957,9 @@ frmOperationCharg2.cs + + frmReportExport.cs + frmOperationCharg5.cs diff --git a/AIMS/AIMS.xml b/AIMS/AIMS.xml index 8facc04..093bb06 100644 --- a/AIMS/AIMS.xml +++ b/AIMS/AIMS.xml @@ -1,6 +1,6 @@  - Data Source=.;Initial Catalog=AIMSDB_DLSJZQZYYY;User ID=sa;Password=Test2020; + Data Source=.;Initial Catalog=AIMSDB_QHDSGRYY;User ID=sa;Password=Test2020; Data Source=.;Initial Catalog=AIMSDB_DATA;User ID=sa;Password=Test2020; Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.7)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl2))));Persist Security Info=True;User ID=smview;Password=i39; diff --git a/AIMS/DocManager/frmDocument3.cs b/AIMS/DocManager/frmDocument3.cs index 3aa8923..857a650 100644 --- a/AIMS/DocManager/frmDocument3.cs +++ b/AIMS/DocManager/frmDocument3.cs @@ -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); } } diff --git a/AIMS/FormMainManage.cs b/AIMS/FormMainManage.cs index 7b80ce5..815d8da 100644 --- a/AIMS/FormMainManage.cs +++ b/AIMS/FormMainManage.cs @@ -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")) { diff --git a/AIMS/OperationAfter/frmOperationCharg3.designer.cs b/AIMS/OperationAfter/frmOperationCharg3.designer.cs index 6141745..62dd8cd 100644 --- a/AIMS/OperationAfter/frmOperationCharg3.designer.cs +++ b/AIMS/OperationAfter/frmOperationCharg3.designer.cs @@ -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; } } \ No newline at end of file diff --git a/AIMS/OperationAfter/frmOperationCharg3.resx b/AIMS/OperationAfter/frmOperationCharg3.resx index 06aed97..d31aea4 100644 --- a/AIMS/OperationAfter/frmOperationCharg3.resx +++ b/AIMS/OperationAfter/frmOperationCharg3.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + True diff --git a/AIMS/OperationAfter/frmOperationCharg4.designer.cs b/AIMS/OperationAfter/frmOperationCharg4.designer.cs index 8585ee9..2218784 100644 --- a/AIMS/OperationAfter/frmOperationCharg4.designer.cs +++ b/AIMS/OperationAfter/frmOperationCharg4.designer.cs @@ -28,9 +28,8 @@ /// 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; } } \ No newline at end of file diff --git a/AIMS/OperationAfter/frmOperationCharg4.resx b/AIMS/OperationAfter/frmOperationCharg4.resx index 1af7de1..5da7a24 100644 --- a/AIMS/OperationAfter/frmOperationCharg4.resx +++ b/AIMS/OperationAfter/frmOperationCharg4.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file diff --git a/AIMS/OperationAfter/frmOperationManage.cs b/AIMS/OperationAfter/frmOperationManage.cs index 046500e..5035605 100644 --- a/AIMS/OperationAfter/frmOperationManage.cs +++ b/AIMS/OperationAfter/frmOperationManage.cs @@ -63,7 +63,7 @@ namespace AIMS.OperationAfter.UI tokenEditor1.SelectedTokens.Add(tokenEditor1.Tokens[4]); - List rooms = BOperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'"); + List 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)); diff --git a/AIMS/OperationAfter/frmOperationReview.Designer.cs b/AIMS/OperationAfter/frmOperationReview.Designer.cs index 913b74b..77cdee5 100644 --- a/AIMS/OperationAfter/frmOperationReview.Designer.cs +++ b/AIMS/OperationAfter/frmOperationReview.Designer.cs @@ -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; } } \ No newline at end of file diff --git a/AIMS/OperationAfter/frmOperationReview.cs b/AIMS/OperationAfter/frmOperationReview.cs index 53e0d75..ea8dda4 100644 --- a/AIMS/OperationAfter/frmOperationReview.cs +++ b/AIMS/OperationAfter/frmOperationReview.cs @@ -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("请选择患者"); + } + } } } diff --git a/AIMS/OperationAfter/frmOperationReview.resx b/AIMS/OperationAfter/frmOperationReview.resx index 64f5387..839674c 100644 --- a/AIMS/OperationAfter/frmOperationReview.resx +++ b/AIMS/OperationAfter/frmOperationReview.resx @@ -219,4 +219,103 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + \ No newline at end of file diff --git a/AIMS/OperationAfter/frmReportExport.cs b/AIMS/OperationAfter/frmReportExport.cs new file mode 100644 index 0000000..6dde626 --- /dev/null +++ b/AIMS/OperationAfter/frmReportExport.cs @@ -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 Months = new List(); + 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.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 Columns = new Dictionary(); + //填充标题 + 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> 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 excelProcess = GetExcelProcesses(); + for (int i = 0; i < excelProcess.Count; i++) + { + excelProcess[i].Kill(); + } + } + private List GetExcelProcesses() + { + Process[] processes = Process.GetProcesses(); + List excelProcesses = new List(); + + for (int i = 0; i < processes.Length; i++) + { + if (processes[i].ProcessName.ToUpper() == "EXCEL") + excelProcesses.Add(processes[i]); + } + + return excelProcesses; + } + } +} diff --git a/AIMS/OperationAfter/frmReportExport.designer.cs b/AIMS/OperationAfter/frmReportExport.designer.cs new file mode 100644 index 0000000..a3d7a2f --- /dev/null +++ b/AIMS/OperationAfter/frmReportExport.designer.cs @@ -0,0 +1,347 @@ +namespace AIMS +{ + partial class frmReportExport + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle 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; + } +} \ No newline at end of file diff --git a/AIMS/OperationAfter/frmReportExport.resx b/AIMS/OperationAfter/frmReportExport.resx new file mode 100644 index 0000000..5da7a24 --- /dev/null +++ b/AIMS/OperationAfter/frmReportExport.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/AIMS/OremrUserControl/ControlExtension.cs b/AIMS/OremrUserControl/ControlExtension.cs index f236a8d..43e369b 100644 --- a/AIMS/OremrUserControl/ControlExtension.cs +++ b/AIMS/OremrUserControl/ControlExtension.cs @@ -338,7 +338,7 @@ namespace AIMS public static List 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; diff --git a/AIMS/Program.cs b/AIMS/Program.cs index ee4f6e3..4ad07a0 100644 --- a/AIMS/Program.cs +++ b/AIMS/Program.cs @@ -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 { diff --git a/AIMSEntity/AIMSEntity.csproj b/AIMSEntity/AIMSEntity.csproj index 6b1c95c..2648f1c 100644 --- a/AIMSEntity/AIMSEntity.csproj +++ b/AIMSEntity/AIMSEntity.csproj @@ -61,6 +61,7 @@ + diff --git a/AIMSEntity/Extensions/BOperationReport.cs b/AIMSEntity/Extensions/BOperationReport.cs new file mode 100644 index 0000000..14b0f5a --- /dev/null +++ b/AIMSEntity/Extensions/BOperationReport.cs @@ -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()); + } + } +} diff --git a/DrawGraph/AreaManage/IconManage.cs b/DrawGraph/AreaManage/IconManage.cs index 82a45d3..5f9022e 100644 --- a/DrawGraph/AreaManage/IconManage.cs +++ b/DrawGraph/AreaManage/IconManage.cs @@ -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("IconManage_TextPackObj_40_OperationRecord_AnalgesiaRecord_Extend3"); if (packObj != null && eventListstr.Count > 1) { - packObj.PackText = ""; + List Eventststr = new List(); 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 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 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 DrugListstr, FactDrug temp) { string dose = ""; diff --git a/DrawGraphManagement/AIMS.xml b/DrawGraphManagement/AIMS.xml index 7d66bdd..71c6330 100644 --- a/DrawGraphManagement/AIMS.xml +++ b/DrawGraphManagement/AIMS.xml @@ -1,6 +1,6 @@  - Data Source=.;Initial Catalog=AIMSDB_FJZPTFYY;User ID=sa;Password=Test2020; + Data Source=.;Initial Catalog=AIMSDB_DLSJZQZYYY;User ID=sa;Password=Test2020; Data Source=.;Initial Catalog=AIMSDB_DATA;User ID=sa;Password=Test2020; Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.10.7)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl2))));Persist Security Info=True;User ID=smview;Password=i39;