职业病问诊症状

dhzzyy
luoxingjian 7 months ago
parent ffef4bd2df
commit c7b0781973
  1. 32
      PEIS/Entity/BaseSymptom.cs
  2. 25
      PEIS/Entity/ExamCareerHisInq.cs
  3. 10
      PEIS/Model/Exam/CareerHisInqModel.cs
  4. 10
      PEIS/PEIS.csproj
  5. 8
      PEIS/Presenter/CareerHisInqPresenter.cs
  6. 14
      PEIS/View/Exam/CareerHisInqForm.Designer.cs
  7. 98
      PEIS/View/Exam/CareerHisInqForm.cs
  8. 227
      PEIS/View/Exam/CareerHisInqStmForm.Designer.cs
  9. 85
      PEIS/View/Exam/CareerHisInqStmForm.cs
  10. 139
      PEIS/View/Exam/CareerHisInqStmForm.resx
  11. 9
      PEIS/View/Exam/ICareerHisInqView.cs

@ -0,0 +1,32 @@
using PEIS.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PEIS.Entity
{
/// <summary>
/// 职业史问诊-症状
/// </summary>
public class BaseSymptom : ObjectData
{
public override string TableName => "Base_Symptom";
/// <summary>
/// 名字
/// </summary>
public string Name { get; set; }
/// <summary>
/// 值
/// </summary>
public string Value { get; set; }
/// <summary>
/// 顺序
/// </summary>
public int DispOrder { get; set; }
/// <summary>
/// 启用状态(1:启用;0:禁用)
/// </summary>
public int Enable { get; set; }
}
}

@ -121,4 +121,29 @@ namespace PEIS.Entity
/// </summary>
public string Symptom { get; set; }
}
/// <summary>
/// 职业史问诊-症状
/// </summary>
public class ExamCareerHisInqSymptom : ObjectData
{
public override string TableName => "Exam_CareerHisInqSymptom";
/// <summary>
/// 体检患者ID
/// </summary>
public Int64 PID { get; set; }
/// <summary>
/// 症状ID
/// </summary>
public Int64 SID { get; set; }
/// <summary>
/// 症状名称
/// </summary>
public string SMName { get; set; }
/// <summary>
/// 症状值
/// </summary>
public string SMValue { get; set; }
}
}

@ -24,5 +24,15 @@ namespace PEIS.Model.Exam
var list = DAOHelp.GetDataBySQL<ExamEmploymentHis>($@"Select * From Exam_EmploymentHis a WHERE a.PID = {eID}");
return list;
}
public List<BaseSymptom> GetBaseSymptom()
{
var list = DAOHelp.GetDataBySQL<BaseSymptom>($@"Select * From Base_Symptom a where a.Enable=1 ");
return list;
}
public List<ExamCareerHisInqSymptom> GetCareerHisInqSymptom(Int64 eID)
{
var list = DAOHelp.GetDataBySQL<ExamCareerHisInqSymptom>($@"Select * From Exam_CareerHisInqSymptom a where a.PID={eID} ");
return list;
}
}
}

@ -195,6 +195,7 @@
<Compile Include="Base\Presenter.cs" />
<Compile Include="Entity\BaseDictionaryDetails.cs" />
<Compile Include="Entity\BaseDictionaryType.cs" />
<Compile Include="Entity\BaseSymptom.cs" />
<Compile Include="Entity\ExamCareerHisInq.cs" />
<Compile Include="Entity\EnrollmentReserve.cs" />
<Compile Include="Entity\ExamEmploymentHis.cs" />
@ -397,6 +398,12 @@
<Compile Include="View\Exam\CareerHisInqForm.Designer.cs">
<DependentUpon>CareerHisInqForm.cs</DependentUpon>
</Compile>
<Compile Include="View\Exam\CareerHisInqStmForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Exam\CareerHisInqStmForm.Designer.cs">
<DependentUpon>CareerHisInqStmForm.cs</DependentUpon>
</Compile>
<Compile Include="View\Exam\EmploymentHisForm.cs">
<SubType>Form</SubType>
</Compile>
@ -614,6 +621,9 @@
<EmbeddedResource Include="View\Exam\CareerHisInqForm.resx">
<DependentUpon>CareerHisInqForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="View\Exam\CareerHisInqStmForm.resx">
<DependentUpon>CareerHisInqStmForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="View\Exam\EmploymentHisForm.resx">
<DependentUpon>EmploymentHisForm.cs</DependentUpon>
</EmbeddedResource>

@ -28,6 +28,14 @@ namespace PEIS.Presenter
{
View.ShowEmploymentHis(new CareerHisInqModel().GetEmploymentHises(args.Eid));
};
View.GetBaseSymptom += (send, args) =>
{
View.ShowBaseSymptom(new CareerHisInqModel().GetBaseSymptom());
};
View.GetCareerHisInqSymptom += (send, args) =>
{
View.ShowCareerHisInqSymptom(new CareerHisInqModel().GetCareerHisInqSymptom(args.Eid));
};
}
}
}

@ -55,6 +55,7 @@
this.advPropertyGrid1 = new FastReport.DevComponents.DotNetBar.AdvPropertyGrid();
this.panelMain = new System.Windows.Forms.Panel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnSymptom = new System.Windows.Forms.Button();
this.panelDrink = new System.Windows.Forms.Panel();
this.DrinkState_1 = new System.Windows.Forms.RadioButton();
this.DrinkState_2 = new System.Windows.Forms.RadioButton();
@ -410,6 +411,7 @@
// groupBox1
//
this.groupBox1.BackColor = System.Drawing.Color.White;
this.groupBox1.Controls.Add(this.btnSymptom);
this.groupBox1.Controls.Add(this.panelDrink);
this.groupBox1.Controls.Add(this.panelSmoke);
this.groupBox1.Controls.Add(this.Symptom);
@ -479,6 +481,15 @@
this.groupBox1.TabStop = false;
this.groupBox1.Text = "问诊";
//
// btnSymptom
//
this.btnSymptom.Location = new System.Drawing.Point(975, 565);
this.btnSymptom.Name = "btnSymptom";
this.btnSymptom.Size = new System.Drawing.Size(75, 26);
this.btnSymptom.TabIndex = 94;
this.btnSymptom.Text = "选择";
this.btnSymptom.UseVisualStyleBackColor = true;
//
// panelDrink
//
this.panelDrink.Controls.Add(this.DrinkState_1);
@ -574,7 +585,7 @@
this.Symptom.Location = new System.Drawing.Point(134, 567);
this.Symptom.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Symptom.Name = "Symptom";
this.Symptom.Size = new System.Drawing.Size(916, 23);
this.Symptom.Size = new System.Drawing.Size(840, 23);
this.Symptom.TabIndex = 93;
//
// label44
@ -1496,5 +1507,6 @@
private System.Windows.Forms.ToolStripMenuItem toolMenuItem_Add;
private System.Windows.Forms.ToolStripMenuItem toolStMenuItem_Del;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn7;
private System.Windows.Forms.Button btnSymptom;
}
}

@ -22,6 +22,10 @@ namespace PEIS.View.Exam
{
private Int64 EID;
private Int64? ID;
private List<BaseSymptom> Symptoms = new List<BaseSymptom>();
private List<ExamCareerHisInqSymptom> AlreadyCareerHisInqSymptom = new List<ExamCareerHisInqSymptom>();
private List<ExamCareerHisInqSymptom> CareerHisInqSymptom = new List<ExamCareerHisInqSymptom>();
public bool isSymptomChage = false;
/// <summary>
/// 职业史问诊
/// </summary>
@ -37,9 +41,69 @@ namespace PEIS.View.Exam
SmokeState_1.CheckedChanged += SmokeState_1_CheckedChanged;
DrinkState_1.CheckedChanged += DrinkState_1_CheckedChanged;
Shown += CareerHisInqForm_Shown;
btnSymptom.Click += BtnSymptom_Click;
}
#region 症状
//职业史问诊症状配置
public event EventHandler<Args<BaseSymptom>> GetBaseSymptom;
public void ShowBaseSymptom(List<BaseSymptom> symptom)
{
Symptoms = symptom==null?new List<BaseSymptom>(): symptom;
}
//职业史问诊患者症状记录
public event EventHandler<Args<ExamCareerHisInqSymptom>> GetCareerHisInqSymptom;
public void ShowCareerHisInqSymptom(List<ExamCareerHisInqSymptom> hisInqSymptoms)
{
AlreadyCareerHisInqSymptom = hisInqSymptoms==null?new List<ExamCareerHisInqSymptom>(): hisInqSymptoms;
}
public void LoadBaseSymptom()
{
GetBaseSymptom.Invoke(this, new Args<BaseSymptom>());
GetCareerHisInqSymptom.Invoke(this, new Args<ExamCareerHisInqSymptom>() { Eid = EID });
}
private void BtnSymptom_Click(object sender, EventArgs e)
{
CareerHisInqStmForm careerHisInqStm = new CareerHisInqStmForm();
careerHisInqStm.symptoms = Symptoms;
var alreadySymptomSID= AlreadyCareerHisInqSymptom.Select(o => o.SID).ToList();
var alreadySymptom= Symptoms.Where(p => alreadySymptomSID.Contains(p.ID)).ToList();
if (alreadySymptom.Count > 0) { careerHisInqStm.selectedItems = alreadySymptom; }
else{
var symptomSID = CareerHisInqSymptom.Select(o => o.SID).ToList();
var symptom = Symptoms.Where(p => symptomSID.Contains(p.ID)).ToList();
careerHisInqStm.selectedItems = symptom;
}
var dialogResult=careerHisInqStm.ShowDialog();
if (dialogResult==DialogResult.OK)
{
CareerHisInqSymptom = new List<ExamCareerHisInqSymptom>();
foreach (var item in careerHisInqStm.selectedItems)
{
var symptomItem = new ExamCareerHisInqSymptom();
symptomItem.PID = EID;
symptomItem.SID = item.ID;
symptomItem.SMName = item.Name;
symptomItem.SMValue = item.Value;
CareerHisInqSymptom.Add(symptomItem);
}
if (CareerHisInqSymptom.Count == 0)
{
Invoke(new Action(() =>
{
Symptom.Text = null;
}));
}
else {
var b = CareerHisInqSymptom.Select(p => p.SMName).ToList();
Symptom.Text = string.Join("、", b);
}
isSymptomChage = true;
}
}
#endregion
private void DrinkState_1_CheckedChanged(object sender, EventArgs e)
{
var radioButton = sender as RadioButton;
@ -83,6 +147,7 @@ namespace PEIS.View.Exam
LoadPatients(EID);
LoadEmploymentHis(EID);
LoadExamCareerHisInq(EID);
LoadBaseSymptom();
});
}
@ -221,10 +286,33 @@ namespace PEIS.View.Exam
Global.Msg("info", "患者不喝酒,不应该有喝酒数量或者喝酒年份");
return;
}
var result = false;
if (ID == null) result = examCareerHisInq.Save();
else result = examCareerHisInq.Update();
if (result) Close();
long CId = 0;
if (ID == null)
{
examCareerHisInq.Save();
Model.Exam.CareerHisInqModel careerHisInq = new Model.Exam.CareerHisInqModel();
CId = careerHisInq.GetPatient(examCareerHisInq.PID).ID;
}
else {
examCareerHisInq.Update();
CId = examCareerHisInq.ID;
}
if (isSymptomChage)
{
if (AlreadyCareerHisInqSymptom.Count > 0)
{
foreach (var item in AlreadyCareerHisInqSymptom)
{
item.Delete();
}
}
foreach (var item in CareerHisInqSymptom)
{
item.Save();
}
isSymptomChage = false;
}
Close();
}
catch (Exception ex)
{

@ -0,0 +1,227 @@

namespace PEIS.View.Exam
{
partial class CareerHisInqStmForm
{
/// <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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CareerHisInqStmForm));
this.gridControl1 = new DevExpress.XtraGrid.GridControl();
this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
this.check = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemCheckEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
this.ID = new DevExpress.XtraGrid.Columns.GridColumn();
this.Name1 = new DevExpress.XtraGrid.Columns.GridColumn();
this.Value = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemCheckedComboBoxEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemCheckedComboBoxEdit();
this.panel2 = new System.Windows.Forms.Panel();
this.CancelBtn = new System.Windows.Forms.Button();
this.ConfirmBtn = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemCheckEdit1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemCheckedComboBoxEdit1)).BeginInit();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// gridControl1
//
this.gridControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridControl1.EmbeddedNavigator.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.gridControl1.Location = new System.Drawing.Point(0, 0);
this.gridControl1.MainView = this.gridView1;
this.gridControl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.gridControl1.Name = "gridControl1";
this.gridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
this.repositoryItemCheckEdit1,
this.repositoryItemCheckedComboBoxEdit1});
this.gridControl1.Size = new System.Drawing.Size(558, 312);
this.gridControl1.TabIndex = 0;
this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gridView1});
//
// gridView1
//
this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
this.check,
this.ID,
this.Name1,
this.Value});
this.gridView1.GridControl = this.gridControl1;
this.gridView1.Name = "gridView1";
this.gridView1.OptionsSelection.MultiSelect = true;
this.gridView1.OptionsSelection.ShowCheckBoxSelectorInColumnHeader = DevExpress.Utils.DefaultBoolean.False;
this.gridView1.OptionsSelection.ShowCheckBoxSelectorInGroupRow = DevExpress.Utils.DefaultBoolean.False;
this.gridView1.OptionsSelection.ShowCheckBoxSelectorInPrintExport = DevExpress.Utils.DefaultBoolean.False;
this.gridView1.OptionsView.ShowGroupPanel = false;
this.gridView1.OptionsView.ShowIndicator = false;
//
// check
//
this.check.AppearanceCell.Options.UseTextOptions = true;
this.check.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.check.AppearanceCell.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.check.AppearanceHeader.Options.UseTextOptions = true;
this.check.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.check.AppearanceHeader.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.check.Caption = "选择";
this.check.ColumnEdit = this.repositoryItemCheckEdit1;
this.check.FieldName = "check";
this.check.Name = "check";
this.check.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
this.check.OptionsFilter.AllowAutoFilter = false;
this.check.OptionsFilter.AllowFilter = false;
this.check.Visible = true;
this.check.VisibleIndex = 0;
this.check.Width = 60;
//
// repositoryItemCheckEdit1
//
this.repositoryItemCheckEdit1.AutoHeight = false;
this.repositoryItemCheckEdit1.Name = "repositoryItemCheckEdit1";
//
// ID
//
this.ID.Caption = "主键";
this.ID.FieldName = "ID";
this.ID.Name = "ID";
this.ID.OptionsColumn.AllowEdit = false;
this.ID.OptionsColumn.AllowFocus = false;
this.ID.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
this.ID.OptionsFilter.AllowAutoFilter = false;
this.ID.OptionsFilter.AllowFilter = false;
//
// Name1
//
this.Name1.Caption = "名字";
this.Name1.FieldName = "Name";
this.Name1.Name = "Name1";
this.Name1.OptionsColumn.AllowEdit = false;
this.Name1.OptionsColumn.AllowFocus = false;
this.Name1.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
this.Name1.OptionsFilter.AllowAutoFilter = false;
this.Name1.OptionsFilter.AllowFilter = false;
this.Name1.Visible = true;
this.Name1.VisibleIndex = 1;
this.Name1.Width = 372;
//
// Value
//
this.Value.Caption = "值";
this.Value.FieldName = "Value";
this.Value.Name = "Value";
this.Value.OptionsColumn.AllowEdit = false;
this.Value.OptionsColumn.AllowFocus = false;
this.Value.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
this.Value.OptionsFilter.AllowAutoFilter = false;
this.Value.OptionsFilter.AllowFilter = false;
this.Value.Visible = true;
this.Value.VisibleIndex = 2;
this.Value.Width = 373;
//
// repositoryItemCheckedComboBoxEdit1
//
this.repositoryItemCheckedComboBoxEdit1.AutoHeight = false;
this.repositoryItemCheckedComboBoxEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.repositoryItemCheckedComboBoxEdit1.Name = "repositoryItemCheckedComboBoxEdit1";
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.CancelBtn);
this.panel2.Controls.Add(this.ConfirmBtn);
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel2.Location = new System.Drawing.Point(0, 312);
this.panel2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(558, 38);
this.panel2.TabIndex = 11;
//
// CancelBtn
//
this.CancelBtn.Image = ((System.Drawing.Image)(resources.GetObject("CancelBtn.Image")));
this.CancelBtn.Location = new System.Drawing.Point(332, 0);
this.CancelBtn.Margin = new System.Windows.Forms.Padding(2, 6, 2, 6);
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.Size = new System.Drawing.Size(106, 36);
this.CancelBtn.TabIndex = 20;
this.CancelBtn.Text = "取消";
this.CancelBtn.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.CancelBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.CancelBtn.UseVisualStyleBackColor = true;
//
// ConfirmBtn
//
this.ConfirmBtn.Image = ((System.Drawing.Image)(resources.GetObject("ConfirmBtn.Image")));
this.ConfirmBtn.Location = new System.Drawing.Point(123, 0);
this.ConfirmBtn.Margin = new System.Windows.Forms.Padding(2, 6, 2, 6);
this.ConfirmBtn.Name = "ConfirmBtn";
this.ConfirmBtn.Size = new System.Drawing.Size(105, 36);
this.ConfirmBtn.TabIndex = 19;
this.ConfirmBtn.Text = "确认";
this.ConfirmBtn.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.ConfirmBtn.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.ConfirmBtn.UseVisualStyleBackColor = true;
//
// CareerHisInqStmForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(558, 350);
this.Controls.Add(this.gridControl1);
this.Controls.Add(this.panel2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "CareerHisInqStmForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "症状";
((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemCheckEdit1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.repositoryItemCheckedComboBoxEdit1)).EndInit();
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private DevExpress.XtraGrid.GridControl gridControl1;
private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
private DevExpress.XtraGrid.Columns.GridColumn ID;
private DevExpress.XtraGrid.Columns.GridColumn Name1;
private DevExpress.XtraGrid.Columns.GridColumn Value;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button CancelBtn;
private System.Windows.Forms.Button ConfirmBtn;
private DevExpress.XtraGrid.Columns.GridColumn check;
private DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit repositoryItemCheckEdit1;
private DevExpress.XtraEditors.Repository.RepositoryItemCheckedComboBoxEdit repositoryItemCheckedComboBoxEdit1;
}
}

@ -0,0 +1,85 @@
using PEIS.Base;
using PEIS.Entity;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using System.Windows.Forms;
namespace PEIS.View.Exam
{
/// <summary>
/// 职业史问诊-症状
/// </summary>
public partial class CareerHisInqStmForm : ViewBase
{
public List<BaseSymptom> symptoms = new List<BaseSymptom>();
public List<BaseSymptom> selectedItems = new List<BaseSymptom>();
public CareerHisInqStmForm()
{
InitializeComponent();
CancelBtn.Click += CancelBtn_Click;
ConfirmBtn.Click += ConfirmBtn_Click;
Shown += CareerHisInqStmForm_Shown;
}
private void ConfirmBtn_Click(object sender, EventArgs e)
{
GetSelectedItems();
DialogResult = DialogResult.OK;
Close();
}
private void CancelBtn_Click(object sender, EventArgs e)
{
Close();
}
private void CareerHisInqStmForm_Shown(object sender, EventArgs e)
{
List<BaseSymptomInfo> baseSymptom = new List<BaseSymptomInfo>();
foreach (var item in symptoms)
{
BaseSymptomInfo symptomInfo = new BaseSymptomInfo();
symptomInfo.ID = item.ID;
symptomInfo.Name = item.Name;
symptomInfo.Value = item.Value;
symptomInfo.DispOrder = item.DispOrder;
symptomInfo.Enable = item.Enable;
var selected=selectedItems.Where(p => p.ID == item.ID).FirstOrDefault();
symptomInfo.check = selected == null ? false : true;
baseSymptom.Add(symptomInfo);
}
Invoke(new Action(() => gridControl1.DataSource = null));
Invoke(new Action(() => gridControl1.DataSource = baseSymptom));
}
private void GetSelectedItems()
{
selectedItems = new List<BaseSymptom>();
var dataSource = gridControl1.DataSource as List<BaseSymptomInfo>;
var selectedList = dataSource.Where(p => p.check == true).ToList();
foreach (var item in selectedList)
{
BaseSymptom symptom = new BaseSymptom();
symptom.ID = item.ID;
symptom.Name = item.Name;
symptom.Value = item.Value;
symptom.DispOrder = item.DispOrder;
symptom.Enable = item.Enable;
selectedItems.Add(symptom);
}
}
public class BaseSymptomInfo : BaseSymptom
{
public bool check { get; set; } = false;
}
protected override object CreatePresenter()
{
return null;
}
}
}

@ -0,0 +1,139 @@
<?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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="CancelBtn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAAH1JREFUSEvt
lEEKgDAMBPNJf5GX+T+9aiM5REhDVlPx0AGhbXan4KE0+R8787Ixr7pNIx3p6raPBNt3IJfAHaSAZG9k
iplMSCSIZhCeyDt7hRXatY5rMOJ6uTD0AiOv/0We0Dt7RCSKZikygkzGBSki2Qu40IA6w5/ryccQnexo
4OWtCNeHAAAAAElFTkSuQmCC
</value>
</data>
<data name="ConfirmBtn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAAPJJREFUSEtj
GAWjgCRgP/9/KJRJfWA/73+kw7z//4GWmEKFqAeAhsaCDAfiy3az/2tChakDgC5PhBp+3m7+f1WoMHUA
0OWpUMPP2Mz7rwQVpg4AujwTavgJl4X/5aDChIHD3P8NUCZOAHR5Ltjwuf+POE3/Lw0VJgyAmtKhGnFa
AnR5IdTlB5xn/xeHChMPgBpX4bIE6PJSqNwe54X/haHCpAO4JfP/10OFQC6vBIvN+78DKC4AFSYfwC0B
+gTo8looe4vDqv88UCWUA7glELzBsu8/J1SKegBsyfz/a4xn/meFCtEANPxngrJGwShABwwMAJBYlx6C
WXdWAAAAAElFTkSuQmCC
</value>
</data>
</root>

@ -19,5 +19,14 @@ namespace PEIS.View.Exam
//职业史数据
event EventHandler<Args<ExamEmploymentHis>> GetEmploymentHis;
void ShowEmploymentHis(List<ExamEmploymentHis> employmentHis);
//职业史症状配置
event EventHandler<Args<BaseSymptom>> GetBaseSymptom;
void ShowBaseSymptom(List<BaseSymptom> symptom);
//职业史问诊患者症状记录
event EventHandler<Args<ExamCareerHisInqSymptom>> GetCareerHisInqSymptom;
void ShowCareerHisInqSymptom(List<ExamCareerHisInqSymptom> hisInqSymptoms);
}
}

Loading…
Cancel
Save