职业史问诊中--职业史记录

dhzzyy
luoxingjian 6 months ago
parent 31766afb3e
commit 6e87226f0a
  1. 8
      PEIS/Entity/ExamCareerHisInq.cs
  2. 49
      PEIS/Entity/ExamEmploymentHis.cs
  3. 14
      PEIS/Model/Exam/CareerHisInqModel.cs
  4. 10
      PEIS/PEIS.csproj
  5. 9
      PEIS/Presenter/CareerHisInqPresenter.cs
  6. 874
      PEIS/View/Exam/CareerHisInqForm.Designer.cs
  7. 223
      PEIS/View/Exam/CareerHisInqForm.cs
  8. 3
      PEIS/View/Exam/CareerHisInqForm.resx
  9. 306
      PEIS/View/Exam/EmploymentHisForm.Designer.cs
  10. 75
      PEIS/View/Exam/EmploymentHisForm.cs
  11. 139
      PEIS/View/Exam/EmploymentHisForm.resx
  12. 10
      PEIS/View/Exam/ICareerHisInqView.cs

@ -13,9 +13,9 @@ namespace PEIS.Entity
{
public override String TableName => "Exam_CareerHisInq";
/// <summary>
/// 患者id
/// 体检患者ID
/// </summary>
public Int64? PID { get; set; }
public Int64 PID { get; set; }
/// <summary>
/// 既往史
/// </summary>
@ -83,7 +83,7 @@ namespace PEIS.Entity
/// <summary>
/// 吸烟情况(1:不吸烟;2:偶吸烟;3:经常吸)--烟酒史
/// </summary>
public Int64? SmokeState { get; set; }
public int SmokeState { get; set; }
/// <summary>
/// 吸烟数量(支/天)--烟酒史
/// </summary>
@ -99,7 +99,7 @@ namespace PEIS.Entity
/// <summary>
/// 饮酒情况(1:不饮酒;2:偶饮酒;3:经常饮)--烟酒史
/// </summary>
public Int64? DrinkState { get; set; }
public int DrinkState { get; set; }
/// <summary>
/// 饮酒数量(mL/天)--烟酒史
/// </summary>

@ -0,0 +1,49 @@
using PEIS.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PEIS.Entity
{
/// <summary>
/// 职业史表
/// </summary>
public class ExamEmploymentHis : ObjectData
{
public override String TableName => "Exam_EmploymentHis";
/// <summary>
/// 体检患者ID
/// </summary>
public Int64 PID { get; set; }
/// <summary>
/// 工作单位
/// </summary>
public string WorkUnit { get; set; }
/// <summary>
/// 车间
/// </summary>
public string Workshop { get; set; }
/// <summary>
/// 工种
/// </summary>
public string WorkType { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public DateTime StartTime { get; set; }
/// <summary>
/// 结束时间
/// </summary>
public DateTime EndTime { get; set; }
/// <summary>
/// 有害因素
/// </summary>
public string HarmfulFactors { get; set; }
/// <summary>
/// 防护措施
/// </summary>
public string ProtectiveMeasures { get; set; }
}
}

@ -9,10 +9,20 @@ namespace PEIS.Model.Exam
{
public class CareerHisInqModel
{
public BasePatient GetPatient(Int64 pID)
public EnrollmentPatient GetPatient(Int64 eID)
{
var item = DAOHelp.GetDataBySQL<BasePatient>($@"Select * From Base_Patient a WHERE a.ID = {pID}");
var item = DAOHelp.GetDataBySQL<EnrollmentPatient>($@"Select * From Enrollment_Patient a WHERE a.ID = {eID}");
return item.Count != 0 ? item[0] : null;
}
public ExamCareerHisInq GetExamCareerHisInqByEid(Int64 eID)
{
var item= DAOHelp.GetDataBySQL<ExamCareerHisInq>($@"Select * From Exam_CareerHisInq a WHERE a.PID = {eID}");
return item.Count != 0 ? item[0] : null;
}
public List<ExamEmploymentHis> GetEmploymentHises(Int64 eID)
{
var list = DAOHelp.GetDataBySQL<ExamEmploymentHis>($@"Select * From Exam_EmploymentHis a WHERE a.PID = {eID}");
return list;
}
}
}

@ -195,6 +195,7 @@
<Compile Include="Base\Presenter.cs" />
<Compile Include="Entity\ExamCareerHisInq.cs" />
<Compile Include="Entity\EnrollmentReserve.cs" />
<Compile Include="Entity\ExamEmploymentHis.cs" />
<Compile Include="Entity\ExamResultIsm.cs" />
<Compile Include="Entity\Log.cs" />
<Compile Include="Model\Exam\CareerHisInqModel.cs" />
@ -392,6 +393,12 @@
<Compile Include="View\Exam\CareerHisInqForm.Designer.cs">
<DependentUpon>CareerHisInqForm.cs</DependentUpon>
</Compile>
<Compile Include="View\Exam\EmploymentHisForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\Exam\EmploymentHisForm.Designer.cs">
<DependentUpon>EmploymentHisForm.cs</DependentUpon>
</Compile>
<Compile Include="View\Exam\ICareerHisInqView.cs" />
<Compile Include="View\Exam\IPartView.cs" />
<Compile Include="View\Exam\PartForm.cs">
@ -584,6 +591,9 @@
<EmbeddedResource Include="View\Exam\CareerHisInqForm.resx">
<DependentUpon>CareerHisInqForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="View\Exam\EmploymentHisForm.resx">
<DependentUpon>EmploymentHisForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="View\Exam\PartForm.resx">
<DependentUpon>PartForm.cs</DependentUpon>
<SubType>Designer</SubType>

@ -1,4 +1,5 @@
using PEIS.Base;
using PEIS.Entity;
using PEIS.Model.Exam;
using PEIS.View.Exam;
using System;
@ -19,6 +20,14 @@ namespace PEIS.Presenter
{
View.ShowPatient(new CareerHisInqModel().GetPatient(args.ID));
};
View.GetCareerHisInq += (send, args) =>
{
View.ShowExamCareerHisInq(new CareerHisInqModel().GetExamCareerHisInqByEid(args.Eid));
};
View.GetEmploymentHis += (send, args) =>
{
View.ShowEmploymentHis(new CareerHisInqModel().GetEmploymentHises(args.Eid));
};
}
}
}

File diff suppressed because it is too large Load Diff

@ -2,6 +2,7 @@
using PEIS.Entity;
using PEIS.Event;
using PEIS.Presenter;
using PEIS.Utils;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@ -15,35 +16,233 @@ namespace PEIS.View.Exam
{
public partial class CareerHisInqForm : ViewBase, ICareerHisInqView
{
private Int64 PID;
public CareerHisInqForm(Int64 pID)
private Int64 EID;
private Int64? ID;
/// <summary>
///
/// </summary>
/// <param name="pID">体检患者表id</param>
public CareerHisInqForm(Int64 eID)
{
InitializeComponent();
PID = pID;
Shown += CareerHisInqForm_Shown;
EID = eID;
ConfirmBtn.Click += ConfirmBtn_Click;
CancelBtn.Click += CancelBtn_Click;
LoadPatients(pID);
toolMenuItem_Add.Click += ToolMenuItem_Add_Click;
toolStMenuItem_Del.Click += ToolStMenuItem_Del_Click;
Shown += CareerHisInqForm_Shown;
}
private void CareerHisInqForm_Shown(object sender, EventArgs e)
{
LoadPatients(EID);
LoadEmploymentHis(EID);
LoadExamCareerHisInq(EID);
}
protected virtual void LoadPatients(Int64 pID)
private void ToolMenuItem_Add_Click(object sender, EventArgs e)
{
GetPatients?.Invoke(this, new Args<BasePatient> { ID = pID });
var employmentHisForm = new EmploymentHisForm(EID);
employmentHisForm.ShowDialog();
if (employmentHisForm.DialogResult == DialogResult.OK)
{
LoadEmploymentHis(EID);
}
}
private void ToolStMenuItem_Del_Click(object sender, EventArgs e)
{
var selected = gVEmploymentHis.GetRow(gVEmploymentHis.GetSelectedRows()[0]) as ExamEmploymentHis;
if (selected != null)
{
var dialogResult=Global.MsgDelete($"是否确认删除{selected.WorkUnit}的职业史?");
if (dialogResult)
{
var result=selected.Delete();
if(result) LoadEmploymentHis(EID);
}
}
else {
Global.Msg("info", "请选择删除项");
}
}
protected virtual void LoadPatients(Int64 eID)
{
GetPatients?.Invoke(this, new Args<EnrollmentPatient> { ID = eID });
}
protected virtual void LoadEmploymentHis(Int64 eID)
{
GetEmploymentHis?.Invoke(this, new Args<ExamEmploymentHis> { Eid = eID });
}
protected virtual void LoadExamCareerHisInq(Int64 eID)
{
GetCareerHisInq?.Invoke(this, new Args<ExamCareerHisInq> { Eid = eID });
}
//获取患者基本信息
public event EventHandler<Args<BasePatient>> GetPatients;
public void ShowPatient(BasePatient patient)
public event EventHandler<Args<EnrollmentPatient>> GetPatients;
public void ShowPatient(EnrollmentPatient patient)
{
if (patient!=null)
{
textBox1.Text = patient.ID.ToString();
textBox2.Text= patient.ID.ToString();
textBox3.Text = patient.Name;
textBox4.Text = patient.Sex == "1" ? "男" : "女";
textBox5.Text = patient.Age.ToString();
//textBox9.Text = patient.
//textBox7.Text = patient.HazardFactors;
//textBox8.Text= patient
//textBox9.Text= patient.JobTypes
//textBox10.Text =
//textBox11.Text = patient.WorkYears
//textBox12.Text =
}
}
private void CareerHisInqForm_Shown(object sender, EventArgs e)
//职业史问诊
public event EventHandler<Args<ExamCareerHisInq>> GetCareerHisInq;
public void ShowExamCareerHisInq(ExamCareerHisInq examCareer)
{
if (examCareer != null)
{
SetViewData(examCareer);
ID = examCareer.ID;
}
}
//职业史数据
public event EventHandler<Args<ExamEmploymentHis>> GetEmploymentHis;
public void ShowEmploymentHis(List<ExamEmploymentHis> employmentHis)
{
throw new NotImplementedException();
List<ExamEmploymentHisView> list = new List<ExamEmploymentHisView>();
foreach (var item in employmentHis)
{
ExamEmploymentHisView examEmployment = new ExamEmploymentHisView();
if (item.StartTime != null&& item.EndTime != null)
{
examEmployment.StartEndTime = $"{item.StartTime.Year}年{item.StartTime.Month}月至{item.EndTime.Year}年{item.EndTime.Month}月";
}
examEmployment.ID = item.ID;
examEmployment.PID = item.PID;
examEmployment.WorkUnit = item.WorkUnit;
examEmployment.Workshop = item.Workshop;
examEmployment.WorkType = item.WorkType;
examEmployment.HarmfulFactors = item.HarmfulFactors;
examEmployment.ProtectiveMeasures = item.ProtectiveMeasures;
list.Add(examEmployment);
}
Invoke(new Action(() => gridOccupation.DataSource = null));
Invoke(new Action(() =>{gridOccupation.DataSource = list; }));
Invoke(new Action(() => gVEmploymentHis.BestFitColumns()));
}
private void ConfirmBtn_Click(object sender, EventArgs e)
{
throw new NotImplementedException();
try
{
ConfirmBtn.Enabled = false;
var examCareerHisInq = GetViewData();
if (examCareerHisInq.SmokeState==1&&(!string.IsNullOrWhiteSpace(examCareerHisInq.SmokeQuantity)||
!string.IsNullOrWhiteSpace(examCareerHisInq.SmokeMonths)||!string.IsNullOrWhiteSpace(examCareerHisInq.SmokeYears)))
{
Global.Msg("info","患者不吸烟,不应该有吸烟数量或者吸烟年份或吸烟月");
return;
}
if (examCareerHisInq.DrinkState==1&&(!string.IsNullOrWhiteSpace(examCareerHisInq.DrinkQuantity)|| !string.IsNullOrWhiteSpace(examCareerHisInq.DrinkYears)))
{
Global.Msg("info", "患者不喝酒,不应该有喝酒数量或者喝酒年份");
return;
}
var result = false;
if (ID == null) result = examCareerHisInq.Save();
else result = examCareerHisInq.Update();
if (result) Close();
}
catch (Exception ex)
{
throw ex;
}
finally {
ConfirmBtn.Enabled = true;
}
}
public void SetViewData(ExamCareerHisInq examCareerHisInq)
{
ExamCareerHisInq examCareerHis = new ExamCareerHisInq();
examCareerHis = examCareerHisInq;
var properties = examCareerHis.GetType().GetProperties();
foreach (var item in groupBox1.Controls)
{
var textbox = item as TextBox;
var panel = item as Panel;
if (textbox != null)
{
var propert = properties.Where(p => p.Name == textbox.Name).FirstOrDefault();
if (propert!=null) textbox.Text = propert.GetValue(examCareerHis, null)?.ToString();
}
if (panel != null)
{
foreach (var item2 in panel.Controls)
{
var radioButton = item2 as RadioButton;
var radioButName = radioButton.Name;
var pName = radioButton.Name.Split('_')[0];
var radioButValue = radioButton.Name.Split('_')[1];
var propert = properties.Where(p => p.Name == pName).FirstOrDefault();
if (propert != null)
{
var value = propert.GetValue(examCareerHis, null)?.ToString();
var radioName = pName + "_" + value;
if (radioButName == radioName) radioButton.Checked = true;
else radioButton.Checked = false;
}
}
}
}
}
public ExamCareerHisInq GetViewData()
{
ExamCareerHisInq examCareerHis = new ExamCareerHisInq();
examCareerHis.PID = EID;
if (ID!=null) examCareerHis.ID = Int64.Parse(ID.ToString());
Type objectType = examCareerHis.GetType();
var properties = objectType.GetProperties();
foreach (var item in groupBox1.Controls)
{
var textbox = item as TextBox;
var panel = item as Panel;
if (textbox!=null)
{
if (!string.IsNullOrEmpty(textbox.Text.Trim()))
{
var propert=properties.Where(p => p.Name == textbox.Name).FirstOrDefault();
if (propert != null)
propert.SetValue(examCareerHis, textbox.Text.Trim(), null);
}
}
if (panel!=null)
{
foreach (var item2 in panel.Controls)
{
var radioButton= item2 as RadioButton;
if (radioButton.Checked)
{
var radioButName = radioButton.Name;
var pName = radioButton.Name.Split('_')[0];
var radioButValue = radioButton.Name.Split('_')[1];
var propert = properties.Where(p => p.Name == pName).FirstOrDefault();
if (propert != null)
{
propert.SetValue(examCareerHis, Int32.Parse(radioButValue), null);
}
}
}
}
}
return examCareerHis;
}
private void CancelBtn_Click(object sender, EventArgs e)
{

@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>175, 17</value>
</metadata>
<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>

@ -0,0 +1,306 @@
namespace PEIS.View.Exam
{
partial class EmploymentHisForm
{
/// <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(EmploymentHisForm));
this.panel1 = new System.Windows.Forms.Panel();
this.textBox5 = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.textBox4 = new System.Windows.Forms.TextBox();
this.dateEdit2 = new DevExpress.XtraEditors.DateEdit();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.dateEdit1 = new DevExpress.XtraEditors.DateEdit();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.panel2 = new System.Windows.Forms.Panel();
this.CancelBtn = new System.Windows.Forms.Button();
this.ConfirmBtn = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dateEdit2.Properties.CalendarTimeProperties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dateEdit2.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties.CalendarTimeProperties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties)).BeginInit();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.textBox5);
this.panel1.Controls.Add(this.label7);
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.textBox4);
this.panel1.Controls.Add(this.dateEdit2);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.dateEdit1);
this.panel1.Controls.Add(this.textBox3);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.textBox2);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.textBox1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(461, 270);
this.panel1.TabIndex = 0;
//
// textBox5
//
this.textBox5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox5.Location = new System.Drawing.Point(129, 211);
this.textBox5.Multiline = true;
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(222, 53);
this.textBox5.TabIndex = 13;
//
// label7
//
this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label7.Location = new System.Drawing.Point(23, 209);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(100, 23);
this.label7.TabIndex = 12;
this.label7.Text = "防护措施:";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label6
//
this.label6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label6.Location = new System.Drawing.Point(23, 145);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(100, 23);
this.label6.TabIndex = 11;
this.label6.Text = "有害因素:";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// textBox4
//
this.textBox4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox4.Location = new System.Drawing.Point(129, 147);
this.textBox4.Multiline = true;
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(222, 53);
this.textBox4.TabIndex = 10;
//
// dateEdit2
//
this.dateEdit2.EditValue = null;
this.dateEdit2.Location = new System.Drawing.Point(129, 120);
this.dateEdit2.Name = "dateEdit2";
this.dateEdit2.Properties.Appearance.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dateEdit2.Properties.Appearance.Options.UseFont = true;
this.dateEdit2.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEdit2.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEdit2.Size = new System.Drawing.Size(222, 24);
this.dateEdit2.TabIndex = 9;
//
// label5
//
this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(23, 117);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(100, 23);
this.label5.TabIndex = 8;
this.label5.Text = "终止时间:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label4
//
this.label4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label4.Location = new System.Drawing.Point(23, 91);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(100, 23);
this.label4.TabIndex = 7;
this.label4.Text = "起始时间:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// dateEdit1
//
this.dateEdit1.EditValue = null;
this.dateEdit1.Location = new System.Drawing.Point(129, 94);
this.dateEdit1.Name = "dateEdit1";
this.dateEdit1.Properties.Appearance.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dateEdit1.Properties.Appearance.Options.UseFont = true;
this.dateEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEdit1.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.dateEdit1.Size = new System.Drawing.Size(222, 24);
this.dateEdit1.TabIndex = 6;
//
// textBox3
//
this.textBox3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox3.Location = new System.Drawing.Point(129, 67);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(222, 23);
this.textBox3.TabIndex = 5;
//
// label3
//
this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label3.Location = new System.Drawing.Point(23, 64);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(100, 23);
this.label3.TabIndex = 4;
this.label3.Text = "车间:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// textBox2
//
this.textBox2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox2.Location = new System.Drawing.Point(129, 40);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(222, 23);
this.textBox2.TabIndex = 3;
//
// label2
//
this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label2.Location = new System.Drawing.Point(23, 38);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(100, 23);
this.label2.TabIndex = 2;
this.label2.Text = "工种:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label1
//
this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label1.Location = new System.Drawing.Point(23, 15);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(100, 23);
this.label1.TabIndex = 1;
this.label1.Text = "单位:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// textBox1
//
this.textBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox1.Location = new System.Drawing.Point(129, 15);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(222, 23);
this.textBox1.TabIndex = 0;
//
// panel2
//
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, 270);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(461, 57);
this.panel2.TabIndex = 1;
//
// CancelBtn
//
this.CancelBtn.Image = ((System.Drawing.Image)(resources.GetObject("CancelBtn.Image")));
this.CancelBtn.Location = new System.Drawing.Point(251, -3);
this.CancelBtn.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.Size = new System.Drawing.Size(91, 41);
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(129, 0);
this.ConfirmBtn.Margin = new System.Windows.Forms.Padding(2, 4, 2, 4);
this.ConfirmBtn.Name = "ConfirmBtn";
this.ConfirmBtn.Size = new System.Drawing.Size(90, 38);
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;
//
// EmploymentHisForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(461, 327);
this.Controls.Add(this.panel1);
this.Controls.Add(this.panel2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "EmploymentHisForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "职业史";
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dateEdit2.Properties.CalendarTimeProperties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dateEdit2.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties.CalendarTimeProperties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dateEdit1.Properties)).EndInit();
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label2;
private DevExpress.XtraEditors.DateEdit dateEdit1;
private DevExpress.XtraEditors.DateEdit dateEdit2;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Button ConfirmBtn;
private System.Windows.Forms.Button CancelBtn;
}
}

@ -0,0 +1,75 @@
using PEIS.Entity;
using PEIS.Utils;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace PEIS.View.Exam
{
public partial class EmploymentHisForm : Form
{
private Int64 PID;
public EmploymentHisForm(Int64 eID)
{
InitializeComponent();
PID = eID;
ConfirmBtn.Click += ConfirmBtn_Click;
CancelBtn.Click += (sender, e)=>{ DialogResult = DialogResult.Cancel; };
}
private void ConfirmBtn_Click(object sender, EventArgs e)
{
ExamEmploymentHis examEmployment = new ExamEmploymentHis();
examEmployment.PID = PID;
if (string.IsNullOrWhiteSpace(textBox1.Text))
{
Global.Msg("info", "请填写工作单位");
return;
}
if (dateEdit1.EditValue==null||dateEdit1.EditValue == DBNull.Value)
{
Global.Msg("info", "请填写开始时间");
return;
}
if (dateEdit2.EditValue == null || dateEdit2.EditValue == DBNull.Value)
{
Global.Msg("info", "请填写结束时间");
return;
}
if (dateEdit2.DateTime< dateEdit1.DateTime)
{
Global.Msg("info", "结束时间不能小于开始时间");
return;
}
examEmployment.WorkUnit = textBox1.Text.Trim();
examEmployment.WorkType = textBox2.Text.Trim();
examEmployment.Workshop= textBox3.Text.Trim();
examEmployment.StartTime = dateEdit1.DateTime;
examEmployment.EndTime = dateEdit2.DateTime;
examEmployment.HarmfulFactors= textBox4.Text.Trim();
examEmployment.ProtectiveMeasures = textBox5.Text.Trim();
var result = examEmployment.Save();
if (result)
{
DialogResult = DialogResult.OK;
Close();
}
}
private void CancelBtn_Click(object sender, EventArgs e)
{
throw new NotImplementedException();
}
}
public class ExamEmploymentHisView : ExamEmploymentHis
{
/// <summary>
/// 起始时间
/// </summary>
public string StartEndTime { get; set;}
}
}

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

@ -11,7 +11,13 @@ namespace PEIS.View.Exam
internal interface ICareerHisInqView:IViewBase
{
//获取患者基本信息
event EventHandler<Args<BasePatient>> GetPatients;
void ShowPatient(BasePatient patient);
event EventHandler<Args<EnrollmentPatient>> GetPatients;
void ShowPatient(EnrollmentPatient patient);
//职业史问诊
event EventHandler<Args<ExamCareerHisInq>> GetCareerHisInq;
void ShowExamCareerHisInq(ExamCareerHisInq examCareer);
//职业史数据
event EventHandler<Args<ExamEmploymentHis>> GetEmploymentHis;
void ShowEmploymentHis(List<ExamEmploymentHis> employmentHis);
}
}

Loading…
Cancel
Save