diff --git a/PEIS/Model/Enrollment/EnrollmentOrgModel.cs b/PEIS/Model/Enrollment/EnrollmentOrgModel.cs index 8750275..4b9d78f 100644 --- a/PEIS/Model/Enrollment/EnrollmentOrgModel.cs +++ b/PEIS/Model/Enrollment/EnrollmentOrgModel.cs @@ -92,5 +92,28 @@ namespace PEIS.Model.Enrollment return cResult > 0 && eResult > 0 && fResult > 0; } + + public List GetExcelList(Int64 oeID) + { + return DAOHelp.GetDataBySQL($@"SELECT + a.ID, + a.Name, + CASE WHEN a.Sex = 1 THEN '男' ELSE '女' END AS 'Sex', + b.Marriage, + CONVERT ( VARCHAR, a.Age ) + a.AgeClass AS 'AgeClass', + a.CardNo, + a.Tel1, + c.DeptName, + a.SignTime, + d.Fee + FROM + Enrollment_Patient a + LEFT JOIN Base_Patient b ON a.PID = b.ID + LEFT JOIN Base_OrgPatient c ON c.OID = a.OID AND c.PID = b.ID + LEFT JOIN Enrollment_CheckCost d ON a.ID = d.EID AND a.OEID = d.OEID + WHERE + a.OEID = {oeID} AND d.DeleteTime IS NULL + ORDER BY a.SignTime"); + } } } \ No newline at end of file diff --git a/PEIS/Model/Enrollment/EnrollmentPatientModel.cs b/PEIS/Model/Enrollment/EnrollmentPatientModel.cs index 9255efa..d4fd89d 100644 --- a/PEIS/Model/Enrollment/EnrollmentPatientModel.cs +++ b/PEIS/Model/Enrollment/EnrollmentPatientModel.cs @@ -59,7 +59,7 @@ namespace PEIS.Model.Enrollment SpellCode = '{item.SpellCode}' WHERE ID = {item.ID}"; - var baseStr = $@"update base_patient set name = '{item.Name}', Sex = '{item.Sex}', CardType = '{item.CardType}', CardNo = '{item.CardNo}', SpellCode = '{item.SpellCode}' where ID = {item.PID}"; + var baseStr = $@"update base_patient set name = '{item.Name}', Sex = '{item.Sex}', Birthday = '{item.Birthday}', CardType = '{item.CardType}', CardNo = '{item.CardNo}', SpellCode = '{item.SpellCode}', Marriage = '{item.Marriage}' where ID = {item.PID}"; DAOHelp.ExecuteSql(baseStr, false); return DAOHelp.ExecuteSql(sql, false) > 0; diff --git a/PEIS/Presenter/EnrollmentOrgPresenter.cs b/PEIS/Presenter/EnrollmentOrgPresenter.cs index f0e4905..bb099bd 100644 --- a/PEIS/Presenter/EnrollmentOrgPresenter.cs +++ b/PEIS/Presenter/EnrollmentOrgPresenter.cs @@ -159,6 +159,10 @@ namespace PEIS.Presenter { new EnrollmentCheckCostModel().CancelGroupTag(args.EnrollmentOID, args.IdList); }; + View.GetExcelList += (send, args) => + { + View.ShowExcelList(new EnrollmentOrgModel().GetExcelList(args.EnrollmentOID)); + }; } } } \ No newline at end of file diff --git a/PEIS/View/Enrollment/EnrollmentOrgForm.Designer.cs b/PEIS/View/Enrollment/EnrollmentOrgForm.Designer.cs index 1143ca5..bff4826 100644 --- a/PEIS/View/Enrollment/EnrollmentOrgForm.Designer.cs +++ b/PEIS/View/Enrollment/EnrollmentOrgForm.Designer.cs @@ -30,10 +30,10 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EnrollmentOrgForm)); + DevExpress.XtraGrid.GridFormatRule gridFormatRule3 = new DevExpress.XtraGrid.GridFormatRule(); + DevExpress.XtraEditors.FormatConditionRuleExpression formatConditionRuleExpression3 = new DevExpress.XtraEditors.FormatConditionRuleExpression(); DevExpress.XtraGrid.GridFormatRule gridFormatRule1 = new DevExpress.XtraGrid.GridFormatRule(); DevExpress.XtraEditors.FormatConditionRuleExpression formatConditionRuleExpression1 = new DevExpress.XtraEditors.FormatConditionRuleExpression(); - DevExpress.XtraGrid.GridFormatRule gridFormatRule2 = new DevExpress.XtraGrid.GridFormatRule(); - DevExpress.XtraEditors.FormatConditionRuleExpression formatConditionRuleExpression2 = new DevExpress.XtraEditors.FormatConditionRuleExpression(); this.gridColumn99 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn102 = new DevExpress.XtraGrid.Columns.GridColumn(); this.repositoryItemMemoEdit21 = new DevExpress.XtraEditors.Repository.RepositoryItemMemoEdit(); @@ -345,8 +345,10 @@ this.gridColumn94 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn95 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn96 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn105 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn104 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn92 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn106 = new DevExpress.XtraGrid.Columns.GridColumn(); this.PatientSearch = new System.Windows.Forms.TextBox(); this.gridColumn109 = new DevExpress.XtraGrid.Columns.GridColumn(); this.新建NToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -378,7 +380,6 @@ this.gridView5 = new DevExpress.XtraGrid.Views.Grid.GridView(); this.gridView7 = new DevExpress.XtraGrid.Views.Grid.GridView(); this.gridView8 = new DevExpress.XtraGrid.Views.Grid.GridView(); - this.gridColumn105 = new DevExpress.XtraGrid.Columns.GridColumn(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemMemoEdit21)).BeginInit(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DgcOrg)).BeginInit(); @@ -532,7 +533,7 @@ // DgcOrg // this.DgcOrg.Dock = System.Windows.Forms.DockStyle.Fill; - this.DgcOrg.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.DgcOrg.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(4); this.DgcOrg.Location = new System.Drawing.Point(0, 163); this.DgcOrg.MainView = this.DgvOrg; this.DgcOrg.Name = "DgcOrg"; @@ -564,7 +565,7 @@ this.gridColumn21}); this.DgvOrg.FixedLineWidth = 1; this.DgvOrg.GridControl = this.DgcOrg; - this.DgvOrg.IndicatorWidth = 70; + this.DgvOrg.IndicatorWidth = 50; this.DgvOrg.Name = "DgvOrg"; this.DgvOrg.OptionsMenu.EnableColumnMenu = false; this.DgvOrg.OptionsSelection.MultiSelect = true; @@ -868,7 +869,7 @@ // this.splitter1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(132)))), ((int)(((byte)(162)))), ((int)(((byte)(202))))); this.splitter1.Location = new System.Drawing.Point(236, 0); - this.splitter1.Margin = new System.Windows.Forms.Padding(1, 1, 1, 1); + this.splitter1.Margin = new System.Windows.Forms.Padding(1); this.splitter1.Name = "splitter1"; this.splitter1.Size = new System.Drawing.Size(4, 779); this.splitter1.TabIndex = 1; @@ -978,7 +979,7 @@ this.gridColumn55}); this.DgvGroupPatient.FixedLineWidth = 1; this.DgvGroupPatient.GridControl = this.DgcGroupPatient; - this.DgvGroupPatient.IndicatorWidth = 70; + this.DgvGroupPatient.IndicatorWidth = 50; this.DgvGroupPatient.Name = "DgvGroupPatient"; this.DgvGroupPatient.OptionsSelection.MultiSelect = true; this.DgvGroupPatient.OptionsView.ColumnAutoWidth = false; @@ -1259,7 +1260,7 @@ this.splitter3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(132)))), ((int)(((byte)(162)))), ((int)(((byte)(202))))); this.splitter3.Dock = System.Windows.Forms.DockStyle.Right; this.splitter3.Location = new System.Drawing.Point(658, 189); - this.splitter3.Margin = new System.Windows.Forms.Padding(1, 1, 1, 1); + this.splitter3.Margin = new System.Windows.Forms.Padding(1); this.splitter3.Name = "splitter3"; this.splitter3.Size = new System.Drawing.Size(4, 547); this.splitter3.TabIndex = 135; @@ -1328,7 +1329,7 @@ this.gridColumn56}); this.DgvPatient.FixedLineWidth = 1; this.DgvPatient.GridControl = this.DgcPatient; - this.DgvPatient.IndicatorWidth = 70; + this.DgvPatient.IndicatorWidth = 50; this.DgvPatient.Name = "DgvPatient"; this.DgvPatient.OptionsSelection.MultiSelect = true; this.DgvPatient.OptionsView.ColumnAutoWidth = false; @@ -1667,7 +1668,7 @@ this.splitter2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(132)))), ((int)(((byte)(162)))), ((int)(((byte)(202))))); this.splitter2.Dock = System.Windows.Forms.DockStyle.Top; this.splitter2.Location = new System.Drawing.Point(0, 184); - this.splitter2.Margin = new System.Windows.Forms.Padding(1, 1, 1, 1); + this.splitter2.Margin = new System.Windows.Forms.Padding(1); this.splitter2.Name = "splitter2"; this.splitter2.Size = new System.Drawing.Size(1196, 5); this.splitter2.TabIndex = 132; @@ -1909,7 +1910,7 @@ this.TpGroupFeeItem.Controls.Add(this.panel4); this.TpGroupFeeItem.Image = global::PEIS.Properties.Resources.收费项目; this.TpGroupFeeItem.Name = "TpGroupFeeItem"; - this.TpGroupFeeItem.Size = new System.Drawing.Size(1196, 922); + this.TpGroupFeeItem.Size = new System.Drawing.Size(1196, 736); this.TpGroupFeeItem.Text = "分组项目"; // // panel5 @@ -1922,7 +1923,7 @@ this.panel5.Location = new System.Drawing.Point(0, 192); this.panel5.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.panel5.Name = "panel5"; - this.panel5.Size = new System.Drawing.Size(1196, 730); + this.panel5.Size = new System.Drawing.Size(1196, 544); this.panel5.TabIndex = 139; // // DgcGroupFeeItem @@ -1933,7 +1934,7 @@ this.DgcGroupFeeItem.Name = "DgcGroupFeeItem"; this.DgcGroupFeeItem.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { this.repositoryItemMemoEdit1}); - this.DgcGroupFeeItem.Size = new System.Drawing.Size(732, 725); + this.DgcGroupFeeItem.Size = new System.Drawing.Size(732, 539); this.DgcGroupFeeItem.TabIndex = 137; this.DgcGroupFeeItem.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.DgvGroupFeeItem}); @@ -2133,7 +2134,7 @@ this.splitter4.Dock = System.Windows.Forms.DockStyle.Right; this.splitter4.Location = new System.Drawing.Point(732, 5); this.splitter4.Name = "splitter4"; - this.splitter4.Size = new System.Drawing.Size(4, 725); + this.splitter4.Size = new System.Drawing.Size(4, 539); this.splitter4.TabIndex = 142; this.splitter4.TabStop = false; // @@ -2144,7 +2145,7 @@ this.panel9.Location = new System.Drawing.Point(736, 5); this.panel9.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.panel9.Name = "panel9"; - this.panel9.Size = new System.Drawing.Size(460, 725); + this.panel9.Size = new System.Drawing.Size(460, 539); this.panel9.TabIndex = 141; // // tabControl1 @@ -2156,17 +2157,17 @@ this.tabControl1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(460, 725); + this.tabControl1.Size = new System.Drawing.Size(460, 539); this.tabControl1.TabIndex = 139; // // TpPack // this.TpPack.Controls.Add(this.DgcPack); - this.TpPack.Location = new System.Drawing.Point(4, 24); + this.TpPack.Location = new System.Drawing.Point(4, 23); this.TpPack.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.TpPack.Name = "TpPack"; this.TpPack.Padding = new System.Windows.Forms.Padding(2, 3, 2, 3); - this.TpPack.Size = new System.Drawing.Size(452, 708); + this.TpPack.Size = new System.Drawing.Size(452, 512); this.TpPack.TabIndex = 1; this.TpPack.Text = "套餐"; this.TpPack.UseVisualStyleBackColor = true; @@ -2177,7 +2178,7 @@ this.DgcPack.Location = new System.Drawing.Point(2, 3); this.DgcPack.MainView = this.DgvPack; this.DgcPack.Name = "DgcPack"; - this.DgcPack.Size = new System.Drawing.Size(448, 702); + this.DgcPack.Size = new System.Drawing.Size(448, 506); this.DgcPack.TabIndex = 122; this.DgcPack.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.DgvPack, @@ -2338,11 +2339,11 @@ // this.TpFeeItem.Controls.Add(this.DgcFeeItem); this.TpFeeItem.Controls.Add(this.FeeItemSearch); - this.TpFeeItem.Location = new System.Drawing.Point(4, 24); + this.TpFeeItem.Location = new System.Drawing.Point(4, 23); this.TpFeeItem.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.TpFeeItem.Name = "TpFeeItem"; this.TpFeeItem.Padding = new System.Windows.Forms.Padding(2, 3, 2, 3); - this.TpFeeItem.Size = new System.Drawing.Size(452, 708); + this.TpFeeItem.Size = new System.Drawing.Size(452, 512); this.TpFeeItem.TabIndex = 0; this.TpFeeItem.Text = "收费项目"; this.TpFeeItem.UseVisualStyleBackColor = true; @@ -2355,7 +2356,7 @@ this.DgcFeeItem.Name = "DgcFeeItem"; this.DgcFeeItem.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { this.repositoryItemCheckEdit1}); - this.DgcFeeItem.Size = new System.Drawing.Size(448, 680); + this.DgcFeeItem.Size = new System.Drawing.Size(448, 484); this.DgcFeeItem.TabIndex = 137; this.DgcFeeItem.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.DgvFeeItem, @@ -2976,15 +2977,15 @@ this.gridColumn100, this.gridColumn99}); this.DgvCheckCost2.FixedLineWidth = 1; - gridFormatRule1.ApplyToRow = true; - gridFormatRule1.Column = this.gridColumn99; - gridFormatRule1.Name = "Format0"; - formatConditionRuleExpression1.Appearance.ForeColor = System.Drawing.Color.Gray; - formatConditionRuleExpression1.Appearance.Options.UseForeColor = true; - formatConditionRuleExpression1.Expression = "[CancelTime] Is Not Null"; - formatConditionRuleExpression1.PredefinedName = "Strikeout Text"; - gridFormatRule1.Rule = formatConditionRuleExpression1; - this.DgvCheckCost2.FormatRules.Add(gridFormatRule1); + gridFormatRule3.ApplyToRow = true; + gridFormatRule3.Column = this.gridColumn99; + gridFormatRule3.Name = "Format0"; + formatConditionRuleExpression3.Appearance.ForeColor = System.Drawing.Color.Gray; + formatConditionRuleExpression3.Appearance.Options.UseForeColor = true; + formatConditionRuleExpression3.Expression = "[CancelTime] Is Not Null"; + formatConditionRuleExpression3.PredefinedName = "Strikeout Text"; + gridFormatRule3.Rule = formatConditionRuleExpression3; + this.DgvCheckCost2.FormatRules.Add(gridFormatRule3); this.DgvCheckCost2.GridControl = this.DgcCheckCost2; this.DgvCheckCost2.GroupFormat = "{0}"; this.DgvCheckCost2.IndicatorWidth = 40; @@ -3422,15 +3423,15 @@ this.gridColumn101, this.gridColumn102}); this.DgvCheckCost.FixedLineWidth = 1; - gridFormatRule2.ApplyToRow = true; - gridFormatRule2.Column = this.gridColumn102; - gridFormatRule2.Name = "Format0"; - formatConditionRuleExpression2.Appearance.ForeColor = System.Drawing.Color.Gray; - formatConditionRuleExpression2.Appearance.Options.UseForeColor = true; - formatConditionRuleExpression2.Expression = "[CancelTime] Is Not Null"; - formatConditionRuleExpression2.PredefinedName = "Strikeout Text"; - gridFormatRule2.Rule = formatConditionRuleExpression2; - this.DgvCheckCost.FormatRules.Add(gridFormatRule2); + gridFormatRule1.ApplyToRow = true; + gridFormatRule1.Column = this.gridColumn102; + gridFormatRule1.Name = "Format0"; + formatConditionRuleExpression1.Appearance.ForeColor = System.Drawing.Color.Gray; + formatConditionRuleExpression1.Appearance.Options.UseForeColor = true; + formatConditionRuleExpression1.Expression = "[CancelTime] Is Not Null"; + formatConditionRuleExpression1.PredefinedName = "Strikeout Text"; + gridFormatRule1.Rule = formatConditionRuleExpression1; + this.DgvCheckCost.FormatRules.Add(gridFormatRule1); this.DgvCheckCost.GridControl = this.DgcCheckCost; this.DgvCheckCost.GroupCount = 1; this.DgvCheckCost.GroupFormat = ""; @@ -4691,11 +4692,12 @@ this.gridColumn96, this.gridColumn105, this.gridColumn104, - this.gridColumn92}); + this.gridColumn92, + this.gridColumn106}); this.DgvEnrollment.GridControl = this.DgcEnrollment; this.DgvEnrollment.GroupCount = 1; this.DgvEnrollment.GroupFormat = ""; - this.DgvEnrollment.IndicatorWidth = 75; + this.DgvEnrollment.IndicatorWidth = 55; this.DgvEnrollment.Name = "DgvEnrollment"; this.DgvEnrollment.OptionsFilter.AllowFilterEditor = false; this.DgvEnrollment.OptionsMenu.EnableColumnMenu = false; @@ -4858,7 +4860,6 @@ this.gridColumn93.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; this.gridColumn93.OptionsColumn.AllowMove = false; this.gridColumn93.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False; - this.gridColumn93.OptionsColumn.Printable = DevExpress.Utils.DefaultBoolean.False; this.gridColumn93.OptionsColumn.ReadOnly = true; this.gridColumn93.OptionsFilter.AllowFilter = false; this.gridColumn93.Visible = true; @@ -4929,6 +4930,23 @@ this.gridColumn96.VisibleIndex = 9; this.gridColumn96.Width = 160; // + // gridColumn105 + // + this.gridColumn105.AppearanceCell.Font = new System.Drawing.Font("微软雅黑", 12F); + this.gridColumn105.AppearanceCell.Options.UseFont = true; + this.gridColumn105.Caption = "联系方式"; + this.gridColumn105.FieldName = "Tel1"; + this.gridColumn105.Name = "gridColumn105"; + this.gridColumn105.OptionsColumn.AllowEdit = false; + this.gridColumn105.OptionsColumn.AllowGroup = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn105.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn105.OptionsColumn.AllowMove = false; + this.gridColumn105.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn105.OptionsColumn.ReadOnly = true; + this.gridColumn105.OptionsFilter.AllowFilter = false; + this.gridColumn105.Visible = true; + this.gridColumn105.VisibleIndex = 11; + // // gridColumn104 // this.gridColumn104.AppearanceCell.Font = new System.Drawing.Font("微软雅黑", 12F); @@ -4960,11 +4978,29 @@ this.gridColumn92.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; this.gridColumn92.OptionsColumn.AllowMove = false; this.gridColumn92.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn92.OptionsColumn.Printable = DevExpress.Utils.DefaultBoolean.False; this.gridColumn92.OptionsColumn.ReadOnly = true; this.gridColumn92.OptionsFilter.AllowFilter = false; this.gridColumn92.Visible = true; this.gridColumn92.VisibleIndex = 10; // + // gridColumn106 + // + this.gridColumn106.AppearanceCell.Font = new System.Drawing.Font("微软雅黑", 12F); + this.gridColumn106.AppearanceCell.Options.UseFont = true; + this.gridColumn106.Caption = "体检费用"; + this.gridColumn106.FieldName = "Fee"; + this.gridColumn106.Name = "gridColumn106"; + this.gridColumn106.OptionsColumn.AllowEdit = false; + this.gridColumn106.OptionsColumn.AllowGroup = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn106.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn106.OptionsColumn.AllowMove = false; + this.gridColumn106.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False; + this.gridColumn106.OptionsColumn.ReadOnly = true; + this.gridColumn106.OptionsFilter.AllowFilter = false; + this.gridColumn106.Visible = true; + this.gridColumn106.VisibleIndex = 13; + // // PatientSearch // this.PatientSearch.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; @@ -5184,23 +5220,6 @@ // this.gridView8.Name = "gridView8"; // - // gridColumn105 - // - this.gridColumn105.AppearanceCell.Font = new System.Drawing.Font("微软雅黑", 12F); - this.gridColumn105.AppearanceCell.Options.UseFont = true; - this.gridColumn105.Caption = "联系方式"; - this.gridColumn105.FieldName = "Tel1"; - this.gridColumn105.Name = "gridColumn105"; - this.gridColumn105.OptionsColumn.AllowEdit = false; - this.gridColumn105.OptionsColumn.AllowGroup = DevExpress.Utils.DefaultBoolean.False; - this.gridColumn105.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False; - this.gridColumn105.OptionsColumn.AllowMove = false; - this.gridColumn105.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False; - this.gridColumn105.OptionsColumn.ReadOnly = true; - this.gridColumn105.OptionsFilter.AllowFilter = false; - this.gridColumn105.Visible = true; - this.gridColumn105.VisibleIndex = 11; - // // EnrollmentOrgForm // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); @@ -5667,5 +5686,6 @@ private System.Windows.Forms.ToolStripMenuItem FastExportTime; private DevExpress.XtraGrid.Columns.GridColumn gridColumn104; private DevExpress.XtraGrid.Columns.GridColumn gridColumn105; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn106; } } \ No newline at end of file diff --git a/PEIS/View/Enrollment/EnrollmentOrgForm.cs b/PEIS/View/Enrollment/EnrollmentOrgForm.cs index a7c8f8d..d5d1851 100644 --- a/PEIS/View/Enrollment/EnrollmentOrgForm.cs +++ b/PEIS/View/Enrollment/EnrollmentOrgForm.cs @@ -41,6 +41,7 @@ namespace PEIS.View.Enrollment private List _lstCheckCost = new List(); private List _lstCheckCost2 = new List(); private List _lstEnrollmentPatient = new List(); + private List _lstExcelEPatient = new List(); private List _lstEnrollmentFeeItem = new List(); private List _lstGroupFeeItem = new List(); private List _lstGroupPatient = new List(); @@ -202,7 +203,7 @@ namespace PEIS.View.Enrollment private void EnrollmentOrgForm_Shown(object sender, EventArgs e) { - DtpBegDate.Value = DateTime.Now.AddDays(-3); + DtpBegDate.Value = DateTime.Now.AddDays(-30); DtpEndDate.Value = DateTime.Now; RiCmbExamType.Items.Add("已婚/未婚"); RiCmbExamType.Items.AddRange(Global._lstConfig.Where(a => a.Key.Equals("ExamType")).ToList().Select(a => a.Value).ToList()); @@ -854,8 +855,11 @@ namespace PEIS.View.Enrollment private void FastExport_Click(object sender, EventArgs e) // 导出所有团体成员 { - if (_lstEnrollmentPatient.Count != 0) + OnGetExcelList(); + + if (_lstExcelEPatient.Count != 0) { + DgcEnrollment.DataSource = _lstExcelEPatient; SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.Title = "导出Excel"; saveFileDialog.FileName = "团体名单"; @@ -880,7 +884,7 @@ namespace PEIS.View.Enrollment // 将列添加到GridView的Columns集合中 DgvEnrollment.Columns.Add(newColumn); - for (int i = 0; i < _lstEnrollmentPatient.Count(); i++) + for (int i = 0; i < _lstExcelEPatient.Count(); i++) { // 使用GetRowCellValue方法获取当前行的序号列的值 int rowNumber = DgvEnrollment.GetRowHandle(i); // 行句柄 @@ -891,10 +895,13 @@ namespace PEIS.View.Enrollment DgvEnrollment.Columns.Remove(newColumn); } } + ShowEnrollmentPatient(_lstEnrollmentPatient); } private void FastExportTime_Click(object sender, EventArgs e) // 导出指定时间范围成员 { + OnGetExcelList(); + DateTime currentDate = DateTime.Now; Form dateForm = new Form(); @@ -925,8 +932,9 @@ namespace PEIS.View.Enrollment confirmBtn.AutoSize = true; confirmBtn.Click += delegate (object a, EventArgs b) { - if (_lstEnrollmentPatient.Count != 0) + if (_lstExcelEPatient.Count != 0) { + DgcEnrollment.DataSource = _lstExcelEPatient; SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.Title = "导出Excel"; saveFileDialog.FileName = "团体名单"; @@ -952,8 +960,8 @@ namespace PEIS.View.Enrollment DgvEnrollment.Columns.Add(newColumn); - DgcEnrollment.DataSource = _lstEnrollmentPatient.Where(w => w.SignTime > begTime.Value.Date && w.SignTime < endTime.Value.AddDays(1).Date); - for (int i = 0; i < _lstEnrollmentPatient.Where(w => w.SignTime > begTime.Value.Date && w.SignTime < endTime.Value.AddDays(1).Date).Count(); i++) + DgcEnrollment.DataSource = _lstExcelEPatient.Where(w => w.SignTime > begTime.Value.Date && w.SignTime < endTime.Value.AddDays(1).Date); + for (int i = 0; i < _lstExcelEPatient.Where(w => w.SignTime > begTime.Value.Date && w.SignTime < endTime.Value.AddDays(1).Date).Count(); i++) { // 使用GetRowCellValue方法获取当前行的序号列的值 int rowNumber = DgvEnrollment.GetRowHandle(i); // 行句柄 @@ -1598,6 +1606,8 @@ namespace PEIS.View.Enrollment public event EventHandler> CancelGroupTag; + public event EventHandler> GetExcelList; + protected virtual void OnCancelGroupTag(Int64 oeID, List idList) { CancelGroupTag?.Invoke(this, new Args { EnrollmentOID = oeID, IdList = idList }); @@ -1755,6 +1765,17 @@ namespace PEIS.View.Enrollment }); } + protected virtual void OnGetExcelList() + { + var oeID = Convert.ToInt64(DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "ID").ToString()); + GetExcelList?.Invoke(this, new Args { EnrollmentOID = oeID }); + } + + public void ShowExcelList(List items) + { + _lstExcelEPatient = items; + } + public void ShowCancelRegInfo(bool status) { OnGetEnrollmentPatient(Convert.ToInt64(DgvOrg.GetRowCellValue(DgvOrg.GetSelectedRows()[0], "ID").ToString())); @@ -1834,7 +1855,7 @@ namespace PEIS.View.Enrollment public void ShowEnrollmentPatient(List items) { - items.ForEach(a => a.Sex = a.Sex.Equals("1") ? "男" : a.Sex.Equals("2") ? "女" : ""); + items.ForEach(a => a.Sex = a.Sex.Equals("1") ? "男" : a.Sex.Equals("2") ? "女" : a.Sex); _lstEnrollmentPatient = items; diff --git a/PEIS/View/Enrollment/EnrollmentOrgForm.resx b/PEIS/View/Enrollment/EnrollmentOrgForm.resx index debec70..ab5bfdc 100644 --- a/PEIS/View/Enrollment/EnrollmentOrgForm.resx +++ b/PEIS/View/Enrollment/EnrollmentOrgForm.resx @@ -120,6 +120,15 @@ 510, 16 + + 510, 16 + + + 1914, 17 + + + 1358, 18 + 1597, 17 @@ -305,7 +314,7 @@ frF0DeOou0VjfCumLZLL/QM6DnLkln25BAAAAABJRU5ErkJggg== - + iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAABGdBTUEAALGPC/xhBQAAAXpJREFUWEft VMttxCAQdQlpIA3klEPMKreUEGlB2nSzp+0gh7Swl5SQEnwAK+UkzAL2gAa8tgHl4yc9WQzj956xPc2G @@ -317,7 +326,7 @@ E2hYuQ0bCqJpvgGNsilBELCZFAAAAABJRU5ErkJggg== - + iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAABGdBTUEAALGPC/xhBQAAAXpJREFUWEft VMttxCAQdQlpIA3klEPMKreUEGlB2nSzp+0gh7Swl5SQEnwAK+UkzAL2gAa8tgHl4yc9WQzj956xPc2G @@ -329,7 +338,7 @@ E2hYuQ0bCqJpvgGNsilBELCZFAAAAABJRU5ErkJggg== - + iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAABGdBTUEAALGPC/xhBQAAAXpJREFUWEft VMttxCAQdQlpIA3klEPMKreUEGlB2nSzp+0gh7Swl5SQEnwAK+UkzAL2gAa8tgHl4yc9WQzj956xPc2G @@ -341,7 +350,7 @@ E2hYuQ0bCqJpvgGNsilBELCZFAAAAABJRU5ErkJggg== - + iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAABGdBTUEAALGPC/xhBQAAAXpJREFUWEft VMttxCAQdQlpIA3klEPMKreUEGlB2nSzp+0gh7Swl5SQEnwAK+UkzAL2gAa8tgHl4yc9WQzj956xPc2G @@ -426,9 +435,6 @@ mAjBS46PQpxtC8HWE5/4muCP01lHCF/A7hOfW+9fQwAAAABJRU5ErkJggg== - - 1358, 18 - iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAARhJREFUSEvt diff --git a/PEIS/View/Enrollment/IEnrollmentOrgView.cs b/PEIS/View/Enrollment/IEnrollmentOrgView.cs index 94c7c9e..0aca34a 100644 --- a/PEIS/View/Enrollment/IEnrollmentOrgView.cs +++ b/PEIS/View/Enrollment/IEnrollmentOrgView.cs @@ -58,6 +58,7 @@ namespace PEIS.View.Enrollment event EventHandler> ChangeCost; event EventHandler> GroupTag; event EventHandler> CancelGroupTag; + event EventHandler> GetExcelList; void ShowEnrollmentOrg(List items); void ShowEnrollmentOrgGroup(List items); @@ -78,6 +79,7 @@ namespace PEIS.View.Enrollment void ShowRegInfo(EnrollmentPatient item); void ShowRecallDept(bool status); void ShowCancelRegInfo(bool status); + void ShowExcelList(List items); } }